chore: directly reference some system utilities in hyprland

This commit is contained in:
Youwen Wu 2024-09-18 02:13:19 -07:00
parent 027bdc0568
commit 5b219a6829
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
2 changed files with 20 additions and 24 deletions

View file

@ -8,11 +8,7 @@
grim grim
slurp slurp
swappy swappy
pavucontrol
waypaper
swaybg swaybg
pamixer
brightnessctl
bibata-cursors bibata-cursors
libsForQt5.qtstyleplugin-kvantum libsForQt5.qtstyleplugin-kvantum
@ -24,7 +20,7 @@
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
settings = { settings = {
exec-once = [ "waypaper --restore" ]; exec-once = [ "${pkgs.waypaper}/bin/waypaper --restore" ];
"$mod" = "SUPER"; "$mod" = "SUPER";
"$Left" = "H"; "$Left" = "H";
"$Right" = "L"; "$Right" = "L";
@ -41,11 +37,11 @@
# External reserved keys: SUPER + Z and SUPER + X for zen-browser. # External reserved keys: SUPER + Z and SUPER + X for zen-browser.
# Application Keybinds # Application Keybinds
"$mod, T, exec, kitty" "$mod, T, exec, ${pkgs.kitty}/bin/kitty"
"$mod, E, exec, dolphin" "$mod, E, exec, ${pkgs.dolphin}/bin/dolphin"
"$mod, R, exec, pavucontrol -t 3" # open pavucontrol on 'outputs' tab "$mod, R, exec, ${pkgs.pavucontrol}/bin/pavucontrol -t 3" # open pavucontrol on 'outputs' tab
"$mod, M, exec, thunderbird" "$mod, M, exec, ${pkgs.thunderbird}/bin/thunderbird"
"$mod, B, exec, waypaper" "$mod, B, exec, ${pkgs.waypaper}/bin/waypaper"
# Window actions # Window actions
"$mod, Q, killactive" "$mod, Q, killactive"
@ -113,10 +109,10 @@
"$mod, I, exec, hyprlock" "$mod, I, exec, hyprlock"
# Media controls # Media controls
",XF86AudioMute, exec, pamixer -t" ",XF86AudioMute, exec, ${pkgs.pamixer}/bin/pamixer -t"
",XF86AudioPlay, exec, playerctl play-pause" ",XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause"
",XF86AudioNext, exec, playerctl next" ",XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next"
",XF86AudioRewind, exec, playerctl previous" ",XF86AudioRewind, exec, ${pkgs.playerctl}/bin/playerctl previous"
] ]
++ ( ++ (
if pkgs.system != "aarch64-linux" then [ "$mod, F, exec, zen" ] else [ "$mod, F, exec, floorp" ] if pkgs.system != "aarch64-linux" then [ "$mod, F, exec, zen" ] else [ "$mod, F, exec, floorp" ]
@ -126,10 +122,10 @@
"$mod, mouse:273, resizewindow" "$mod, mouse:273, resizewindow"
]; ];
bindel = [ bindel = [
",XF86MonBrightnessDown, exec, brightnessctl set 5%-" ",XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 5%-"
",XF86MonBrightnessUp, exec, brightnessctl set 5%+" ",XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 5%+"
",XF86AudioRaiseVolume, exec, pamixer -i 5" ",XF86AudioRaiseVolume, exec, ${pkgs.pamixer}/bin/pamixer -i 5"
",XF86AudioLowerVolume, exec, pamixer -d 5" ",XF86AudioLowerVolume, exec, ${pkgs.pamixer}/bin/pamixer -d 5"
]; ];
binde = [ binde = [
# Resize windows # Resize windows
@ -351,7 +347,7 @@
services.hypridle = { services.hypridle = {
enable = true; enable = true;
settings = { settings = {
lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances. lock_cmd = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock"; # avoid starting multiple hyprlock instances.
before_sleep_cmd = "loginctl lock-session"; # lock before suspend. before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display. after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
}; };

View file

@ -1,5 +1,5 @@
{ pkgs, ... }:
{ {
# home.file.".config/waybar/config".source = ./config.jsonc;
programs.waybar = { programs.waybar = {
enable = true; enable = true;
style = ./style.css; style = ./style.css;
@ -67,16 +67,16 @@
backlight = { backlight = {
interval = 2; interval = 2;
format = "󰖨 {percent}%"; format = "󰖨 {percent}%";
on-scroll-up = "brightnessctl set +4"; on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl set +4";
on-scroll-down = "brightnessctl set 4-"; on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl set 4-";
}; };
wireplumber = { wireplumber = {
format = "{icon} {volume}%"; format = "{icon} {volume}%";
format-muted = "󰝟 "; format-muted = "󰝟 ";
on-click = "pamixer -t"; on-click = "pamixer -t";
on-scroll-up = "pamixer set 5%+"; on-scroll-up = "${pkgs.pamixer}/bin/pamixer set 5%+";
on-scroll-down = "pamixer set 5%-"; on-scroll-down = "${pkgs.pamixer}/bin/pamixer set 5%-";
format-icons = [ format-icons = [
"" ""
"" ""