From 2da09001d7007d8c147fa6b29d9a7a4b523da8a3 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 24 Aug 2024 11:11:21 -0400 Subject: [PATCH] nixos76: fixes for laptop --- config/hosts/nixos76/default.nix | 2 +- config/modules/bspwm/bspwm.nix | 80 +++++++++++++++++--------------- config/modules/bspwm/polybar.nix | 5 +- 3 files changed, 47 insertions(+), 40 deletions(-) diff --git a/config/hosts/nixos76/default.nix b/config/hosts/nixos76/default.nix index 2e0a080..77f0586 100644 --- a/config/hosts/nixos76/default.nix +++ b/config/hosts/nixos76/default.nix @@ -153,7 +153,7 @@ # Syncthing services = { - syncthing = { + syncthing = lib.mkForce { enable = true; user = "alex"; dataDir = "/home/alex/Sync"; diff --git a/config/modules/bspwm/bspwm.nix b/config/modules/bspwm/bspwm.nix index fdfb1a8..8fa97b3 100644 --- a/config/modules/bspwm/bspwm.nix +++ b/config/modules/bspwm/bspwm.nix @@ -1,43 +1,49 @@ { pkgs, ... }: { - xsession.windowManager.bspwm = let theme = import ../theme.nix "light"; in { - enable = true; - settings = { - normal_border_color = theme.colors.disabled; - active_border_color = theme.colors.secondary; - focused_border_color = theme.colors.primary; + xsession.windowManager.bspwm = + let + theme = import ../theme.nix "light"; + primaryMonitor = "eDP-1"; # = "DP-2" for thelio + windowGap = 2; # = "theme.sizing.xl" for thelio + in + { + enable = true; + settings = { + normal_border_color = theme.colors.disabled; + active_border_color = theme.colors.secondary; + focused_border_color = theme.colors.primary; - border_width = theme.sizing.m; - window_gap = theme.sizing.xl; + border_width = theme.sizing.m; + window_gap = windowGap; - focus_follows_pointer = true; - single_monocle = true; - honor_size_hints = true; + focus_follows_pointer = true; + single_monocle = true; + honor_size_hints = true; + }; + extraConfig = '' + bspc monitor ${primaryMonitor} -d I II III IV V + bspc monitor HDMI-1 -d VI VII VIII IX X + + # Set mouse 1 to move floating windows: + bspc config pointer_action1 move + + # Mouse 2 button resizes the window by side: + bspc config pointer_action2 resize_side + + # Mouse 3 button (right mouse) resize by corner: + bspc config pointer_action2 resize_corner + + ${pkgs.feh}/bin/feh --bg-fill ${pkgs.atau-pkgs.atau-wallpapers}/share/backgrounds/atau-wallpapers/aos1.png + ''; + startupPrograms = [ + "bluetoothd" + "flameshot" + "kdeconnect-indicator" + "nextcloud-client" + "picom" + "polybar primary" + "polybar secondary" + "steam" + ]; }; - extraConfig = '' - bspc monitor DP-2 -d I II III IV V - bspc monitor HDMI-1 -d VI VII VIII IX X - - # Set mouse 1 to move floating windows: - bspc config pointer_action1 move - - # Mouse 2 button resizes the window by side: - bspc config pointer_action2 resize_side - - # Mouse 3 button (right mouse) resize by corner: - bspc config pointer_action2 resize_corner - - ${pkgs.feh}/bin/feh --bg-fill ${pkgs.atau-pkgs.atau-wallpapers}/share/backgrounds/atau-wallpapers/aos1.png - ''; - startupPrograms = [ - "bluetoothd" - "flameshot" - "kdeconnect-indicator" - "nextcloud-client" - "picom" - "polybar primary" - "polybar secondary" - "steam" - ]; - }; } diff --git a/config/modules/bspwm/polybar.nix b/config/modules/bspwm/polybar.nix index 69b0a00..4d4fc4e 100644 --- a/config/modules/bspwm/polybar.nix +++ b/config/modules/bspwm/polybar.nix @@ -7,6 +7,7 @@ let theme = import ../theme.nix "light"; colors = theme.colors; + primaryMonitor = "eDP-1"; # = "DP-2" for thelio in rec { common-bar = { @@ -53,9 +54,9 @@ }; "bar/primary" = lib.recursiveUpdate common-bar { - monitor = "DP-2"; + monitor = primaryMonitor; modules-left = "xworkspaces xwindow"; - modules-right = "filesystem memory cpu wlan date"; + modules-right = "filesystem memory cpu wlan systray date"; }; "bar/secondary" = lib.recursiveUpdate common-bar {