Add cava keybind to hyprland

Add withTerm function to simplify programs to run in
terminal (alacritty by default) with a key bind. Also include setting
terminal name to name of program to allow waybar rewrites to work
This commit is contained in:
Evie Litherland-Smith 2024-02-16 11:08:24 +00:00
parent 8a7332af7c
commit 8a438400f8

View file

@ -223,6 +223,12 @@
"move onscreen 100%-820 60,title:Remmina Remote Desktop Client|Remmina Preferences,class:org.remmina.Remmina"
];
bind = let
withTerm = {
term ? "alacritty",
package ? config.programs.${term}.package,
progname,
args ? "",
}: "${package}/bin/${term} -T ${progname} -e ${progname} ${args}";
workspace = w: [
"SUPER, ${toString w}, moveworkspacetomonitor, ${toString w} current"
"SUPER, ${toString w}, workspace, ${toString w}"
@ -253,10 +259,19 @@
"SUPER, Space, exec, pkill rofi || ${rofi.finalPackage}/bin/rofi -show combi"
"SUPER, Return, exec, ${alacritty.package}/bin/alacritty"
"SUPER SHIFT, Return, exec, ${emacs.finalPackage}/bin/emacsclient -c"
"SUPER, S, exec, ${alacritty.package}/bin/alacritty -e btm ${btm_args}"
"SUPER SHIFT, S, exec, ${alacritty.package}/bin/alacritty -e btm --basic ${btm_args}"
"SUPER, W, exec, ${pkgs.nyxt}/bin/nyxt --no-socket"
# Terminal utilities
"SUPER, S, exec, ${withTerm {
progname = "btm";
args = btm_args;
}}"
"SUPER SHIFT, S, exec, ${withTerm {
progname = "btm";
args = btm_args + " --basic";
}}"
"SUPER, C, exec, ${withTerm {progname = "cava";}}"
# Misc useful binds
'',Print,exec,${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)"''
",XF86Calculator,exec,pkill rofi || ${rofi.finalPackage}/bin/rofi -show calc"