From 564bf84f661d36c2bf4a85f2cc333073504b8426 Mon Sep 17 00:00:00 2001 From: Cameron Reed Date: Sun, 21 Jan 2024 20:31:14 -0700 Subject: [PATCH] Fix a few errors --- .../users/cameron/home-manager/hyprland.nix | 2 +- common/users/cameron/home-manager/sway.nix | 69 ++++++++++--------- hosts/nixos/home-manager/cameron.nix | 5 +- 3 files changed, 40 insertions(+), 36 deletions(-) diff --git a/common/users/cameron/home-manager/hyprland.nix b/common/users/cameron/home-manager/hyprland.nix index 4d0d832..0f36a80 100644 --- a/common/users/cameron/home-manager/hyprland.nix +++ b/common/users/cameron/home-manager/hyprland.nix @@ -1,7 +1,7 @@ { pkgs, lib, osConfig, ... }: { - config = lib.mkIf (builtins.elem "hyprland" osConfig.desktops) ( + config = lib.mkIf (builtins.elem "hyprland" osConfig.desktop) ( let startup = pkgs.writeShellScript "startup.sh" '' hyprctl setcursor Bibata-Original-Classic 24 waybar & diff --git a/common/users/cameron/home-manager/sway.nix b/common/users/cameron/home-manager/sway.nix index 500d601..2c6c593 100644 --- a/common/users/cameron/home-manager/sway.nix +++ b/common/users/cameron/home-manager/sway.nix @@ -47,28 +47,6 @@ }; }; - extraConfig = '' - for_window { - [shell="xwayland"] title_format "%title [XWayland]" - [shell="xwayland"] border normal 2 - [window_role="pop-up"] floating enable - [window_role="bubble"] floating enable - [window_role="dialog"] floating enable - [window_type="dialog"] floating enable - [title="(?:Open|Save) (?:File|Folder|As)"] floating enable, resize set width 1030 height 710 - [class="Minecraft.*"] floating enable - [con_mark="caffeine"] inhibit_idle title_format "%title [Caffeinated]" - } - - bindgesture swipe:3:left workspace next - bindgesture swipe:3:right workspace prev - - bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > ${WOBSOCK} - bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+ | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > ${WOBSOCK} - bindsym --locked XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1 && wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print substr($2, 3, length($2))}' > ${WOBSOCK} - bindsym --locked XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1 && wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print substr($2, 3, length($2))}' > ${WOBSOCK} - ''; - keybindings = ( let mod = config.wayland.windowManager.sway.config.modifier; @@ -84,19 +62,44 @@ "${mod}+Shift+Escape" = "exec ${pkgs.swaylock}/bin/swaylock -f && sleep 2 && systemctl suspend"; }); - bars.swaybar = { - position = "top"; - - statusCommand = "${pkgs.i3status}/bin/i3status"; - - colors = { - statusline = "#ffffff"; - background = "#323232"; - inactiveWorkspace = "#32323200 #32323200 #5c5c5c"; - }; - }; + bars = [ + { + position = "top"; + + statusCommand = "${pkgs.i3status}/bin/i3status"; + + colors = { + statusline = "#ffffff"; + background = "#323232"; + inactiveWorkspace = "#32323200 #32323200 #5c5c5c"; + }; + } + ]; }; # config + + extraConfig = '' + for_window { + [shell="xwayland"] title_format "%title [XWayland]" + [shell="xwayland"] border normal 2 + [window_role="pop-up"] floating enable + [window_role="bubble"] floating enable + [window_role="dialog"] floating enable + [window_type="dialog"] floating enable + [title="(?:Open|Save) (?:File|Folder|As)"] floating enable, resize set width 1030 height 710 + [class="Minecraft.*"] floating enable + [con_mark="caffeine"] inhibit_idle title_format "%title [Caffeinated]" + } + + bindgesture swipe:3:left workspace next + bindgesture swipe:3:right workspace prev + + bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > ${WOBSOCK} + bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+ | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > ${WOBSOCK} + bindsym --locked XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1 && wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print substr($2, 3, length($2))}' > ${WOBSOCK} + bindsym --locked XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1 && wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print substr($2, 3, length($2))}' > ${WOBSOCK} + ''; + }; }); } diff --git a/hosts/nixos/home-manager/cameron.nix b/hosts/nixos/home-manager/cameron.nix index 3bf7081..4c52155 100644 --- a/hosts/nixos/home-manager/cameron.nix +++ b/hosts/nixos/home-manager/cameron.nix @@ -1,6 +1,7 @@ -{ lib, pkgs, osConfig, common_dir, ... }: +{ lib, pkgs, osConfig, ... }: -{ +let common_dir = ../../../common; +in { imports = [ (common_dir + /users/cameron/home.nix) ];