nix #11

Manually merged
geoffrey merged 113 commits from nix into main 2023-12-09 21:43:01 +01:00
5 changed files with 249 additions and 269 deletions
Showing only changes of commit 9686bee77e - Show all commits

View file

@ -62,105 +62,37 @@ for_window [ title="^pdfpc.*" window_role="presentation" ] move to output right,
# switch to workspace with urgent window automatically # switch to workspace with urgent window automatically
for_window [urgent=latest] focus for_window [urgent=latest] focus
# Set shut down, restart and locking features
set $mode_kblock Keyboard lock
mode "$mode_kblock" {
bindsym $mod+Shift+Escape mode "$mode_kblock"
}
"$mod+Shift+Escape" = "mode "$mode_kblock"";
# Set shut down, restart and locking features # Set shut down, restart and locking features
set $locker $HOME/.config/i3/lock set $locker $HOME/.config/i3/lock
set $mode_system [L] Vérouillage [E] Déconnexion [S] Veille [H] Hibernation [R] Redémarrage [P] Extinction
mode "$mode_system" {
bindsym l exec --no-startup-id $locker, mode "default"
bindsym e exit, mode "default"
bindsym s exec --no-startup-id $locker & systemctl suspend, mode "default"
bindsym h exec --no-startup-id $locker & systemctl hibernate, mode "default"
bindsym r exec --no-startup-id systemctl reboot, mode "default"
bindsym p exec --no-startup-id systemctl poweroff -i, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
"$mod+Escape" = "mode "$mode_system"";
# resize window (you can also use the mouse for that)
mode "Resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym h resize shrink width 10 px or 10 ppt; exec ~/.config/i3/focus_windows
bindsym j resize grow height 10 px or 10 ppt; exec ~/.config/i3/focus_windows
bindsym k resize shrink height 10 px or 10 ppt; exec ~/.config/i3/focus_windows
bindsym l resize grow width 10 px or 10 ppt; exec ~/.config/i3/focus_windows
## same bindings, but for the arrow keys
#bindsym Left resize shrink width 10 px or 10 ppt
#bindsym Down resize grow height 10 px or 10 ppt
#bindsym Up resize shrink height 10 px or 10 ppt
#bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
"$mod+r" = "mode "Resize"";
set $mode_pres_main "Presentation (main display)"
mode $mode_pres_main {
bindsym b workspace $WS3, workspace $WS4, mode $mode_pres_sec
# back to normal: Enter or Escape
bindsym q mode "default"
# bindsym Escape mode "default"
bindsym Return mode "default"
}
set $mode_pres_sec "Presentation (secondary display)"
mode $mode_pres_sec {
bindsym b workspace $WS2, workspace $WS1, mode $mode_pres_main
# back to normal: Enter or Escape
bindsym q mode "default"
# bindsym Escape mode "default"
bindsym Return mode "default"
}
"$mod+Shift+p" = "mode $mode_pres_main";
set $mode_screen Screen setup [A] Auto [L] Load [S] Save [R] Remove [D] Default set $mode_screen Screen setup [A] Auto [L] Load [S] Save [R] Remove [D] Default
"$mod+t" = "mode "$mode_screen""; "$mod+t" = "mode "$mode_screen"";
mode "$mode_screen" { mode "$mode_screen" {
bindsym a exec autorandr --change --force, mode "default" "a" = "exec autorandr --change --force, mode "default"";
bindsym l exec ~/.config/i3/autorandrloadmenu, mode "default" "l" = "exec ~/.config/i3/autorandrloadmenu, mode "default"";
bindsym s exec ~/.config/i3/autorandrsavemenu, mode "default" "s" = "exec ~/.config/i3/autorandrsavemenu, mode "default"";
bindsym r exec ~/.config/i3/autorandrremovemenu, mode "default" "r" = "exec ~/.config/i3/autorandrremovemenu, mode "default"";
bindsym d exec ~/.config/i3/autorandrdefaultmenu, mode "default" "d" = "exec ~/.config/i3/autorandrdefaultmenu, mode "default"";
# back to normal: Enter or Escape # back to normal: Enter or Escape
bindsym Return mode "default" "Return" = "mode "default"";
bindsym Escape mode "default" "Escape" = "mode "default"";
} }
# Screen temperature ("redness") setting # Screen temperature ("redness") setting
"$mod+y" = "mode "$mode_temp""; "$mod+y" = "mode "$mode_temp"";
set $mode_temp Temperature [R] Red [D] Dust storm [C] Campfire [O] Normal [A] All nighter [B] Blue set $mode_temp Temperature [R] Red [D] Dust storm [C] Campfire [O] Normal [A] All nighter [B] Blue
mode "$mode_temp" { mode "$mode_temp" {
bindsym r exec sct 1000 "r" = "exec sct 1000";
bindsym d exec sct 2000 "d" = "exec sct 2000";
bindsym c exec sct 4500 "c" = "exec sct 4500";
bindsym o exec sct "o" = "exec sct";
bindsym a exec sct 8000 "a" = "exec sct 8000";
bindsym b exec sct 10000 "b" = "exec sct 10000";
# back to normal: Enter or Escape # back to normal: Enter or Escape
bindsym Return mode "default" "Return" = "mode "default"";
bindsym Escape mode "default" "Escape" = "mode "default"";
} }

View file

@ -1,24 +0,0 @@
#!/usr/bin/env bash
# Remove SSH and GPG keys from keystores
ssh-add -D
echo RELOADAGENT | gpg-connect-agent
rm -rf "/tmp/cached_pass_$UID"
dm-tool lock
if [ $? -ne 0 ]; then
if [ -d ~/.cache/lockpatterns ]
then
pattern=$(find ~/.cache/lockpatterns/ | sort -R | head -1)
else
pattern=$HOME/.config/i3/lock.png
fi
revert() {
xset dpms 0 0 0
}
trap revert SIGHUP SIGINT SIGTERM
xset dpms 5 5 5
i3lock --nofork --color 648901 --image=$pattern --tiling --ignore-empty-password
revert
fi

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" height="50" width="50"><path fill="#82a401" d="M0 50h50V0H0z"/><path d="M0 0l50 50H25L0 25zm50 0v25L25 0z" fill="#466c01"/></svg>

Before

Width:  |  Height:  |  Size: 189 B

View file

@ -2,168 +2,242 @@
{ {
xsession.windowManager.i3 = { xsession.windowManager.i3 = {
enable = true; enable = true;
config = { config =
terminal = "alacritty"; let
# bars = []; # FIXME lemonbar # lockColors = with config.lib.stylix.colors.withHashtag; { a = base00; b = base01; d = base00; }; # Black or White, depending on current theme
colors = let ignore = "#ff00ff"; in # lockColors = with config.lib.stylix.colors.withHashtag; { a = base0A; b = base0B; d = base00; }; # Green + Yellow
with config.lib.stylix.colors.withHashtag; lib.mkForce { lockColors = { a = "#82a401"; b = "#466c01"; d = "#648901"; }; # Old
focused = { border = base0B; background = base0B; text = base00; indicator = base00; childBorder = base0B; }; lockSvg = pkgs.writeText "lock.svg" "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\" height=\"50\" width=\"50\"><path fill=\"${lockColors.a}\" d=\"M0 50h50V0H0z\"/><path d=\"M0 0l50 50H25L0 25zm50 0v25L25 0z\" fill=\"${lockColors.d}\"/></svg>";
focusedInactive = { border = base02; background = base02; text = base05; indicator = base02; childBorder = base02; }; lockPng = pkgs.runCommand "lock.png" { } "${pkgs.imagemagick}/bin/convert ${lockSvg} $out";
unfocused = { border = base05; background = base04; text = base00; indicator = base04; childBorder = base00; }; locker = "exec ${ pkgs.writeShellScript "i3-locker"
urgent = { border = base0F; background = base08; text = base00; indicator = base08; childBorder = base0F; }; ''
placeholder = { border = ignore; background = base00; text = base05; indicator = ignore; childBorder = base00; }; # Remove SSH and GPG keys from keystores
background = base07; ${pkgs.openssh}/bin/ssh-add -D
# I set the color of the active tab as the the background color of the terminal so they merge together. echo RELOADAGENT | ${pkgs.gnupg}/bin/gpg-connect-agent
}; ${pkgs.coreutils}/bin/rm -rf "/tmp/cached_pass_$UID"
focus.followMouse = false;
keybindings = ${pkgs.lightdm}/bin/dm-tool lock
let # TODO Does that work for all DMs?
mod = config.xsession.windowManager.i3.config.modifier; if [ $? -ne 0 ]; then
rofi = "exec --no-startup-id ${config.programs.rofi.package}/bin/rofi"; if [ -d ${config.xdg.cacheHome}/lockpatterns ]
focus = "exec ${ pkgs.writeShellScript "i3-focus-window" then
'' pattern=$(${pkgs.findutils} ${config.xdg.cacheHome}/lockpatterns | sort -R | head -1)
WINDOW=`${pkgs.xdotool}/bin/xdotool getwindowfocus` else
eval `${pkgs.xdotool}/bin/xdotool getwindowgeometry --shell $WINDOW` # this brings in variables WIDTH and HEIGHT pattern=${lockPng}
TX=`${pkgs.coreutils}/bin/expr $WIDTH / 2` fi
TY=`${pkgs.coreutils}/bin/expr $HEIGHT / 2` revert() {
${pkgs.xdotool}/bin/xdotool mousemove -window $WINDOW $TX $TY ${pkgs.xorg.xset} dpms 0 0 0
'' }
}"; trap revert SIGHUP SIGINT SIGTERM
pactl = "exec ${pkgs.pulseaudio}/bin/pactl"; # TODO Use NixOS package if using NixOS ${pkgs.xorg.xset} dpms 5 5 5
scrot = "${pkgs.scrot}/bin/scrot --exec '${pkgs.coreutils}/bin/mv $f ~/Screenshots/ && ${pkgs.optipng}/bin/optipng ~/Screenshots/$f'"; ${pkgs.i3lock}/bin/i3lock --nofork --color ${builtins.substring 1 6 lockColors.d} --image=$pattern --tiling --ignore-empty-password
# TODO nix path and create directory? revert
in fi
{ ''
# Compatibility layer for people coming from other backgrounds }";
# "Mod1+Tab" = "${rofi} -modi window -show window"; # FIXME When no longer using a VM focus = "exec ${ pkgs.writeShellScript "i3-focus-window"
"Mod1+F2" = "${rofi} -modi drun -show drun"; ''
"Mod1+F4" = "kill"; WINDOW=`${pkgs.xdotool}/bin/xdotool getwindowfocus`
# kill focused window eval `${pkgs.xdotool}/bin/xdotool getwindowgeometry --shell $WINDOW` # this brings in variables WIDTH and HEIGHT
"${mod}+z" = "kill"; TX=`${pkgs.coreutils}/bin/expr $WIDTH / 2`
button2 = "kill"; TY=`${pkgs.coreutils}/bin/expr $HEIGHT / 2`
# Rofi ${pkgs.xdotool}/bin/xdotool mousemove -window $WINDOW $TX $TY
"${mod}+c" = "exec --no-startup-id ${pkgs.rofi-pass}/bin/rofi-pass --last-used"; ''
# TODO Try autopass.cr }";
# 23.11 config.programs.rofi.pass.package mode_system = "[L] Vérouillage [E] Déconnexion [S] Veille [H] Hibernation [R] Redémarrage [P] Extinction";
"${mod}+i" = "exec --no-startup-id ${pkgs.rofimoji}/bin/rofimoji"; mode_resize = "Resize";
"${mod}+plus" = "${rofi} -modi ssh -show ssh"; mode_pres_main = "Presentation (main display)";
"${mod}+ù" = "${rofi} -modi ssh -show ssh -ssh-command '{terminal} -e {ssh-client} {host} -t \"sudo -s -E\"'"; mode_pres_sec = "Presentation (secondary display)";
# TODO In which keyboard layout? in
"${mod}+Tab" = "${rofi} -modi window -show window"; {
# start program launcher terminal = "alacritty";
"${mod}+d" = "${rofi} -modi run -show run"; # bars = []; # FIXME lemonbar
"${mod}+Shift+d" = "${rofi} -modi drun -show drun"; colors = let ignore = "#ff00ff"; in
# Start Applications with config.lib.stylix.colors.withHashtag; lib.mkForce {
"${mod}+Return" = "exec ${ focused = { border = base0B; background = base0B; text = base00; indicator = base00; childBorder = base0B; };
focusedInactive = { border = base02; background = base02; text = base05; indicator = base02; childBorder = base02; };
unfocused = { border = base05; background = base04; text = base00; indicator = base04; childBorder = base00; };
urgent = { border = base0F; background = base08; text = base00; indicator = base08; childBorder = base0F; };
placeholder = { border = ignore; background = base00; text = base05; indicator = ignore; childBorder = base00; };
background = base07;
# I set the color of the active tab as the the background color of the terminal so they merge together.
};
focus.followMouse = false;
keybindings =
let
mod = config.xsession.windowManager.i3.config.modifier;
rofi = "exec --no-startup-id ${config.programs.rofi.package}/bin/rofi";
pactl = "exec ${pkgs.pulseaudio}/bin/pactl"; # TODO Use NixOS package if using NixOS
scrot = "${pkgs.scrot}/bin/scrot --exec '${pkgs.coreutils}/bin/mv $f ~/Screenshots/ && ${pkgs.optipng}/bin/optipng ~/Screenshots/$f'";
# TODO nix path and create directory?
in
{
# Compatibility layer for people coming from other backgrounds
# "Mod1+Tab" = "${rofi} -modi window -show window"; # FIXME When no longer using a VM
"Mod1+F2" = "${rofi} -modi drun -show drun";
"Mod1+F4" = "kill";
# kill focused window
"${mod}+z" = "kill";
button2 = "kill";
# Rofi
"${mod}+c" = "exec --no-startup-id ${pkgs.rofi-pass}/bin/rofi-pass --last-used";
# TODO Try autopass.cr
# 23.11 config.programs.rofi.pass.package
"${mod}+i" = "exec --no-startup-id ${pkgs.rofimoji}/bin/rofimoji";
"${mod}+plus" = "${rofi} -modi ssh -show ssh";
"${mod}+ù" = "${rofi} -modi ssh -show ssh -ssh-command '{terminal} -e {ssh-client} {host} -t \"sudo -s -E\"'";
# TODO In which keyboard layout?
"${mod}+Tab" = "${rofi} -modi window -show window";
# start program launcher
"${mod}+d" = "${rofi} -modi run -show run";
"${mod}+Shift+d" = "${rofi} -modi drun -show drun";
# Start Applications
"${mod}+Return" = "exec ${
pkgs.writeShellScript "terminal" "${config.programs.alacritty.package}/bin/alacritty msg create-window || exec ${config.programs.alacritty.package}/bin/alacritty -e zsh" pkgs.writeShellScript "terminal" "${config.programs.alacritty.package}/bin/alacritty msg create-window || exec ${config.programs.alacritty.package}/bin/alacritty -e zsh"
# TODO Is -e zsh required? # -e zsh is for systems where I can't configure my user's shell
# TODO Is a shell script even required?
}"; }";
"${mod}+Shift+Return" = "exec ${config.programs.urxvt.package}/bin/urxvt"; "${mod}+Shift+Return" = "exec ${config.programs.urxvt.package}/bin/urxvt";
"${mod}+p" = "exec ${pkgs.xfce.thunar}/bin/tunar"; "${mod}+p" = "exec ${pkgs.xfce.thunar}/bin/tunar";
"${mod}+m" = "exec ${config.programs.qutebrowser.package}/bin/qutebrowser --override-restore --backend=webengine"; "${mod}+m" = "exec ${config.programs.qutebrowser.package}/bin/qutebrowser --override-restore --backend=webengine";
# TODO --backend not useful anymore # TODO --backend not useful anymore
# Volume control # Volume control
"XF86AudioRaiseVolume" = "${pactl} set-sink-mute @DEFAULT_SINK@ false; ${pactl} set-sink-volume @DEFAULT_SINK@ +5%"; "XF86AudioRaiseVolume" = "${pactl} set-sink-mute @DEFAULT_SINK@ false; ${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioLowerVolume" = "${pactl} set-sink-mute @DEFAULT_SINK@ false; ${pactl} set-sink-volume @DEFAULT_SINK@ -5%"; "XF86AudioLowerVolume" = "${pactl} set-sink-mute @DEFAULT_SINK@ false; ${pactl} set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioMute" = "${pactl} set-sink-mute @DEFAULT_SINK@ true"; "XF86AudioMute" = "${pactl} set-sink-mute @DEFAULT_SINK@ true";
"${mod}+F7" = "${pactl} suspend-sink @DEFAULT_SINK@ 1; ${pactl} suspend-sink @DEFAULT_SINK@ 0"; # Re-synchronize bluetooth headset "${mod}+F7" = "${pactl} suspend-sink @DEFAULT_SINK@ 1; ${pactl} suspend-sink @DEFAULT_SINK@ 0"; # Re-synchronize bluetooth headset
"${mod}+F11" = "exec ${pkgs.pavucontrol}/bin/pavucontrol"; "${mod}+F11" = "exec ${pkgs.pavucontrol}/bin/pavucontrol";
"${mod}+F12" = "exec ${pkgs.pavucontrol}/bin/pavucontrol"; "${mod}+F12" = "exec ${pkgs.pavucontrol}/bin/pavucontrol";
# TODO Find pacmixer? # TODO Find pacmixer?
# Media control # Media control
"XF86AudioPrev" = "exec ${pkgs.mpc-cli}/bin/mpc prev"; "XF86AudioPrev" = "exec ${pkgs.mpc-cli}/bin/mpc prev";
"XF86AudioPlay" = "exec ${pkgs.mpc-cli}/bin/mpc toggle"; "XF86AudioPlay" = "exec ${pkgs.mpc-cli}/bin/mpc toggle";
"XF86AudioNext" = "exec ${pkgs.mpc-cli}/bin/mpc next"; "XF86AudioNext" = "exec ${pkgs.mpc-cli}/bin/mpc next";
# Misc # Misc
"${mod}+F10" = "exec ${ pkgs.writeShellScript "show-keyboard-layout" "${mod}+F10" = "exec ${ pkgs.writeShellScript "show-keyboard-layout"
'' ''
layout=`${pkgs.xorg.setxkbmap}/bin/setxkbmap -query | ${pkgs.gnugrep}/bin/grep ^layout: | ${pkgs.gawk}/bin/awk '{ print $2 }'` layout=`${pkgs.xorg.setxkbmap}/bin/setxkbmap -query | ${pkgs.gnugrep}/bin/grep ^layout: | ${pkgs.gawk}/bin/awk '{ print $2 }'`
${pkgs.libgnomekbd}/bin/gkbd-keyboard-display -l $layout ${pkgs.libgnomekbd}/bin/gkbd-keyboard-display -l $layout
'' ''
}"; }";
# Screenshots # Screenshots
"Print" = "exec ${scrot} --focused"; "Print" = "exec ${scrot} --focused";
"${mod}+Print" = "exec ${scrot}"; # FIXME Doesn't work at least in the VM "${mod}+Print" = "exec ${scrot}"; # FIXME Doesn't work at least in the VM
"Ctrl+Print" = "exec ${pkgs.coreutils}/bin/sleep 1 && ${scrot} --select"; "Ctrl+Print" = "exec ${pkgs.coreutils}/bin/sleep 1 && ${scrot} --select";
# change focus # TODO Try using bindsym --release instead of sleep
"${mod}+h" = "focus left; ${focus}"; # change focus
"${mod}+j" = "focus down; ${focus}"; "${mod}+h" = "focus left; ${focus}";
"${mod}+k" = "focus up; ${focus}"; "${mod}+j" = "focus down; ${focus}";
"${mod}+l" = "focus right; ${focus}"; "${mod}+k" = "focus up; ${focus}";
# move focused window "${mod}+l" = "focus right; ${focus}";
"${mod}+Shift+h" = "move left; ${focus}"; # move focused window
"${mod}+Shift+j" = "move down; ${focus}"; "${mod}+Shift+h" = "move left; ${focus}";
"${mod}+Shift+k" = "move up; ${focus}"; "${mod}+Shift+j" = "move down; ${focus}";
"${mod}+Shift+l" = "move right; ${focus}"; "${mod}+Shift+k" = "move up; ${focus}";
# workspace back and forth (with/without active container) "${mod}+Shift+l" = "move right; ${focus}";
"${mod}+b" = "workspace back_and_forth; ${focus}"; # workspace back and forth (with/without active container)
"${mod}+Shift+b" = "move container to workspace back_and_forth; workspace back_and_forth; ${focus}"; "${mod}+b" = "workspace back_and_forth; ${focus}";
# Change container layout "${mod}+Shift+b" = "move container to workspace back_and_forth; workspace back_and_forth; ${focus}";
"${mod}+g" = "split h; ${focus}"; # Change container layout
"${mod}+v" = "split v; ${focus}"; "${mod}+g" = "split h; ${focus}";
"${mod}+f" = "fullscreen toggle; ${focus}"; "${mod}+v" = "split v; ${focus}";
"${mod}+s" = "layout stacking; ${focus}"; "${mod}+f" = "fullscreen toggle; ${focus}";
"${mod}+w" = "layout tabbed; ${focus}"; "${mod}+s" = "layout stacking; ${focus}";
"${mod}+e" = "layout toggle split; ${focus}"; "${mod}+w" = "layout tabbed; ${focus}";
"${mod}+Shift+space" = "floating toggle; ${focus}"; "${mod}+e" = "layout toggle split; ${focus}";
# Focus container "${mod}+Shift+space" = "floating toggle; ${focus}";
"${mod}+space" = "focus mode_toggle; ${focus}"; # Focus container
"${mod}+a" = "focus parent; ${focus}"; "${mod}+space" = "focus mode_toggle; ${focus}";
"${mod}+q" = "focus child; ${focus}"; "${mod}+a" = "focus parent; ${focus}";
# Switch to workspace "${mod}+q" = "focus child; ${focus}";
"${mod}+1" = "workspace 1; ${focus}"; # Switch to workspace
"${mod}+2" = "workspace 2; ${focus}"; "${mod}+1" = "workspace 1; ${focus}";
"${mod}+3" = "workspace 3; ${focus}"; "${mod}+2" = "workspace 2; ${focus}";
"${mod}+4" = "workspace 4; ${focus}"; "${mod}+3" = "workspace 3; ${focus}";
"${mod}+5" = "workspace 5; ${focus}"; "${mod}+4" = "workspace 4; ${focus}";
"${mod}+6" = "workspace 6; ${focus}"; "${mod}+5" = "workspace 5; ${focus}";
"${mod}+7" = "workspace 7; ${focus}"; "${mod}+6" = "workspace 6; ${focus}";
"${mod}+8" = "workspace 8; ${focus}"; "${mod}+7" = "workspace 7; ${focus}";
"${mod}+9" = "workspace 9; ${focus}"; "${mod}+8" = "workspace 8; ${focus}";
"${mod}+0" = "workspace 10; ${focus}"; "${mod}+9" = "workspace 9; ${focus}";
#navigate workspaces next / previous "${mod}+0" = "workspace 10; ${focus}";
"${mod}+Ctrl+h" = "workspace prev_on_output; ${focus}"; #navigate workspaces next / previous
"${mod}+Ctrl+l" = "workspace next_on_output; ${focus}"; "${mod}+Ctrl+h" = "workspace prev_on_output; ${focus}";
"${mod}+Ctrl+j" = "workspace prev; ${focus}"; "${mod}+Ctrl+l" = "workspace next_on_output; ${focus}";
"${mod}+Ctrl+k" = "workspace next; ${focus}"; "${mod}+Ctrl+j" = "workspace prev; ${focus}";
# Move to workspace next / previous with focused container "${mod}+Ctrl+k" = "workspace next; ${focus}";
"${mod}+Ctrl+Shift+h" = "move container to workspace prev_on_output; workspace prev_on_output; ${focus}"; # Move to workspace next / previous with focused container
"${mod}+Ctrl+Shift+l" = "move container to workspace next_on_output; workspace next_on_output; ${focus}"; "${mod}+Ctrl+Shift+h" = "move container to workspace prev_on_output; workspace prev_on_output; ${focus}";
"${mod}+Ctrl+Shift+j" = "move container to workspace prev; workspace prev; ${focus}"; "${mod}+Ctrl+Shift+l" = "move container to workspace next_on_output; workspace next_on_output; ${focus}";
"${mod}+Ctrl+Shift+k" = "move container to workspace next; workspace next; ${focus}"; "${mod}+Ctrl+Shift+j" = "move container to workspace prev; workspace prev; ${focus}";
# move focused container to workspace "${mod}+Ctrl+Shift+k" = "move container to workspace next; workspace next; ${focus}";
"${mod}+ctrl+1" = "move container to workspace 1; ${focus}"; # move focused container to workspace
"${mod}+ctrl+2" = "move container to workspace 2; ${focus}"; "${mod}+ctrl+1" = "move container to workspace 1; ${focus}";
"${mod}+ctrl+3" = "move container to workspace 3; ${focus}"; "${mod}+ctrl+2" = "move container to workspace 2; ${focus}";
"${mod}+ctrl+4" = "move container to workspace 4; ${focus}"; "${mod}+ctrl+3" = "move container to workspace 3; ${focus}";
"${mod}+ctrl+5" = "move container to workspace 5; ${focus}"; "${mod}+ctrl+4" = "move container to workspace 4; ${focus}";
"${mod}+ctrl+6" = "move container to workspace 6; ${focus}"; "${mod}+ctrl+5" = "move container to workspace 5; ${focus}";
"${mod}+ctrl+7" = "move container to workspace 7; ${focus}"; "${mod}+ctrl+6" = "move container to workspace 6; ${focus}";
"${mod}+ctrl+8" = "move container to workspace 8; ${focus}"; "${mod}+ctrl+7" = "move container to workspace 7; ${focus}";
"${mod}+ctrl+9" = "move container to workspace 9; ${focus}"; "${mod}+ctrl+8" = "move container to workspace 8; ${focus}";
"${mod}+ctrl+0" = "move container to workspace 10; ${focus}"; "${mod}+ctrl+9" = "move container to workspace 9; ${focus}";
# move to workspace with focused container "${mod}+ctrl+0" = "move container to workspace 10; ${focus}";
"${mod}+shift+1" = "move container to workspace 1; workspace 1; ${focus}"; # move to workspace with focused container
"${mod}+shift+2" = "move container to workspace 2; workspace 2; ${focus}"; "${mod}+shift+1" = "move container to workspace 1; workspace 1; ${focus}";
"${mod}+shift+3" = "move container to workspace 3; workspace 3; ${focus}"; "${mod}+shift+2" = "move container to workspace 2; workspace 2; ${focus}";
"${mod}+shift+4" = "move container to workspace 4; workspace 4; ${focus}"; "${mod}+shift+3" = "move container to workspace 3; workspace 3; ${focus}";
"${mod}+shift+5" = "move container to workspace 5; workspace 5; ${focus}"; "${mod}+shift+4" = "move container to workspace 4; workspace 4; ${focus}";
"${mod}+shift+6" = "move container to workspace 6; workspace 6; ${focus}"; "${mod}+shift+5" = "move container to workspace 5; workspace 5; ${focus}";
"${mod}+shift+7" = "move container to workspace 7; workspace 7; ${focus}"; "${mod}+shift+6" = "move container to workspace 6; workspace 6; ${focus}";
"${mod}+shift+8" = "move container to workspace 8; workspace 8; ${focus}"; "${mod}+shift+7" = "move container to workspace 7; workspace 7; ${focus}";
"${mod}+shift+9" = "move container to workspace 9; workspace 9; ${focus}"; "${mod}+shift+8" = "move container to workspace 8; workspace 8; ${focus}";
"${mod}+shift+0" = "move container to workspace 10; workspace 10; ${focus}"; "${mod}+shift+9" = "move container to workspace 9; workspace 9; ${focus}";
# move workspaces to screen (arrow keys) "${mod}+shift+0" = "move container to workspace 10; workspace 10; ${focus}";
"${mod}+ctrl+shift+Right" = "move workspace to output right; ${focus}"; # move workspaces to screen (arrow keys)
"${mod}+ctrl+shift+Left" = "move workspace to output left; ${focus}"; "${mod}+ctrl+shift+Right" = "move workspace to output right; ${focus}";
"${mod}+Ctrl+Shift+Up" = "move workspace to output above; ${focus}"; "${mod}+ctrl+shift+Left" = "move workspace to output left; ${focus}";
"${mod}+Ctrl+Shift+Down" = "move workspace to output below; ${focus}"; "${mod}+Ctrl+Shift+Up" = "move workspace to output above; ${focus}";
# i3 control "${mod}+Ctrl+Shift+Down" = "move workspace to output below; ${focus}";
"${mod}+Shift+c" = "reload"; # i3 control
"${mod}+Shift+r" = "restart"; "${mod}+Shift+c" = "reload";
"${mod}+Shift+e" = "exit"; "${mod}+Shift+r" = "restart";
}; "${mod}+Shift+e" = "exit";
}; # Modes
"${mod}+Escape" = "mode ${mode_system}";
"${mod}+r" = "mode ${mode_resize}";
"${mod}+Shift+p" = "mode ${mode_pres_main}";
};
modes = let return_bindings = {
"Return" = "mode default";
"Escape" = "mode default";
}; in
{
"${mode_system}" = {
"l" = "exec --no-startup-id ${locker}, mode default";
"e" = "exit, mode default";
"s" = "exec --no-startup-id ${locker} & ${pkgs.systemd}/bin/systemctl suspend, mode default";
"h" = "exec --no-startup-id ${locker} & ${pkgs.systemd}/bin/systemctl hibernate, mode default";
"r" = "exec --no-startup-id ${pkgs.systemd}/bin/systemctl reboot, mode default";
"p" = "exec --no-startup-id ${pkgs.systemd}/bin/systemctl poweroff -i, mode default";
} // return_bindings;
"${mode_resize}" = {
"h" = "resize shrink width 10 px or 10 ppt; ${focus}";
"j" = "resize grow height 10 px or 10 ppt; ${focus}";
"k" = "resize shrink height 10 px or 10 ppt; ${focus}";
"l" = "resize grow width 10 px or 10 ppt; ${focus}";
} // return_bindings;
"${mode_pres_main}" = {
"b" = "workspace 3, workspace 4, mode $mode_pres_sec";
"q" = "mode default";
"Return" = "mode default";
};
"${mode_pres_sec}" = {
"b" = "workspace 1, workspace 2, mode $mode_pres_main";
"q" = "mode default";
"Return" = "mode default";
};
};
};
}; };
programs = { programs = {
@ -257,7 +331,6 @@
# x11-exclusive # x11-exclusive
dunst dunst
i3lock
numlockx numlockx
# TODO urxvt-resize-font-git # TODO urxvt-resize-font-git
simplescreenrecorder simplescreenrecorder