nix #11

Manually merged
geoffrey merged 113 commits from nix into main 2023-12-09 21:43:01 +01:00
7 changed files with 181 additions and 250 deletions
Showing only changes of commit 4b8c4f29ce - Show all commits

View file

@ -15,126 +15,16 @@ new_float normal
# Hide borders
hide_edge_borders both
# change borders
#bindsym $mod+u border none
#bindsym $mod+y border pixel 2
#bindsym $mod+n border normal
# Compatibility layer for people coming from other backgrounds
bindsym Mod1+Tab exec --no-startup-id rofi -modi window -show window
bindsym Mod1+F2 exec --no-startup-id rofi -modi drun -show drun
bindsym Mod1+F4 kill
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:DejaVu Sans 8
font pango:Sans 8
# Use Mouse+$mod to drag floating windows
floating_modifier $mod
# kill focused window
bindsym $mod+z kill
bindsym button2 kill
bindsym $mod+c exec --no-startup-id rofi-pass --last-used
bindsym $mod+i exec --no-startup-id rofimoji
bindsym $mod+plus exec --no-startup-id rofi -modi ssh -show ssh
bindsym $mod+ù exec --no-startup-id rofi -modi ssh -show ssh -ssh-command '{terminal} -e {ssh-client} {host} -t "sudo -s -E"'
bindsym $mod+Tab exec --no-startup-id rofi -modi window -show window
# start program launcher
bindsym $mod+d exec --no-startup-id rofi -modi run -show run
bindsym $mod+Shift+d exec --no-startup-id rofi -modi drun -show drun
# Start Applications
# bindsym $mod+Return exec urxvtc
bindsym $mod+Return exec ~/.config/i3/terminal
bindsym $mod+Shift+Return exec urxvt
bindsym $mod+p exec thunar
bindsym $mod+m exec qutebrowser --override-restore --backend=webengine
# bindsym $mod+m exec firefox
# Volume control
bindsym XF86AudioRaiseVolume exec pactl set-sink-mute @DEFAULT_SINK@ false; exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-mute @DEFAULT_SINK@ false; exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ true
bindsym $mod+F7 exec pactl suspend-sink @DEFAULT_SINK@ 1; exec pactl suspend-sink @DEFAULT_SINK@ 0
# Re-synchronize bluetooth headset
bindsym XF86AudioPrev exec mpc prev
bindsym XF86AudioPlay exec mpc toggle
bindsym XF86AudioNext exec mpc next
bindsym $mod+F10 exec ~/.config/scripts/showKeyboardLayout
bindsym $mod+F11 exec xterm -e 'pacmixer'
bindsym $mod+F12 exec xterm -e 'pacmixer'
#Brightness control
bindsym XF86MonBrightnessDown exec xbacklight -dec 5 -time 0
bindsym XF86MonBrightnessUp exec xbacklight -inc 5 -time 0
# Screenshots
bindsym Print exec scrot --focused --exec 'mv $f ~/Screenshots/ && optipng ~/Screenshots/$f'
bindsym $mod+Print exec scrot --exec 'mv $f ~/Screenshots/ && optipng ~/Screenshots/$f'
bindsym Ctrl+Print exec sleep 1 && scrot --select --exec 'mv $f ~/Screenshots/ && optipng ~/Screenshots/$f'
focus_follows_mouse no
mouse_warping output
# change focus
bindsym $mod+h focus left; exec ~/.config/i3/focus_windows
bindsym $mod+j focus down; exec ~/.config/i3/focus_windows
bindsym $mod+k focus up; exec ~/.config/i3/focus_windows
bindsym $mod+l focus right; exec ~/.config/i3/focus_windows
## alternatively, you can use the cursor keys:
#bindsym $mod+Left focus left
#bindsym $mod+Down focus down
#bindsym $mod+Up focus up
#bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+h move left; exec ~/.config/i3/focus_windows
bindsym $mod+Shift+j move down; exec ~/.config/i3/focus_windows
bindsym $mod+Shift+k move up; exec ~/.config/i3/focus_windows
bindsym $mod+Shift+l move right; exec ~/.config/i3/focus_windows
## alternatively, you can use the cursor keys:
#bindsym $mod+Shift+Left move left
#bindsym $mod+Shift+Down move down
#bindsym $mod+Shift+Up move up
#bindsym $mod+Shift+Right move right
# workspace back and forth (with/without active container)
workspace_auto_back_and_forth no
bindsym $mod+b workspace back_and_forth; exec ~/.config/i3/focus_windows
bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth; exec ~/.config/i3/focus_windows
# split in horizontal orientation
bindsym $mod+g split h; exec ~/.config/i3/focus_windows
# split in vertical orientation
bindsym $mod+v split v; exec ~/.config/i3/focus_windows
# toggle fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle; exec ~/.config/i3/focus_windows
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking; exec ~/.config/i3/focus_windows
bindsym $mod+w layout tabbed; exec ~/.config/i3/focus_windows
bindsym $mod+e layout toggle split; exec ~/.config/i3/focus_windows
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle; exec ~/.config/i3/focus_windows
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle; exec ~/.config/i3/focus_windows
# focus the parent container
bindsym $mod+a focus parent; exec ~/.config/i3/focus_windows
# focus the child container
bindsym $mod+q focus child; exec ~/.config/i3/focus_windows
# Workspace names
set $WS1 1
@ -154,77 +44,7 @@ set $WS10 10
workspace "$WS{{ i }}" output {{ screens[(i - 1) % (screens | length)] }}
{% endfor %}
# switch to workspace
bindsym $mod+1 workspace $WS1; exec ~/.config/i3/focus_windows
bindsym $mod+2 workspace $WS2; exec ~/.config/i3/focus_windows
bindsym $mod+3 workspace $WS3; exec ~/.config/i3/focus_windows
bindsym $mod+4 workspace $WS4; exec ~/.config/i3/focus_windows
bindsym $mod+5 workspace $WS5; exec ~/.config/i3/focus_windows
bindsym $mod+6 workspace $WS6; exec ~/.config/i3/focus_windows
bindsym $mod+7 workspace $WS7; exec ~/.config/i3/focus_windows
bindsym $mod+8 workspace $WS8; exec ~/.config/i3/focus_windows
bindsym $mod+9 workspace $WS9; exec ~/.config/i3/focus_windows
bindsym $mod+0 workspace $WS10; exec ~/.config/i3/focus_windows
#navigate workspaces next / previous
bindsym $mod+Ctrl+h workspace prev_on_output; exec ~/.config/i3/focus_windows
bindsym $mod+Ctrl+l workspace next_on_output; exec ~/.config/i3/focus_windows
bindsym $mod+Ctrl+j workspace prev; exec ~/.config/i3/focus_windows
bindsym $mod+Ctrl+k workspace next; exec ~/.config/i3/focus_windows
##navigate workspaces next / previous (arrow keys)
#bindsym $mod+Ctrl+Left workspace prev_on_output
#bindsym $mod+Ctrl+Right workspace next_on_output
#bindsym $mod+Ctrl+Down workspace prev
#bindsym $mod+Ctrl+Up workspace next
# Move to workspace next / previous with focused container
bindsym $mod+Ctrl+Shift+h move container to workspace prev_on_output; workspace prev_on_output; exec ~/.config/i3/focus_windows
bindsym $mod+Ctrl+Shift+l move container to workspace next_on_output; workspace next_on_output; exec ~/.config/i3/focus_windows
bindsym $mod+Ctrl+Shift+j move container to workspace prev; workspace prev; exec ~/.config/i3/focus_windows
bindsym $mod+Ctrl+Shift+k move container to workspace next; workspace next; exec ~/.config/i3/focus_windows
## Move to workspace next / previous with focused container (arrow keys)
#bindsym $mod+Ctrl+Shift+Left move container to workspace prev_on_output; workspace prev_on_output
#bindsym $mod+Ctrl+Shift+Right move container to workspace next_on_output; workspace next_on_output
#bindsym $mod+Ctrl+Shift+Down move container to workspace prev; workspace prev
#bindsym $mod+Ctrl+Shift+Up move container to workspace next; workspace next
# move focused container to workspace
bindsym $mod+ctrl+1 move container to workspace $ws1; exec ~/.config/i3/focus_windows
bindsym $mod+ctrl+2 move container to workspace $ws2; exec ~/.config/i3/focus_windows
bindsym $mod+ctrl+3 move container to workspace $ws3; exec ~/.config/i3/focus_windows
bindsym $mod+ctrl+4 move container to workspace $ws4; exec ~/.config/i3/focus_windows
bindsym $mod+ctrl+5 move container to workspace $ws5; exec ~/.config/i3/focus_windows
bindsym $mod+ctrl+6 move container to workspace $ws6; exec ~/.config/i3/focus_windows
bindsym $mod+ctrl+7 move container to workspace $ws7; exec ~/.config/i3/focus_windows
bindsym $mod+ctrl+8 move container to workspace $ws8; exec ~/.config/i3/focus_windows
bindsym $mod+ctrl+9 move container to workspace $ws9; exec ~/.config/i3/focus_windows
bindsym $mod+ctrl+0 move container to workspace $ws10; exec ~/.config/i3/focus_windows
# move to workspace with focused container
bindsym $mod+shift+1 move container to workspace $ws1; workspace $ws1; exec ~/.config/i3/focus_windows
bindsym $mod+shift+2 move container to workspace $ws2; workspace $ws2; exec ~/.config/i3/focus_windows
bindsym $mod+shift+3 move container to workspace $ws3; workspace $ws3; exec ~/.config/i3/focus_windows
bindsym $mod+shift+4 move container to workspace $ws4; workspace $ws4; exec ~/.config/i3/focus_windows
bindsym $mod+shift+5 move container to workspace $ws5; workspace $ws5; exec ~/.config/i3/focus_windows
bindsym $mod+shift+6 move container to workspace $ws6; workspace $ws6; exec ~/.config/i3/focus_windows
bindsym $mod+shift+7 move container to workspace $ws7; workspace $ws7; exec ~/.config/i3/focus_windows
bindsym $mod+shift+8 move container to workspace $ws8; workspace $ws8; exec ~/.config/i3/focus_windows
bindsym $mod+shift+9 move container to workspace $ws9; workspace $ws9; exec ~/.config/i3/focus_windows
bindsym $mod+shift+0 move container to workspace $ws10; workspace $ws10; exec ~/.config/i3/focus_windows
## move workspaces to screen
#bindsym $mod+ctrl+shift+r move workspace to output right
#bindsym $mod+ctrl+shift+l move workspace to output left
#bindsym $mod+Ctrl+Shift+u move workspace to output above
#bindsym $mod+Ctrl+Shift+d move workspace to output below
# move workspaces to screen (arrow keys)
bindsym $mod+ctrl+shift+Right move workspace to output right; exec ~/.config/i3/focus_windows
bindsym $mod+ctrl+shift+Left move workspace to output left; exec ~/.config/i3/focus_windows
bindsym $mod+Ctrl+Shift+Up move workspace to output above; exec ~/.config/i3/focus_windows
bindsym $mod+Ctrl+Shift+Down move workspace to output below; exec ~/.config/i3/focus_windows
# Default layout = tabs, since I mostly exclusively use them
workspace_layout tabbed
@ -242,24 +62,12 @@ for_window [ title="^pdfpc.*" window_role="presentation" ] move to output right,
# switch to workspace with urgent window automatically
for_window [urgent=latest] focus
# focus urgent window
#bindsym $mod+x [urgent=latest] focus
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exit
# Set shut down, restart and locking features
set $mode_kblock Keyboard lock
mode "$mode_kblock" {
bindsym $mod+Shift+Escape mode "$mode_kblock"
}
bindsym $mod+Shift+Escape mode "$mode_kblock"
"$mod+Shift+Escape" = "mode "$mode_kblock"";
# Set shut down, restart and locking features
set $locker $HOME/.config/i3/lock
@ -276,7 +84,7 @@ mode "$mode_system" {
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Escape mode "$mode_system"
"$mod+Escape" = "mode "$mode_system"";
# resize window (you can also use the mouse for that)
mode "Resize" {
@ -302,7 +110,7 @@ mode "Resize" {
bindsym Escape mode "default"
}
bindsym $mod+r mode "Resize"
"$mod+r" = "mode "Resize"";
set $mode_pres_main "Presentation (main display)"
mode $mode_pres_main {
@ -323,10 +131,10 @@ mode $mode_pres_sec {
bindsym Return mode "default"
}
bindsym $mod+Shift+p mode $mode_pres_main
"$mod+Shift+p" = "mode $mode_pres_main";
set $mode_screen Screen setup [A] Auto [L] Load [S] Save [R] Remove [D] Default
bindsym $mod+t mode "$mode_screen"
"$mod+t" = "mode "$mode_screen"";
mode "$mode_screen" {
bindsym a exec autorandr --change --force, mode "default"
bindsym l exec ~/.config/i3/autorandrloadmenu, mode "default"
@ -340,7 +148,7 @@ mode "$mode_screen" {
}
# Screen temperature ("redness") setting
bindsym $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
mode "$mode_temp" {
bindsym r exec sct 1000
@ -358,9 +166,9 @@ mode "$mode_temp" {
# Inactivity settings
exec --no-startup-id xautolock -time 10 -locker 'xset dpms force standby' -killtime 1 -killer '$locker'
bindsym $mod+F1 exec --no-startup-id sh -c "sleep .25 && xset dpms force off"
bindsym $mod+F4 exec --no-startup-id xautolock -disable
bindsym $mod+F5 exec --no-startup-id xautolock -enable
"$mod+F1" = "exec --no-startup-id sh -c "sleep .25 && xset dpms force off"";
"$mod+F4" = "exec --no-startup-id xautolock -disable";
"$mod+F5" = "exec --no-startup-id xautolock -enable";
# Autostart applications
@ -381,24 +189,3 @@ exec --no-startup-id ~/.config/i3/batteryNotify -d # Battery state notification
{% endif %}
# exec --no-startup-id ~/.config/i3/aw_start # Activity tracker
{{ base16_schemes['schemes'][base16_scheme]['i3']['colors']['base16-' + base16_scheme + '.config'] }}
set $ignore #ff00ff
# Basic color configuration using the Base16 variables for windows and borders.
# Property Name Border BG Text Indicator Child Border
client.focused $base0B $base0B $base00 $base00 $base0B
client.focused_inactive $base02 $base02 $base05 $base02 $base02
client.unfocused $base05 $base04 $base00 $base04 $base00
client.urgent $base0F $base08 $base00 $base08 $base0F
client.placeholder $ignore $base00 $base05 $ignore $base00
client.background $base07
# I set the color of the active tab as the the background color
# of the terminal so they merge together. This is the opposite
# of what I used before: unfocused color was the terminal
# background color. Either I get used to it, or I should revert.
# bar {
# i3bar_command ~/.config/lemonbar/bar.py
# }

View file

@ -1,12 +0,0 @@
#!/bin/bash
XDT=/usr/bin/xdotool
WINDOW=`$XDT getwindowfocus`
# this brings in variables WIDTH and HEIGHT
eval `xdotool getwindowgeometry --shell $WINDOW`
TX=`expr $WIDTH / 2`
TY=`expr $HEIGHT / 2`
$XDT mousemove -window $WINDOW $TX $TY

View file

@ -1,3 +0,0 @@
#!/usr/bin/env bash
alacritty msg create-window || exec alacritty -e zsh

View file

@ -1,9 +1,168 @@
{ pkgs, ... }:
{ pkgs, config, lib, ... }:
{
xsession.windowManager.i3 = {
enable = true;
config = {
terminal = "alacritty";
# bars = []; # FIXME lemonbar
colors = let ignore = "#ff00ff"; in
with config.lib.stylix.colors.withHashtag; lib.mkForce {
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";
focus = "exec ${ pkgs.writeShellScript "i3-focus-window"
''
WINDOW=`${pkgs.xdotool}/bin/xdotool getwindowfocus`
eval `${pkgs.xdotool}/bin/xdotool getwindowgeometry --shell $WINDOW` # this brings in variables WIDTH and HEIGHT
TX=`${pkgs.coreutils}/bin/expr $WIDTH / 2`
TY=`${pkgs.coreutils}/bin/expr $HEIGHT / 2`
${pkgs.xdotool}/bin/xdotool mousemove -window $WINDOW $TX $TY
''
}";
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"
# TODO Is -e zsh required?
}";
"${mod}+Shift+Return" = "exec ${config.programs.urxvt.package}/bin/urxvt";
"${mod}+p" = "exec ${pkgs.xfce.thunar}/bin/tunar";
"${mod}+m" = "exec ${config.programs.qutebrowser.package}/bin/qutebrowser --override-restore --backend=webengine";
# TODO --backend not useful anymore
# Volume control
"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%";
"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}+F11" = "exec ${pkgs.pavucontrol}/bin/pavucontrol";
"${mod}+F12" = "exec ${pkgs.pavucontrol}/bin/pavucontrol";
# TODO Find pacmixer?
# Media control
"XF86AudioPrev" = "exec ${pkgs.mpc-cli}/bin/mpc prev";
"XF86AudioPlay" = "exec ${pkgs.mpc-cli}/bin/mpc toggle";
"XF86AudioNext" = "exec ${pkgs.mpc-cli}/bin/mpc next";
# Misc
"${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 }'`
${pkgs.libgnomekbd}/bin/gkbd-keyboard-display -l $layout
''
}";
# Screenshots
"Print" = "exec ${scrot} --focused";
"${mod}+Print" = "exec ${scrot}"; # FIXME Doesn't work at least in the VM
"Ctrl+Print" = "exec ${pkgs.coreutils}/bin/sleep 1 && ${scrot} --select";
# change focus
"${mod}+h" = "focus left; ${focus}";
"${mod}+j" = "focus down; ${focus}";
"${mod}+k" = "focus up; ${focus}";
"${mod}+l" = "focus right; ${focus}";
# move focused window
"${mod}+Shift+h" = "move left; ${focus}";
"${mod}+Shift+j" = "move down; ${focus}";
"${mod}+Shift+k" = "move up; ${focus}";
"${mod}+Shift+l" = "move right; ${focus}";
# workspace back and forth (with/without active container)
"${mod}+b" = "workspace back_and_forth; ${focus}";
"${mod}+Shift+b" = "move container to workspace back_and_forth; workspace back_and_forth; ${focus}";
# Change container layout
"${mod}+g" = "split h; ${focus}";
"${mod}+v" = "split v; ${focus}";
"${mod}+f" = "fullscreen toggle; ${focus}";
"${mod}+s" = "layout stacking; ${focus}";
"${mod}+w" = "layout tabbed; ${focus}";
"${mod}+e" = "layout toggle split; ${focus}";
"${mod}+Shift+space" = "floating toggle; ${focus}";
# Focus container
"${mod}+space" = "focus mode_toggle; ${focus}";
"${mod}+a" = "focus parent; ${focus}";
"${mod}+q" = "focus child; ${focus}";
# Switch to workspace
"${mod}+1" = "workspace 1; ${focus}";
"${mod}+2" = "workspace 2; ${focus}";
"${mod}+3" = "workspace 3; ${focus}";
"${mod}+4" = "workspace 4; ${focus}";
"${mod}+5" = "workspace 5; ${focus}";
"${mod}+6" = "workspace 6; ${focus}";
"${mod}+7" = "workspace 7; ${focus}";
"${mod}+8" = "workspace 8; ${focus}";
"${mod}+9" = "workspace 9; ${focus}";
"${mod}+0" = "workspace 10; ${focus}";
#navigate workspaces next / previous
"${mod}+Ctrl+h" = "workspace prev_on_output; ${focus}";
"${mod}+Ctrl+l" = "workspace next_on_output; ${focus}";
"${mod}+Ctrl+j" = "workspace prev; ${focus}";
"${mod}+Ctrl+k" = "workspace next; ${focus}";
# Move to workspace next / previous with focused container
"${mod}+Ctrl+Shift+h" = "move container to workspace prev_on_output; workspace prev_on_output; ${focus}";
"${mod}+Ctrl+Shift+l" = "move container to workspace next_on_output; workspace next_on_output; ${focus}";
"${mod}+Ctrl+Shift+j" = "move container to workspace prev; workspace prev; ${focus}";
"${mod}+Ctrl+Shift+k" = "move container to workspace next; workspace next; ${focus}";
# move focused container to workspace
"${mod}+ctrl+1" = "move container to workspace 1; ${focus}";
"${mod}+ctrl+2" = "move container to workspace 2; ${focus}";
"${mod}+ctrl+3" = "move container to workspace 3; ${focus}";
"${mod}+ctrl+4" = "move container to workspace 4; ${focus}";
"${mod}+ctrl+5" = "move container to workspace 5; ${focus}";
"${mod}+ctrl+6" = "move container to workspace 6; ${focus}";
"${mod}+ctrl+7" = "move container to workspace 7; ${focus}";
"${mod}+ctrl+8" = "move container to workspace 8; ${focus}";
"${mod}+ctrl+9" = "move container to workspace 9; ${focus}";
"${mod}+ctrl+0" = "move container to workspace 10; ${focus}";
# move to workspace with focused container
"${mod}+shift+1" = "move container to workspace 1; workspace 1; ${focus}";
"${mod}+shift+2" = "move container to workspace 2; workspace 2; ${focus}";
"${mod}+shift+3" = "move container to workspace 3; workspace 3; ${focus}";
"${mod}+shift+4" = "move container to workspace 4; workspace 4; ${focus}";
"${mod}+shift+5" = "move container to workspace 5; workspace 5; ${focus}";
"${mod}+shift+6" = "move container to workspace 6; workspace 6; ${focus}";
"${mod}+shift+7" = "move container to workspace 7; workspace 7; ${focus}";
"${mod}+shift+8" = "move container to workspace 8; workspace 8; ${focus}";
"${mod}+shift+9" = "move container to workspace 9; workspace 9; ${focus}";
"${mod}+shift+0" = "move container to workspace 10; workspace 10; ${focus}";
# move workspaces to screen (arrow keys)
"${mod}+ctrl+shift+Right" = "move workspace to output right; ${focus}";
"${mod}+ctrl+shift+Left" = "move workspace to output left; ${focus}";
"${mod}+Ctrl+Shift+Up" = "move workspace to output above; ${focus}";
"${mod}+Ctrl+Shift+Down" = "move workspace to output below; ${focus}";
# i3 control
"${mod}+Shift+c" = "reload";
"${mod}+Shift+r" = "restart";
"${mod}+Shift+e" = "exit";
};
};
};
@ -13,6 +172,7 @@
# Terminal
alacritty = {
# FIXME Emojis
enable = true;
settings = {
bell = {
@ -49,6 +209,15 @@
};
};
};
# Backup terminal
urxvt = {
enable = true;
package = pkgs.rxvt-unicode-emoji;
};
rofi = {
enable = true;
pass.enable = true;
};
};
home.packages = with pkgs; [
@ -77,7 +246,6 @@
# fonts
dejavu_fonts
twemoji-color-font
xfce.thunar
gnome.gedit
feh
zathura
@ -88,15 +256,10 @@
yubikey-touch-detector
# x11-exclusive
libgnomekbd # to show keyboard layout
dunst
i3lock
numlockx
rofi
rofimoji
rxvt-unicode
# TODO urxvt-resize-font-git
scrot
simplescreenrecorder
trayer
unclutter
@ -111,7 +274,7 @@
# organisation
rofi-pass # TODO Try autopass.cr
pass
thunderbird
];

View file

@ -23,6 +23,7 @@ in
};
targets.vim.enable = false; # FIXME Not compatible with nixvim for now (there's a MR)
# targets.i3.enable = false; # I prefer my own styles
};
# Fix https://nix-community.github.io/home-manager/index.html#_why_do_i_get_an_error_message_about_literal_ca_desrt_dconf_literal_or_literal_dconf_service_literal

View file

@ -34,5 +34,4 @@
# Enable sound
sound.enable = true;
hardware.pulseaudio.enable = true;
environment.systemPackages = with pkgs; [ pavucontrol ];
}

View file

@ -1,4 +0,0 @@
#!/usr/bin/bash
layout=`setxkbmap -query | grep layout | tr -s ' ' | cut -d ' ' -f2`
variant=`setxkbmap -query | grep variant | tr -s ' ' | cut -d ' ' -f2`
gkbd-keyboard-display -l ${layout}$'\t'${variant}