# i3 Config # ------------------------------------------------------------------------------------------------- # VARIABLES # # Default modifier set $mod Mod4 # Workspaces names set $wksp1 "1: Main" set $wksp2 "2: Dev" set $wksp3 "3: Social" set $wksp4 "4: Music" set $wksp5 "5: Graphics" set $wksp6 "6: Minecraft" set $wksp7 "7: Remote" set $wksp8 "8" set $wksp9 "9: Databases" set $wksp10 "10: External" # Colors (Nord's theme) set $nord0 #2E3440 set $nord1 #3B4252 set $nord2 #434C5E set $nord3 #4C566A set $nord4 #D8DEE9 set $nord5 #E5E9F0 set $nord6 #ECEFF4 set $nord7 #8FBCBB set $nord8 #88C0D0 set $nord9 #81A1C1 set $nord10 #5E81AC set $nord11 #BF616A set $nord12 #D08770 set $nord13 #EBCB8B set $nord14 #A3BE8C set $nord15 #B48EAD # Modal set $modalBorder 4 set $modalWidth 1280 set $modalHeight 800 # Font set $font DejaVu Sans Mono 9 # Terminal set $terminal /usr/bin/i3-sensible-terminal # Border default_border pixel 4 # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod # Default font font pango:$font # ------------------------------------------------------------------------------------------------- # WINDOW FOCUS/SPLIT/MOVE # # change focus (VIM mod) bindsym $mod+h focus left bindsym $mod+j focus down bindsym $mod+k focus up bindsym $mod+l focus right # move focused window bindsym $mod+Shift+h move left bindsym $mod+Shift+j move down bindsym $mod+Shift+k move up bindsym $mod+Shift+l move right # split in horizontal orientation bindsym $mod+backslash split h # split in vertical orientation bindsym $mod+minus split v # enter fullscreen mode for the focused container bindsym $mod+Mod1+f fullscreen toggle # change container layout (stacked, tabbed, toggle split) bindsym $mod+s layout stacking bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split # toggle tiling / floating bindsym $mod+Shift+space floating toggle # change focus between tiling / floating windows bindsym $mod+space focus mode_toggle # focus the parent container bindsym $mod+a focus parent # ------------------------------------------------------------------------------------------------- # WORKSPACES # workspace $wksp9 output DP-2-2 workspace $wksp10 output DP-2-2 # switch to workspace bindsym $mod+1 workspace $wksp1 bindsym $mod+2 workspace $wksp2 bindsym $mod+3 workspace $wksp3 bindsym $mod+4 workspace $wksp4 bindsym $mod+5 workspace $wksp5 bindsym $mod+6 workspace $wksp6 bindsym $mod+7 workspace $wksp7 bindsym $mod+8 workspace $wksp8 bindsym $mod+9 workspace $wksp9 bindsym $mod+0 workspace $wksp10 # switch to previous/next workspace bindsym Mod1+Control+a workspace prev_on_output bindsym Mod1+Control+d workspace next_on_output # move focused container to workspace bindsym $mod+Shift+1 move container to workspace $wksp1 bindsym $mod+Shift+2 move container to workspace $wksp2 bindsym $mod+Shift+3 move container to workspace $wksp3 bindsym $mod+Shift+4 move container to workspace $wksp4 bindsym $mod+Shift+5 move container to workspace $wksp5 bindsym $mod+Shift+6 move container to workspace $wksp6 bindsym $mod+Shift+7 move container to workspace $wksp7 bindsym $mod+Shift+8 move container to workspace $wksp8 bindsym $mod+Shift+9 move container to workspace $wksp9 bindsym $mod+Shift+0 move container to workspace $wksp10 # move focused container to previous/next workspace bindsym Mod1+Shift+Control+a move container to workspace prev bindsym Mod1+Shift+Control+d move container to workspace next # ------------------------------------------------------------------------------------------------- # RELOAD / RESTART / EXIT # bindsym $mod+Shift+c reload bindsym $mod+Shift+r restart bindsym $mod+Shift+e exec "~/Bin/i3quit.sh" # ------------------------------------------------------------------------------------------------- # RESIZE MODE # mode "resize" { bindsym h resize shrink width 10 px or 10 ppt bindsym j resize grow height 10 px or 10 ppt bindsym k resize shrink height 10 px or 10 ppt bindsym l resize grow width 10 px or 10 ppt # back to normal: Enter or Escape bindsym Return mode "default" bindsym Escape mode "default" } bindsym $mod+r mode "resize" # ------------------------------------------------------------------------------------------------- # COLORS # #colors border back text indicator child_border client.focused $nord9 $nord9 $nord0 $nord9 $nord9 client.focused_inactive $nord0 $nord0 $nord9 $nord0 $nord0 client.unfocused $nord0 $nord0 $nord9 $nord0 $nord0 client.urgent $nord13 $nord13 $nord0 $nord13 $nord13 client.placeholder $nord13 $nord13 $nord0 $nord13 $nord13 client.background $nord9 # ------------------------------------------------------------------------------------------------- # I3STATUS # #bar { # status_command py3status ## position top ## mode dock ## modifier $mod # colors { # background $nord0 # statusline $nord9 # focused_workspace $nord0 $nord9 # active_workspace $nord0 $nord9 # inactive_workspace $nord9 $nord0 # urgent_workspace $nord0 $nord13 # } #} # ------------------------------------------------------------------------------------------------- # AUTOSTART # exec --no-startup-id i3-msg 'exec blueman-applet &' #exec --no-startup-id i3-msg 'exec pasystray &' exec --no-startup-id i3-msg 'exec nm-applet &' exec --no-startup-id i3-msg 'exec nextcloud &' exec --no-startup-id i3-msg 'exec remmina -i &' exec --no-startup-id xsettingsd & exec --no-startup-id setxkbmap -option compose:rctrl & exec --no-startup-id libinput-gestures-setup start exec --no-startup-id i3-msg exec "$terminal" exec --no-startup-id i3-msg 'exec /usr/bin/firefox' exec --no-startup-id i3-msg 'exec /usr/bin/spotify' exec_always --no-startup-id ~/.config/i3/polybar.sh & # ------------------------------------------------------------------------------------------------- # WALLPAPER # exec --no-startup-id ~/Bin/wallpaper.sh # ------------------------------------------------------------------------------------------------- # Default workspace layout # workspace_layout tabbed # ------------------------------------------------------------------------------------------------- # BIND KEYS APPS # # kill focused window bindsym $mod+Shift+q kill bindsym Control+q kill # start Finder bindsym Mod1+space exec "rofi -show combi" # start a terminal bindsym $mod+Return exec "$terminal" # Lock session bindsym $mod+Mod1+l exec "~/Bin/lock.sh" # File browser bindsym $mod+f exec "$terminal -T 'File Browser' -e ranger" # Disk usage bindsym $mod+Shift+f exec "terminator -T 'Ncdu' -x ncdu ~/ --color=dark" # Find file in user directory bindsym $mod+x exec "rofi -modi 'find:~/.local/share/rofi/finder.sh' -show find" # Show top bindsym $mod+t exec "$terminal -T 'Top' -e bpytop" # Display bindsym $mod+p exec "~/Bin/screenlayoutrofi.sh" bindsym XF86Display exec ~/Bin/screenlayoutrofi.sh # Multimedia keys bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume `pactl info|grep Sink|cut -d: -f 2` +5% bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume `pactl info|grep Sink|cut -d: -f 2` -5% bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute `pactl info|grep Sink|cut -d: -f 2` toggle bindsym $mod+shift+p exec "$terminal -T 'Pulse Mixer' -e pulsemixer" # Screen brighness bindsym XF86MonBrightnessDown exec --no-startup-id ~/Bin/brightness.sh down bindsym XF86MonBrightnessUp exec --no-startup-id ~/Bin/brightness.sh up # Multimedia bindsym XF86AudioPlay exec ~/Bin/music.sh PlayPause bindsym XF86AudioPrev exec ~/Bin/music.sh Previous bindsym XF86AudioNext exec ~/Bin/music.sh Next # Take Screenshot #bindsym Print exec ~/Bin/screenshooter.sh bindsym $mod+Print exec ~/Bin/slip # Based on https://www.reddit.com/r/i3wm/comments/j8ufof/screenshot_script/ bindsym --release Shift+Print exec "scrot -s -e 'xclip -selection c -t image/png < $f && mv $f ~/Pictures/screenshots'" bindsym --release Print exec "scrot -e 'xclip -selection c -t image/png < $f && mv $f ~/Pictures/screenshots'" # Calendar bindsym $mod+c exec "$terminal -T 'Calendar' -e khal interactive" # Note bindsym $mod+n exec "zettlr" # ------------------------------------------------------------------------------------------------- # APP DEFAULT POSITION/DECORATIONS # for_window [class="Spotify"], move container to workspace $wksp4 for_window [class="X-terminal-emulator" title="Calendar"] floating enable border pixel $modalBorder resize set $modalWidth $modalHeight, move absolute position center for_window [class="X-terminal-emulator" title="File Browser"] floating enable border pixel $modalBorder resize set $modalWidth $modalHeight, move absolute position center for_window [class="X-terminal-emulator" title="Pulse Mixer"] floating enable border pixel $modalBorder resize set $modalWidth $modalHeight, move absolute position center for_window [class="X-terminal-emulator" title="Ncdu"] floating enable border pixel $modalBorder resize set $modalWidth $modalHeight, move absolute position center for_window [class="X-terminal-emulator" title="Top"] floating enable border pixel $modalBorder resize set $modalWidth $modalHeight, move absolute position center for_window [class="JViewer"] floating enable border pixel $modalBorder # ------------------------------------------------------------------------------------------------- # OTHER STUFF # # Power save mode and Auto lock screen exec --no-startup-id xset s 300 30 exec --no-startup-id xset dpms 120 exec --no-startup-id xss-lock -n ~/Bin/lock.sh