diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index bdbfa45..f665330 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -17,12 +17,12 @@ # └─ default.nix # -{ config, nixpkgs, pkgs, user, lib, pkgs-kabbone, ... }: +{ inputs, lib, config, pkgs, user, nixpkgs, pkgs-kabbone, ... }: { imports = # For now, if applying to other system, swap files [(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix - [(import ../../modules/wm/sway/default.nix)] ++ # Window Manager + [(import ../../modules/wm/niri/default.nix)] ++ # Window Manager (import ../../modules/wm/virtualisation) ++ # libvirt + Docker [(import ../../modules/wm/virtualisation/kvm-amd.nix)] ++ # kvm module options #[(import ../../modules/kabbone/corosync-qdevice.nix)] ++ # corosync qdevice quorum @@ -101,5 +101,4 @@ }; }; }; - } diff --git a/hosts/lifebook/default.nix b/hosts/lifebook/default.nix index 4130713..35e2452 100644 --- a/hosts/lifebook/default.nix +++ b/hosts/lifebook/default.nix @@ -54,6 +54,7 @@ systemPackages = with pkgs; [ linux-firmware intel-media-driver + intel-compute-runtime ]; }; diff --git a/modules/programs/alacritty.nix b/modules/programs/alacritty.nix index 8f31b16..68f5416 100644 --- a/modules/programs/alacritty.nix +++ b/modules/programs/alacritty.nix @@ -13,17 +13,16 @@ programs = { alacritty = { enable = true; - package = pkgs.alacritty; - settings = { - env.term = "screen-256color"; - font = rec { # Font - Laptop has size manually changed at home.nix - #normal.family = "FiraCode Nerd Font"; - normal.family = "Cascadia Code"; - #normal.family = "Intel One Mono"; - #bold = { style = "Bold"; }; -# size = 8; - }; - }; + #settings = { + # env.term = "screen-256color"; + # font = rec { # Font - Laptop has size manually changed at home.nix + # #normal.family = "FiraCode Nerd Font"; + # normal.family = "Cascadia Code"; + # #normal.family = "Intel One Mono"; + # #bold = { style = "Bold"; }; +# # size = 8; + # }; + #}; }; }; } diff --git a/modules/programs/default.nix b/modules/programs/default.nix index ab93d24..def5c48 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -11,7 +11,7 @@ # [ - ./alacritty.nix +# ./alacritty.nix # ./rofi.nix ./firefox.nix #./waybar.nix diff --git a/modules/services/default.nix b/modules/services/default.nix index 9873b93..5669a75 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -11,14 +11,14 @@ # [ - ./dunst.nix - ./flameshot.nix + #./dunst.nix + #./flameshot.nix #./picom.nix #./polybar.nix #./sxhkd.nix #./udiskie.nix #./redshift.nix - ./kanshi.nix + #./kanshi.nix ./keyring.nix ] diff --git a/modules/wm/niri/config.kdl b/modules/wm/niri/config.kdl index 5854714..1c720bc 100644 --- a/modules/wm/niri/config.kdl +++ b/modules/wm/niri/config.kdl @@ -61,12 +61,17 @@ input { // middle-emulation } + touch { + map-to-output "eDP-1" + } + // Uncomment this to make the mouse warp to the center of newly focused windows. // warp-mouse-to-focus // Focus windows and outputs automatically when moving the mouse into them. // Setting max-scroll-amount="0%" makes it work only on windows already fully on screen. focus-follows-mouse max-scroll-amount="0%" + workspace-auto-back-and-forth } // You can configure outputs by their name, which you can find @@ -75,6 +80,21 @@ input { // Find more information on the wiki: // https://yalter.github.io/niri/Configuration:-Outputs // Remember to uncomment the node by removing "/-"! +// Lenovo main +output "DP-2" { + mode "2560x1440" + scale 1.0 + transform "normal" + position x=0 y=250 + variable-refresh-rate +}; +// Eizo right +output "DP-3" { + mode "1920x1200" + scale 1.0 + transform "270" + position x=2560 y=0 +}; output "eDP-1" { // Uncomment this line to disable this output. // off @@ -106,6 +126,14 @@ output "eDP-1" { position x=0 y=0 } +cursor { + xcursor-theme "Breeze_Hacked" + xcursor-size 24 + + hide-when-typing + hide-after-inactive-ms 1000 +} + // Settings that influence how windows are positioned and sized. // Find more information on the wiki: // https://yalter.github.io/niri/Configuration:-Layout @@ -141,9 +169,9 @@ layout { } // You can change the default width of the new windows. - default-column-width { proportion 1.0; } + //default-column-width { proportion 1.0; } // If you leave the brackets empty, the windows themselves will decide their initial width. - // default-column-width {} + default-column-width {} // By default focus ring and border are rendered as a solid background rectangle // behind windows. That is, they will show up through semitransparent windows. @@ -272,6 +300,9 @@ layout { // This line starts waybar, a commonly used bar for Wayland compositors. spawn-at-startup "noctalia-shell" +spawn-at-startup "firefox" +spawn-at-startup "element-desktop" +spawn-at-startup "thunderbird" // To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup: // spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell" @@ -313,15 +344,39 @@ animations { // Work around WezTerm's initial configure bug // by setting an empty default-column-width. +workspace "browser" { + open-on-output "DP-2" +} +workspace "chat" { + open-on-output "DP-3" +} +workspace "terminal" { +} + + window-rule { // This regular expression is intentionally made as specific as possible, // since this is the default config, and we want no false positives. // You can get away with just app-id="wezterm" if you want. //match app-id=r#"^org\.wezfurlong\.wezterm$"# - match app-id="alacritty" - default-column-width {} + match app-id="Alacritty" + match title="Firefox" + default-column-width { proportion 1.0; } } +window-rule { + match title="Firefox" + default-column-width { proportion 1.0; } + open-on-workspace "browser" +} +window-rule { + match app-id="Element" + match app-id="thunderbird" + default-column-width { proportion 1.0; } + open-on-workspace "chat" +} + + // Open the Firefox picture-in-picture player as floating by default. window-rule { // This app-id regular expression will work for both: @@ -397,6 +452,12 @@ binds { Mod+K { focus-window-up; } Mod+L { focus-column-right; } + // colemak-dh + Mod+M { focus-column-left; } + Mod+N { focus-window-down; } + Mod+E { focus-window-up; } + Mod+I { focus-column-right; } + Mod+Ctrl+Left { move-column-left; } Mod+Ctrl+Down { move-window-down; } Mod+Ctrl+Up { move-window-up; } @@ -406,6 +467,12 @@ binds { Mod+Ctrl+K { move-window-up; } Mod+Ctrl+L { move-column-right; } + // colemak-dh + Mod+Ctrl+M { move-column-left; } + Mod+Ctrl+N { move-window-down; } + Mod+Ctrl+E { move-window-up; } + Mod+Ctrl+I { move-column-right; } + // Alternative commands that move across workspaces when reaching // the first or last window in a column. // Mod+J { focus-window-or-workspace-down; } @@ -427,6 +494,12 @@ binds { Mod+Shift+K { focus-monitor-up; } Mod+Shift+L { focus-monitor-right; } + //colemak-dh + Mod+Shift+M { focus-monitor-left; } + Mod+Shift+N { focus-monitor-down; } + Mod+Shift+I { focus-monitor-up; } + Mod+Shift+O { focus-monitor-right; } + Mod+Shift+Ctrl+Left { move-column-to-monitor-left; } Mod+Shift+Ctrl+Down { move-column-to-monitor-down; } Mod+Shift+Ctrl+Up { move-column-to-monitor-up; } @@ -436,6 +509,12 @@ binds { Mod+Shift+Ctrl+K { move-column-to-monitor-up; } Mod+Shift+Ctrl+L { move-column-to-monitor-right; } + // colemak-dh + Mod+Shift+Ctrl+M { move-column-to-monitor-left; } + Mod+Shift+Ctrl+N { move-column-to-monitor-down; } + Mod+Shift+Ctrl+E { move-column-to-monitor-up; } + Mod+Shift+Ctrl+I { move-column-to-monitor-right; } + // Alternatively, there are commands to move just a single window: // Mod+Shift+Ctrl+Left { move-window-to-monitor-left; } // ... @@ -447,11 +526,11 @@ binds { Mod+Page_Down { focus-workspace-down; } Mod+Page_Up { focus-workspace-up; } Mod+U { focus-workspace-down; } - Mod+I { focus-workspace-up; } + //Mod+I { focus-workspace-up; } Mod+Ctrl+Page_Down { move-column-to-workspace-down; } Mod+Ctrl+Page_Up { move-column-to-workspace-up; } Mod+Ctrl+U { move-column-to-workspace-down; } - Mod+Ctrl+I { move-column-to-workspace-up; } + //Mod+Ctrl+I { move-column-to-workspace-up; } // Alternatively, there are commands to move just a single window: // Mod+Ctrl+Page_Down { move-window-to-workspace-down; } @@ -460,7 +539,7 @@ binds { Mod+Shift+Page_Down { move-workspace-down; } Mod+Shift+Page_Up { move-workspace-up; } Mod+Shift+U { move-workspace-down; } - Mod+Shift+I { move-workspace-up; } + //Mod+Shift+I { move-workspace-up; } // You can bind mouse wheel scroll ticks using the following syntax. // These binds will change direction based on the natural-scroll setting. @@ -502,18 +581,18 @@ binds { // // For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on // will all refer to the 3rd workspace. - Mod+1 { focus-workspace 1; } - Mod+2 { focus-workspace 2; } - Mod+3 { focus-workspace 3; } + Mod+1 { focus-workspace "browser"; } + Mod+2 { focus-workspace "chat"; } + Mod+3 { focus-workspace "terminal"; } Mod+4 { focus-workspace 4; } Mod+5 { focus-workspace 5; } Mod+6 { focus-workspace 6; } Mod+7 { focus-workspace 7; } Mod+8 { focus-workspace 8; } Mod+9 { focus-workspace 9; } - Mod+Ctrl+1 { move-column-to-workspace 1; } - Mod+Ctrl+2 { move-column-to-workspace 2; } - Mod+Ctrl+3 { move-column-to-workspace 3; } + Mod+Ctrl+1 { move-column-to-workspace "browser"; } + Mod+Ctrl+2 { move-column-to-workspace "chat"; } + Mod+Ctrl+3 { move-column-to-workspace "terminal"; } Mod+Ctrl+4 { move-column-to-workspace 4; } Mod+Ctrl+5 { move-column-to-workspace 5; } Mod+Ctrl+6 { move-column-to-workspace 6; } diff --git a/modules/wm/niri/default.nix b/modules/wm/niri/default.nix index be10738..467d05c 100644 --- a/modules/wm/niri/default.nix +++ b/modules/wm/niri/default.nix @@ -18,6 +18,7 @@ environment = { systemPackages = with pkgs; [ + alacritty xdg-desktop-portal-gnome xdg-desktop-portal-gtk swaylock @@ -30,6 +31,7 @@ brightnessctl playerctl xwayland-satellite + breeze-hacked-cursor-theme ]; loginShellInit = '' export GTK_IM_MODULE="simple" @@ -41,7 +43,7 @@ }; services = { iio-niri = { - enable = true; + enable = false; }; greetd = { enable = true;