Swap bottom for btop, move cava into shell file from own
This commit is contained in:
parent
e70563fe97
commit
05e3924968
|
@ -305,14 +305,6 @@
|
|||
];
|
||||
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}"
|
||||
|
@ -320,81 +312,61 @@
|
|||
];
|
||||
in
|
||||
lib.lists.flatten (lib.lists.forEach (lib.lists.range 1 9) workspace)
|
||||
++ (
|
||||
let
|
||||
btm_args = "--autohide_time --battery --celsius --enable_cache_memory --enable_gpu --group_processes --hide_avg_cpu --hide_table_gap --retention=3m --show_table_scroll_position";
|
||||
in
|
||||
[
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
# Open Hyprland wiki at correct version number
|
||||
"CTRL_SHIFT, H, exec, xdg-open \"https://wiki.hyprland.org/$(${config.wayland.windowManager.hyprland.finalPackage}/bin/hyprctl version -j | ${pkgs.jq}/bin/jq $args.tag | ${pkgs.gnused}/bin/sed s/v// | ${pkgs.gnused}/bin/sed s/\\\"//g)\""
|
||||
++ [
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
# Open Hyprland wiki at correct version number
|
||||
"CTRL_SHIFT, H, exec, xdg-open \"https://wiki.hyprland.org/$(${config.wayland.windowManager.hyprland.finalPackage}/bin/hyprctl version -j | ${pkgs.jq}/bin/jq $args.tag | ${pkgs.gnused}/bin/sed s/v// | ${pkgs.gnused}/bin/sed s/\\\"//g)\""
|
||||
|
||||
"SUPER, F1, exec, ${config.programs.hyprlock.package}/bin/hyprlock"
|
||||
"SUPER, P, exec, ${config.programs.wlogout.package}/bin/wlogout"
|
||||
"SUPER, Q, killactive,"
|
||||
"SUPER, V, togglefloating"
|
||||
# "SUPER SHIFT, V, setfloating" ## TODO setfloating exists
|
||||
# in newer version of Hyprland than mine
|
||||
"SUPER SHIFT, V, moveactive, exact 1% 4%"
|
||||
"SUPER SHIFT, V, resizeactive, exact 800 600"
|
||||
"SUPER SHIFT, V, pin"
|
||||
"SUPER, M, fullscreen, 1" # Maximise window
|
||||
"SUPER SHIFT, M, fullscreen, 0" # Actual fullscreen
|
||||
"SUPER, Z, exec, ${config.services.mako.package}/bin/makoctl restore"
|
||||
"SUPER SHIFT, Z, exec, exec ${config.services.mako.package}/bin/makoctl dismiss -a"
|
||||
"SUPER, F1, exec, ${config.programs.hyprlock.package}/bin/hyprlock"
|
||||
"SUPER, P, exec, ${config.programs.wlogout.package}/bin/wlogout"
|
||||
"SUPER, Q, killactive,"
|
||||
"SUPER, V, togglefloating"
|
||||
# "SUPER SHIFT, V, setfloating" ## TODO setfloating exists
|
||||
# in newer version of Hyprland than mine
|
||||
"SUPER SHIFT, V, moveactive, exact 1% 4%"
|
||||
"SUPER SHIFT, V, resizeactive, exact 800 600"
|
||||
"SUPER SHIFT, V, pin"
|
||||
"SUPER, M, fullscreen, 1" # Maximise window
|
||||
"SUPER SHIFT, M, fullscreen, 0" # Actual fullscreen
|
||||
"SUPER, Z, exec, ${config.services.mako.package}/bin/makoctl restore"
|
||||
"SUPER SHIFT, Z, exec, exec ${config.services.mako.package}/bin/makoctl dismiss -a"
|
||||
|
||||
# Common program shortcuts
|
||||
"SUPER, Space, exec, ${config.programs.fuzzel.package}/bin/fuzzel"
|
||||
"SUPER, Return, exec, ${config.programs.alacritty.package}/bin/alacritty"
|
||||
"SUPER SHIFT, Return, exec, ${config.programs.emacs.finalPackage}/bin/emacsclient -c"
|
||||
"SUPER, W, exec, ${config.programs.firefox.finalPackage}/bin/firefox"
|
||||
"SUPER, F, exec, ${pkgs.nautilus}/bin/nautilus"
|
||||
# Common program shortcuts
|
||||
"SUPER, Space, exec, ${config.programs.fuzzel.package}/bin/fuzzel"
|
||||
"SUPER, Return, exec, ${config.programs.alacritty.package}/bin/alacritty"
|
||||
"SUPER SHIFT, Return, exec, ${config.programs.emacs.finalPackage}/bin/emacsclient -c"
|
||||
"SUPER, W, exec, ${config.programs.firefox.finalPackage}/bin/firefox"
|
||||
"SUPER, F, exec, ${pkgs.nautilus}/bin/nautilus"
|
||||
|
||||
# Terminal utilities
|
||||
"SUPER, S, exec, ${
|
||||
withTerm {
|
||||
progname = "${config.programs.bottom.package}/bin/btm";
|
||||
args = btm_args;
|
||||
}
|
||||
}"
|
||||
"SUPER SHIFT, S, exec, ${
|
||||
withTerm {
|
||||
progname = "${config.programs.bottom.package}/bin/btm";
|
||||
args = btm_args + " --basic";
|
||||
}
|
||||
}"
|
||||
"SUPER, C, exec, ${withTerm { progname = "${config.programs.cava.package}/bin/cava"; }}"
|
||||
# Misc useful binds
|
||||
",Print,exec,${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.swappy}/bin/swappy -f -"
|
||||
# ",XF86Calculator,exec,pkill rofi || ${config.programs.rofi.finalPackage}/bin/rofi -show calc"
|
||||
|
||||
# Misc useful binds
|
||||
",Print,exec,${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.swappy}/bin/swappy -f -"
|
||||
# ",XF86Calculator,exec,pkill rofi || ${config.programs.rofi.finalPackage}/bin/rofi -show calc"
|
||||
# Movement binds
|
||||
"SUPER, H, movefocus, l"
|
||||
"SUPER, L, movefocus, r"
|
||||
"SUPER, K, movefocus, u"
|
||||
"SUPER, J, movefocus, d"
|
||||
"SUPER SHIFT, H, movewindow, l"
|
||||
"SUPER SHIFT, L, movewindow, r"
|
||||
"SUPER SHIFT, K, movewindow, u"
|
||||
"SUPER SHIFT, J, movewindow, d"
|
||||
|
||||
# Movement binds
|
||||
"SUPER, H, movefocus, l"
|
||||
"SUPER, L, movefocus, r"
|
||||
"SUPER, K, movefocus, u"
|
||||
"SUPER, J, movefocus, d"
|
||||
"SUPER SHIFT, H, movewindow, l"
|
||||
"SUPER SHIFT, L, movewindow, r"
|
||||
"SUPER SHIFT, K, movewindow, u"
|
||||
"SUPER SHIFT, J, movewindow, d"
|
||||
|
||||
# Special workspaces
|
||||
"SUPER, comma, workspace, m-1"
|
||||
"SUPER SHIFT, comma, movetoworkspace, r-1"
|
||||
"SUPER, period, workspace, m+1"
|
||||
"SUPER SHIFT, period, movetoworkspace, r+1"
|
||||
"SUPER, N, workspace, empty"
|
||||
"SUPER SHIFT, N, movetoworkspace, empty"
|
||||
"SUPER, minus, togglespecialworkspace"
|
||||
"SUPER SHIFT, minus, movetoworkspace, special"
|
||||
"SUPER, bracketright, focusmonitor, +1"
|
||||
"SUPER SHIFT, bracketright, movecurrentworkspacetomonitor, +1"
|
||||
"SUPER, bracketleft, focusmonitor, -1"
|
||||
"SUPER SHIFT, bracketleft, movecurrentworkspacetomonitor, -1"
|
||||
"SUPER, O, focusurgentorlast"
|
||||
]
|
||||
);
|
||||
# Special workspaces
|
||||
"SUPER, comma, workspace, m-1"
|
||||
"SUPER SHIFT, comma, movetoworkspace, r-1"
|
||||
"SUPER, period, workspace, m+1"
|
||||
"SUPER SHIFT, period, movetoworkspace, r+1"
|
||||
"SUPER, N, workspace, empty"
|
||||
"SUPER SHIFT, N, movetoworkspace, empty"
|
||||
"SUPER, minus, togglespecialworkspace"
|
||||
"SUPER SHIFT, minus, movetoworkspace, special"
|
||||
"SUPER, bracketright, focusmonitor, +1"
|
||||
"SUPER SHIFT, bracketright, movecurrentworkspacetomonitor, +1"
|
||||
"SUPER, bracketleft, focusmonitor, -1"
|
||||
"SUPER SHIFT, bracketleft, movecurrentworkspacetomonitor, -1"
|
||||
"SUPER, O, focusurgentorlast"
|
||||
];
|
||||
bindl = [
|
||||
# Sound
|
||||
",XF86AudioMute,exec,${config.services.avizo.package}/bin/volumectl %"
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
programs.bottom = {
|
||||
enable = true;
|
||||
settings = {
|
||||
flags = {
|
||||
group_processes = true;
|
||||
temperature_type = "celsius";
|
||||
battery = true;
|
||||
enable_gpu = true;
|
||||
};
|
||||
styles =
|
||||
let
|
||||
scheme = config.lib.stylix.scheme.withHashtag;
|
||||
rainbow = with scheme; [
|
||||
red
|
||||
orange
|
||||
yellow
|
||||
green
|
||||
cyan
|
||||
blue
|
||||
magenta
|
||||
brown
|
||||
];
|
||||
in
|
||||
{
|
||||
cpu.cpu_core_colors = rainbow;
|
||||
memory = {
|
||||
ram_color = scheme.blue;
|
||||
swap_color = scheme.green;
|
||||
gpu_core_colors = rainbow;
|
||||
};
|
||||
network = {
|
||||
rx_color = scheme.blue;
|
||||
tx_color = scheme.green;
|
||||
};
|
||||
widgets = {
|
||||
border_color = scheme.base03;
|
||||
selected_border_color = scheme.base0E;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
programs.cava = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color = with config.lib.stylix.colors.withHashtag; {
|
||||
gradient = 1;
|
||||
gradient_count = 6;
|
||||
gradient_color_1 = "'${red}'";
|
||||
gradient_color_2 = "'${yellow}'";
|
||||
gradient_color_3 = "'${green}'";
|
||||
gradient_color_4 = "'${cyan}'";
|
||||
gradient_color_5 = "'${blue}'";
|
||||
gradient_color_6 = "'${magenta}'";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -9,8 +9,6 @@
|
|||
./git.nix
|
||||
./ssh.nix
|
||||
./starship.nix
|
||||
./bottom.nix
|
||||
./cava.nix
|
||||
];
|
||||
home.shellAliases = {
|
||||
sync-all = "sync-emacs; sync-git; vdirsyncer sync; mbsync -a";
|
||||
|
@ -23,6 +21,7 @@
|
|||
bash.enable = true;
|
||||
nushell.enable = true;
|
||||
# CLI programs and utilities
|
||||
btop.enable = true;
|
||||
carapace.enable = true;
|
||||
fd.enable = true;
|
||||
jq.enable = true;
|
||||
|
@ -31,6 +30,21 @@
|
|||
enable = true;
|
||||
config.style = "plain,numbers,changes";
|
||||
};
|
||||
cava = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color = with config.lib.stylix.colors.withHashtag; {
|
||||
gradient = 1;
|
||||
gradient_count = 6;
|
||||
gradient_color_1 = "'${red}'";
|
||||
gradient_color_2 = "'${yellow}'";
|
||||
gradient_color_3 = "'${green}'";
|
||||
gradient_color_4 = "'${cyan}'";
|
||||
gradient_color_5 = "'${blue}'";
|
||||
gradient_color_6 = "'${magenta}'";
|
||||
};
|
||||
};
|
||||
};
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
zle-line-init() {
|
||||
emulate -L zsh
|
||||
|
||||
[[ $CONTEXT == start ]] || return 0
|
||||
|
||||
while true; do
|
||||
zle .recursive-edit
|
||||
local -i ret=$?
|
||||
[[ $ret == 0 && $KEYS == $'\4' ]] || break
|
||||
[[ -o ignore_eof ]] || exit 0
|
||||
done
|
||||
|
||||
local saved_prompt=$PROMPT
|
||||
local saved_rprompt=$RPROMPT
|
||||
PROMPT=' '
|
||||
RPROMPT=''
|
||||
zle .reset-prompt
|
||||
PROMPT=$saved_prompt
|
||||
RPROMPT=$saved_rprompt
|
||||
|
||||
if ((ret)); then
|
||||
zle .send-break
|
||||
else
|
||||
zle .accept-line
|
||||
fi
|
||||
return ret
|
||||
}
|
||||
|
||||
zle -N zle-line-init
|
Loading…
Reference in a new issue