Fix and update hyprland setup

Pin working version of hyprland until nix wlroots is updated
Update config for new directory structure
Adjust visuals and apply more window rules
This commit is contained in:
Evie Litherland-Smith 2023-04-26 15:25:40 +01:00
parent df270c73af
commit da869205c1
15 changed files with 87 additions and 44 deletions

View file

@ -1,7 +1,7 @@
return { return {
flavour = "macchiato", flavour = "macchiato",
term_colors = true, term_colors = true,
transparent_background = false, transparent_background = true,
integrations = { integrations = {
barbar = true, barbar = true,
barbecue = { barbecue = {

View file

@ -60,11 +60,11 @@ local map = vim.keymap.set
local opts = { noremap = true, silent = true } local opts = { noremap = true, silent = true }
-- Move to previous/next -- Move to previous/next
map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', opts) map('n', '<A-[>', '<Cmd>BufferPrevious<CR>', opts)
map('n', '<A-.>', '<Cmd>BufferNext<CR>', opts) map('n', '<A-]>', '<Cmd>BufferNext<CR>', opts)
-- Re-order to previous/next -- Re-order to previous/next
map('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', opts) map('n', '<A-{>', '<Cmd>BufferMovePrevious<CR>', opts)
map('n', '<A->>', '<Cmd>BufferMoveNext<CR>', opts) map('n', '<A-}>', '<Cmd>BufferMoveNext<CR>', opts)
-- Goto buffer in position... -- Goto buffer in position...
map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', opts) map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', opts)
map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', opts) map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', opts)

View file

@ -8,6 +8,7 @@ in
./common.nix ./common.nix
./locales/en_GB.nix ./locales/en_GB.nix
./desktop/plasma.nix ./desktop/plasma.nix
./desktop/hyprland.nix
]; ];
networking.hostName = "H0615"; # Define your hostname. networking.hostName = "H0615"; # Define your hostname.

View file

@ -3,6 +3,13 @@
imports = [ imports = [
./default.nix ./default.nix
]; ];
nixpkgs.overlays = [
(self: super: {
waybar = super.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
});
})
];
environment.systemPackages = [ pkgs.swaylock-effects ]; environment.systemPackages = [ pkgs.swaylock-effects ];
security.pam.services.swaylock = { }; security.pam.services.swaylock = { };
programs.hyprland = { programs.hyprland = {

View file

@ -2,6 +2,7 @@
{ {
imports = [ imports = [
../../desktop ../../desktop
../../desktop/wayland/hyprland.nix
../../env/fonts/firacode.nix ../../env/fonts/firacode.nix
../../env/shell/bash.nix ../../env/shell/bash.nix
@ -24,6 +25,7 @@
../../gui/remote/nomachine.nix ../../gui/remote/nomachine.nix
../../gui/security ../../gui/security
../../gui/terminal/wezterm.nix ../../gui/terminal/wezterm.nix
../../gui/terminal/foot.nix
../../tui ../../tui
]; ];

View file

@ -4,7 +4,7 @@
enable = true; enable = true;
location = "center"; location = "center";
pass.enable = true; pass.enable = true;
terminal = "\${pkgs.kitty}/bin/kitty"; terminal = "\${pkgs.foot}/bin/foot";
plugins = with pkgs; [ plugins = with pkgs; [
rofi-calc rofi-calc
]; ];

View file

@ -1,12 +1,13 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ imports = [
./dunst.nix ../common/gtk.nix
../common/dunst.nix
../common/rofi.nix
./waybar.nix ./waybar.nix
./rofi.nix
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; [
swaylock-effects wl-clipboard
swayimg swayimg
hyprpaper hyprpaper
dolphin dolphin
@ -29,6 +30,7 @@
grace = 2; grace = 2;
fade-in = 0.2; fade-in = 0.2;
}; };
programs.swaylock.package = pkgs.swaylock-effects;
programs.eww = { programs.eww = {
enable = true; enable = true;
package = pkgs.eww-wayland; package = pkgs.eww-wayland;

View file

@ -1,7 +1,9 @@
source=~/.config/hypr/hyprland.conf
monitor=HDMI-A-1,preferred,auto,auto monitor=HDMI-A-1,preferred,auto,auto
monitor=DP-1,preferred,auto,auto,transform,1 monitor=DP-1,preferred,auto,auto,transform,1
exec-once=hyprpaper -c ~/.dotfiles/nixos/home-manager/env/config/hypr/hyprpaper-H0615.conf exec-once=hyprpaper -c ~/.config/hypr/hyprpaper-H0615.conf
wsbind=1,HDMI-A-1 wsbind=1,HDMI-A-1
wsbind=2,HDMI-A-1 wsbind=2,HDMI-A-1

View file

@ -1,3 +1,5 @@
source=~/.config/hypr/hyprland.conf
device:logitech-usb-receiver-mouse { device:logitech-usb-receiver-mouse {
left_handed = yes left_handed = yes
} }
@ -7,4 +9,4 @@ misc {
} }
monitor=DP-1,highrr,auto,1 monitor=DP-1,highrr,auto,1
exec-once=hyprpaper -c ~/.dotfiles/nixos/home-manager/env/config/hypr/hyprpaper-vanguard.conf exec-once=hyprpaper -c ~/.config/hypr/hyprpaper-vanguard.conf

View file

@ -6,11 +6,11 @@ monitor=,preferred,auto,auto
# Execute your favorite apps at launch # Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox # exec-once = waybar & hyprpaper & firefox
exec-once = dunst exec-once = dunst
exec-once = waybar -c ~/.dotfiles/nixos/home-manager/env/config/waybar/config-hyprland exec-once = waybar -c ~/.config/waybar/config-hyprland
exec-once = eww daemon exec-once = eww daemon
# Source a file (multi-file configs) # Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf source = ~/.config/hypr/macchiato.conf
# Some default env vars. # Some default env vars.
env = XCURSOR_SIZE,24 env = XCURSOR_SIZE,24
@ -48,11 +48,12 @@ decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
active_opacity = 1.0 active_opacity = 1.0
inactive_opacity = 0.8 inactive_opacity = 1.0
fullscreen_opacity = 1.0
rounding = 10 rounding = 10
blur = yes blur = yes
blur_size = 3 blur_size = 5
blur_passes = 1 blur_passes = 3
blur_new_optimizations = on blur_new_optimizations = on
drop_shadow = yes drop_shadow = yes
@ -92,14 +93,24 @@ gestures {
workspace_swipe = off workspace_swipe = off
} }
misc {
disable_autoreload = yes
}
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
windowrule = float, ^(pavucontrol)$ windowrule = float, ^(pavucontrol)$
windowrule = workspace 1, ^(foot)$ windowrule = center, ^(pavucontrol)$
windowrule = float, ^(marktext)$
windowrule = center, ^(marktext)$
windowrule = float, ^(Nxplayer.bin)$
windowrule = center, ^(Nxplayer.bin)$
windowrule = float, ^(foot)$
windowrule = center, ^(foot)$
windowrule = dimaround, ^(foot)$
windowrule = opacity 0.8 override 0.5 override, ^(foot)$
windowrule = float, ^(otpclient)$
windowrule = move 2% 6%, ^(otpclient)$
windowrule = workspace 1, ^(neovide)$
windowrule = workspace 1, ^(org.wezfurlong.wezterm)$
windowrule = workspace 2, ^(firefox)$ windowrule = workspace 2, ^(firefox)$
windowrule = workspace 2, ^(Chromium-browser)$
windowrule = workspace 3, ^(org.kde.dolphin)$ windowrule = workspace 3, ^(org.kde.dolphin)$
windowrule = workspace 4, ^(thunderbird)$ windowrule = workspace 4, ^(thunderbird)$
windowrule = workspace 4, ^(Mailspring)$ windowrule = workspace 4, ^(Mailspring)$
@ -111,20 +122,24 @@ windowrule = workspace 8, ^(Nxplayer.bin)$
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER $mainMod = SUPER
$term = wezterm
$term2 = foot
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Return, exec, kitty bind = $mainMod, Return, exec, $term
bind = $mainMod SHIFT, Return, exec, $term2
bind = $mainMod, Q, killactive, bind = $mainMod, Q, killactive,
bind = $mainMod, E, exec, ~/.dotfiles/scripts/power-profiles bind = $mainMod, E, exec, neovide --multigrid --maximized
bind = $mainMod SHIFT, E, exit # bind = $mainMod, E, exec, ~/.dotfiles/scripts/power-profiles
# bind = $mainMod SHIFT, E, exit
bind = $mainMod, P, exec, ~/.dotfiles/scripts/powermenu bind = $mainMod, P, exec, ~/.dotfiles/scripts/powermenu
bind = $mainMod, V, togglefloating, bind = $mainMod, V, togglefloating,
bind = $mainMod, Space, exec, rofi -show drun bind = $mainMod, Space, exec, rofi -show drun
bind = $mainMod, S, pseudo, # dwindle bind = $mainMod, S, pseudo, # dwindle
bind = $mainMod, G, togglesplit, # dwindle bind = $mainMod, G, togglesplit, # dwindle
bind = $mainMod, F1, exec, swaylock bind = $mainMod, F1, exec, swaylock
bind = $mainMod, W, exec, firefox bind = $mainMod, W, exec, chromium
bind = $mainMod, F, exec, kitty -e ranger bind = $mainMod, F, exec, $term -e ranger
bind = $mainMod SHIFT, F, exec, dolphin bind = $mainMod SHIFT, F, exec, dolphin
bind = $mainMod, M, fullscreen, 1 bind = $mainMod, M, fullscreen, 1
@ -194,7 +209,6 @@ bind = $mainMod SHIFT, N, movetoworkspace, empty
bind = $mainMod, C, togglespecialworkspace bind = $mainMod, C, togglespecialworkspace
bind = $mainMod SHIFT, C, movetoworkspace, special bind = $mainMod SHIFT, C, movetoworkspace, special
bind = $mainMod SHIFT, C, togglespecialworkspace
bind = $mainMod, tab, workspace, previous bind = $mainMod, tab, workspace, previous
bind = $mainMod SHIFT, tab, movetoworkspace, previous bind = $mainMod SHIFT, tab, movetoworkspace, previous

View file

@ -1,4 +0,0 @@
preload = ~/.dotfiles/wallpaper/images_dark/1920x1080.png
wallpaper = DSI-1,~/.dotfiles/wallpaper/images_dark/1920x1080.png
wallpaper = ,~/.dotfiles/wallpaper/images_dark/1920x1080.png

View file

@ -3,17 +3,20 @@ let
flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz"; flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
hyprland = (import flake-compat { hyprland = (import flake-compat {
src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz"; src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/2df0d034bc4a18fafb3524401eeeceaa6b23e753.tar.gz";
}).defaultNix; }).defaultNix;
in in
{ {
imports = [ imports = [
hyprland.homeManagerModules.default hyprland.homeManagerModules.default
./gtk.nix ./common.nix
./common-wayland.nix
]; ];
xdg.configFile."hypr".source = ./config/hypr; xdg.configFile."hypr" = {
source = ./config/hypr;
# recursive = true;
# text = "# test";
};
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
xwayland = { xwayland = {

View file

@ -1,12 +1,5 @@
{ ... }: { ... }:
{ {
nixpkgs.overlays = [
(self: super: {
waybar = super.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
});
})
];
xdg.configFile."waybar".source = ./config/waybar; xdg.configFile."waybar".source = ./config/waybar;
programs.waybar.enable = true; programs.waybar.enable = true;
} }

View file

@ -9,7 +9,7 @@ require "navigator"
return { return {
audible_bell = "Disabled", audible_bell = "Disabled",
font_size = 14, font_size = 14,
window_background_opacity = 0.95, window_background_opacity = 0.7,
color_scheme = scheme_name, color_scheme = scheme_name,
use_fancy_tab_bar = false, use_fancy_tab_bar = false,
tab_max_width = 79, tab_max_width = 79,

View file

@ -6,12 +6,33 @@
settings = { settings = {
main = { main = {
term = "xterm-256color"; term = "xterm-256color";
font = "FiraCode Nerd Font:size=8"; font = "FiraCode Nerd Font:size=12";
dpi-aware = "yes"; dpi-aware = "yes";
}; };
mouse = { mouse = {
hide-when-typing = true; hide-when-typing = true;
}; };
colors = {
# Catppuccin Macchiato
foreground = "cad3f5"; # Text
background = "24273a"; # Base
regular0 = "494d64"; # Surface 1
regular1 = "ed8796"; # red
regular2 = "a6da95"; # green
regular3 = "eed49f"; # yellow
regular4 = "8aadf4"; # blue
regular5 = "f5bde6"; # pink
regular6 = "8bd5ca"; # teal
regular7 = "b8c0e0"; # Subtext 1
bright0 = "5b6078"; # Surface 2
bright1 = "ed8796"; # red
bright2 = "a6da95"; # green
bright3 = "eed49f"; # yellow
bright4 = "8aadf4"; # blue
bright5 = "f5bde6"; # pink
bright6 = "8bd5ca"; # teal
bright7 = "a5adcb"; # Subtext 0
};
}; };
}; };
} }