config (9016B)
# vim: set ft=i3config
## Some shortcuts and definitions
set $ig 1
set $og 1
set $term --no-startup-id $TERMINAL
set $mod Mod4
set $shutdown sudo -A shutdown -h now
set $reboot sudo -A reboot
set $netrefresh --no-startup-id sudo -A systemctl restart NetworkManager
set $hibernate sudo -A systemctl suspend
## Gaps
for_window [class="^.*"] border pixel 2
gaps inner $ig
gaps outer $og
# General dropdown window traits. The order can matter.
for_window [instance="dropdown_*"] floating enable
for_window [instance="dropdown_*"] move scratchpad
for_window [instance="dropdown_*"] sticky enable
for_window [instance="dropdown_*"] scratchpad show
for_window [instance="dropdown_tmuxdd"] resize set 625 450
for_window [instance="dropdown_dropdowncalc"] resize set 800 300
for_window [instance="dropdown_tmuxdd"] border pixel 3
for_window [instance="dropdown_dropdowncalc"] border pixel 2
for_window [instance="dropdown_*"] move position center
bar {
font pango:mono 10 #, EmojiOne Color 10
status_command i3blocks
position top
mode dock
modifier None
bindsym button4 nop
bindsym button5 nop
}
## Non-Letter Key Bindings
bindsym $mod+Return exec $term
bindsym $mod+Shift+Return exec $term
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
bindsym $mod+Escape workspace prev
bindsym $mod+Shift+Escape exec --no-startup-id prompt "Exit i3?" "i3 exit"
bindsym $mod+grave exec --no-startup-id dmenuemoji
#STOP/HIDE EVERYTHING:
bindsym $mod+Shift+Delete exec --no-startup-id pulsemixer --mute ; exec --no-startup-id ${MPC} pause && pkill -RTMIN+10 i3blocks ; exec --no-startup-id pausempv; workspace 0; exec $term -e htop ; exec $term -e lf
## Letter Key Bindings
# unassorted little shortcuts to quickly get to commonly used progs and some workspace management
#quit and force quit
bindsym $mod+q [con_id="__focused__" instance="^(?!dropdown_).*$"] kill
bindsym $mod+Shift+q [con_id="__focused__" instance="^(?!dropdown_).*$"] exec --no-startup-id kill -9 $(xdotool getwindowfocus getwindowpid)
#browser, network settings
bindsym $mod+w exec --no-startup-id $BROWSER
bindsym $mod+Shift+w exec $term -e nmtui
#bookmarks
bindsym $mod+e exec xdotool type $(cat $HOME/.local/share/bookmarks/bookmarks | dmenu -i -l 50)
bindsym $mod+Shift+e exec --no-startup-id $HOME/.local/bin/addbookmark
# work and test vms
bindsym $mod+r exec --no-startup-id VBoxManage startvm debian-work; workspace $ws9
bindsym $mod+Shift+r exec --no-startup-id VBoxManage startvm debian-test; workspace $ws10
bindsym $mod+t split toggle
bindsym $mod+Shift+t gaps inner current set $ig; gaps outer current set $og
bindsym $mod+y gaps inner minus 1
bindsym $mod+Shift+y exec --no-startup-id i3resize left
bindsym $mod+u exec --no-startup-id sudo -A unetbootin
bindsym $mod+Shift+u exec --no-startup-id i3resize down
bindsym $mod+i exec $term -e htop
bindsym $mod+Shift+i exec --no-startup-id i3resize up
bindsym $mod+o sticky toggle
bindsym $mod+Shift+o exec --no-startup-id i3resize right
bindsym $mod+p exec --no-startup-id ${MPC} toggle
bindsym $mod+Shift+p exec --no-startup-id ${MPC} pause
#pulsemixer and alsamixer
bindsym $mod+a exec $term -a alsamixer
bindsym $mod+Shift+a exec $term -e pulsemixer
bindsym $mod+s gaps inner current plus 1
bindsym $mod+Shift+s exec --no-startup-id /usr/bin/steam; workspace $ws8
bindsym $mod+d exec --no-startup-id dmenu_run
bindsym $mod+Shift+d gaps inner current set 0; gaps outer current set 0
bindsym $mod+f fullscreen toggle
bindsym $mod+Shift+f exec --no-startup-id nemo; workspace $ws4
bindsym $mod+g workspace prev
bindsym $mod+Shift+g exec --no-startup-id gimp; workspace $ws5
bindsym $mod+h focus left
bindsym $mod+Shift+h move left 30
bindsym $mod+Ctrl+h move workspace to output left
bindsym $mod+j focus down
bindsym $mod+Shift+j move down 30
bindsym $mod+Ctrl+j move workspace to output down
bindsym $mod+k focus up
bindsym $mod+Shift+k move up 30
bindsym $mod+Ctrl+k move workspace to output up
bindsym $mod+l focus right
bindsym $mod+Shift+l move right 30
bindsym $mod+Ctrl+l move workspace to output right
bindsym $mod+z gaps outer current plus 1
bindsym $mod+Shift+z gaps outer current minus 1
#lock and lock menu + music pauce
bindsym --release $mod+x exec --no-startup-id ${MPC} pause; exec --no-startup-id slock
bindsym $mod+Shift+x exec --no-startup-id ${MPC} pause; exec --no-startup-id dmenupoweroff
bindsym $mod+c exec $term -e calcurse
#bindsym $mod+Shift+c exec --no-startup-id <command>
#vim and virtualbox
bindsym $mod+v exec --no-startup-id $term -e $EDITOR
bindsym $mod+Shift+v exec --no-startup-id /usr/bin/virtualbox; workspace $ws9
bindsym $mod+b bar mode toggle
bindsym $mod+Shift+b floating toggle; sticky toggle; exec --no-startup-id hover left
bindsym $mod+n exec $term -e newsboat && pkill -RTMIN+6 i3blocks
bindsym $mod+Shift+n floating toggle; sticky toggle; exec --no-startup-id hover right
#mpv pause/unpause
bindsym $mod+m exec --no-startup-id pausempv
bindsym $mod+Shift+m exec --no-startup-id resumempv
#This is like alt tabbing, but with workspces
bindsym $mod+Tab workspace back_and_forth
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10
for_window [class="Pinentry"] sticky enable
for_window [class="sent"] border pixel 0px
for_window [title="GIMP Startup"] move workspace $ws5
for_window [class="Gimp"] move workspace $ws5
for_window [window_role="GtkFileChooserDialog"] resize set 800 600
for_window [window_role="GtkFileChooserDialog"] move position center
for_window [title="Default - Wine desktop"] floating enable
# Function buttons for quick access to important stuff
bindsym $mod+F1 exec --no-startup-id dmenupoweroff
bindsym $mod+F2 exec --no-startup-id dmenumusic
bindsym $mod+F3 exec --no-startup-id dmenusearch
bindsym $mod+F4 exec --no-startup-id twindow
bindsym $mod+F5 exec --no-startup-id showclip
bindsym $mod+F6 exec --no-startup-id connectphone -c
bindsym $mod+F7 exec --no-startup-id connectphone -d
#bindsym $mod+F8 exec --no-startup-id <command>
#bindsym $mod+F9 exec --no-startup-id <command>
#bindsym $mod+F10 exec --no-startup-id <command>
bindsym $mod+F11 exec --no-startup-id $netrefresh
bindsym $mod+F12 exec $term -e nmtui
#bindsym $mod+Shift+F1 exec --no-startup-id <command>
# Extra keys for workspace management
bindsym $mod+Left focus left
bindsym $mod+Shift+Left move left
bindsym $mod+Ctrl+Left move workspace to output left
bindsym $mod+Down focus down
bindsym $mod+Shift+Down move down
bindsym $mod+Ctrl+Down move workspace to output down
bindsym $mod+Up focus up
bindsym $mod+Shift+Up move up
bindsym $mod+Ctrl+Up move workspace to output up
bindsym $mod+Right focus right
bindsym $mod+Shift+Right move right
bindsym $mod+Ctrl+Right move workspace to output right
# Volume keys
bindsym $mod+plus exec --no-startup-id amixer -q -D pulse sset Master 1%+
bindsym $mod+Shift+plus exec --no-startup-id amixer -q -D pulse sset Master 10%+
bindsym $mod+minus exec --no-startup-id amixer -q -D pulse sset Master 1%-
bindsym $mod+Shift+minus exec --no-startup-id amixer -q -D pulse sset Master 10%-
bindsym $mod+BackSpace exec --no-startup-id amixer -D pulse set Master toggle
# Skiping an mpd song
bindsym $mod+Ctrl+minus exec --no-startup-id ${MPC} prev
bindsym $mod+Ctrl+plus exec --no-startup-id ${MPC} next
# For advancing forward/backward in an mpd song
bindsym $mod+bracketleft exec --no-startup-id ${MPC} seek -10
bindsym $mod+Shift+bracketleft exec --no-startup-id ${MPC} seek -120
bindsym $mod+bracketright exec --no-startup-id ${MPC} seek +10
bindsym $mod+Shift+bracketright exec --no-startup-id ${MPC} seek +120
# For screenshots (with maim)
bindsym $mod+Print exec --no-startup-id maim $HOME/Pictures/pic-full-"$(date '+%y%m%d-%H%M-%S').png"
bindsym $mod+Shift+Print exec --no-startup-id $HOME/.local/bin/maim-config
#lock screen when not in use
exec "xautolock -detectsleep -time 20 -locker \"slock\""