diff --git a/modules/niri/default.nix b/modules/niri/default.nix index da5f9fa..2e477cd 100644 --- a/modules/niri/default.nix +++ b/modules/niri/default.nix @@ -33,6 +33,7 @@ in { brightnessctl swaybg swayidle + swayosd gammastep ]; diff --git a/modules/niri/niri.conf.nix b/modules/niri/niri.conf.nix index bfa071d..4915305 100644 --- a/modules/niri/niri.conf.nix +++ b/modules/niri/niri.conf.nix @@ -95,6 +95,7 @@ in { { command = [ "brightnessctl" "s" "50%" ]; } { command = [ "swaybg" "-i" "${./wallpaper.png}" ]; } { command = [ "swayidle" "-w" "before-sleep" "swaylock" ]; } + { command = [ "swayosd-server" ]; } { command = [ "gammastep" "-O" "5400" ]; } ]; @@ -104,12 +105,22 @@ in { "Mod+B".action.spawn = "firefox"; "Mod+Space".action.spawn = "fuzzel"; - "XF86AudioRaiseVolume".action.spawn = [ "wpctl" "set-volume" "-l" "1" "@DEFAULT_AUDIO_SINK@" "10%+" ]; - "XF86AudioLowerVolume".action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "10%-" ]; - "XF86AudioMute".action.spawn = [ "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle" ]; + "XF86AudioRaiseVolume".action.spawn = [ + "swayosd-client" "--output-volume" "raise" + ]; + "XF86AudioLowerVolume".action.spawn = [ + "swayosd-client" "--output-volume" "lower" + ]; + "XF86AudioMute".action.spawn = [ + "swayosd-client" "--output-volume" "mute-toggle" + ]; - "XF86MonBrightnessDown".action.spawn = [ "brightnessctl" "s" "5%-" ]; - "XF86MonBrightnessUp".action.spawn = [ "brightnessctl" "s" "5%+" ]; + "XF86MonBrightnessDown".action.spawn = [ + "swayosd-client" "--brightness" "lower" + ]; + "XF86MonBrightnessUp".action.spawn = [ + "swayosd-client" "--brightness" "raise" + ]; "Mod+Backspace".action.close-window = []; diff --git a/modules/niri/waybar.conf.nix b/modules/niri/waybar.conf.nix index 541f471..63feaa6 100644 --- a/modules/niri/waybar.conf.nix +++ b/modules/niri/waybar.conf.nix @@ -3,43 +3,15 @@ layer = "top"; position = "top"; modules-left = [ - "backlight" - "wireplumber" + "network" ]; modules-center = [ "clock" ]; modules-right = [ - "network" "battery" ]; - "backlight" = { - format = "{icon}"; - format-alt = "{percent}%"; - format-icons = [ "" "" "" "" "" "" "" "" "" "" "" "" "" ]; - tooltip = false; - }; - "wireplumber" = { - format = "{icon}"; - format-alt = "{volume}%"; - format-muted = ""; - format-icons = [ - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - ]; - tooltip = false; - }; - "clock" = { format = "{:%H:%M}"; format-alt = "{:%a, %Y-%m-%d}"; @@ -50,8 +22,8 @@ format-wifi = "{icon}"; format-alt = "{essid}"; format-ethernet = "󰈁"; - format-disconnected = "󰤭"; - format-icons = ["󰤯" "󰤟" "󰤢" "󰤥" "󰤨"]; + format-disconnected = "󰤭 "; + format-icons = ["󰤯 " "󰤟 " "󰤢 " "󰤥 " "󰤨 "]; tooltip = false; }; "battery" = { diff --git a/modules/niri/waybar.css.nix b/modules/niri/waybar.css.nix index 00492e1..aff8883 100644 --- a/modules/niri/waybar.css.nix +++ b/modules/niri/waybar.css.nix @@ -32,17 +32,12 @@ in { background-color: ${background}; } - #backlight, #battery, #clock, #network { padding: 0 15px; } - #wireplumber { - padding: 0 20px 0 0; - } - /*-----Indicators----*/ #battery.charging { color: ${charging};