dotfiles/config/i3/config (view raw)
| 1 | ############# General ############# |
| 2 | # Bind $MOD(super) key |
| 3 | set $mod Mod4 |
| 4 | set $alt Mod1 |
| 5 | floating_modifier $mod |
| 6 | |
| 7 | # Set font |
| 8 | font monospace 10 |
| 9 | font pango:JetBrains Mono 10 |
| 10 | |
| 11 | # Disable window title |
| 12 | default_border pixel |
| 13 | new_float pixel |
| 14 | |
| 15 | # Borders |
| 16 | hide_edge_borders smart |
| 17 | |
| 18 | ############ Variables ########### |
| 19 | set $terminal alacritty |
| 20 | set $browser firefox |
| 21 | set $filemanager alacritty --title=ranger -e ranger |
| 22 | set $codeeditor alacritty --title=nvim -e nvim |
| 23 | set $guicode code |
| 24 | |
| 25 | ############ Autostart ############ |
| 26 | exec_always --no-startup-id exec setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" |
| 27 | exec_always --no-startup-id exec picom --experimental-backends -b |
| 28 | #exec_always --no-startup-id exec $HOME/.config/i3/bar.sh |
| 29 | exec --no-startup-id exec nitrogen --restore |
| 30 | exec --no-startup-id exec lxsession |
| 31 | #exec --no-startup-id exec $HOME/.script/autolock |
| 32 | #exec --no-startup-id exec org.telegram.desktop |
| 33 | #exec --no-startup-id exec discord |
| 34 | #exec --no-startup-id exec conky |
| 35 | #exec --no-startup-id exec redshift-gtk |
| 36 | |
| 37 | ############## WM keys ############ |
| 38 | |
| 39 | # Kill window |
| 40 | bindsym $mod+q kill |
| 41 | bindsym --release $mod+Shift+q exec xkill |
| 42 | |
| 43 | # Restart i3wm |
| 44 | bindsym $mod+Control+r restart |
| 45 | |
| 46 | # Floating layout |
| 47 | bindsym $mod+Shift+Tab floating toggle |
| 48 | |
| 49 | # Tab layout |
| 50 | bindsym $mod+Control+w layout tabbed |
| 51 | |
| 52 | # Split layout |
| 53 | bindsym $mod+Control+e layout toggle split |
| 54 | |
| 55 | # Splits |
| 56 | bindsym $mod+b split h |
| 57 | bindsym $mod+v split v |
| 58 | |
| 59 | # Scratchpad |
| 60 | bindsym $mod+Shift+grave move scratchpad |
| 61 | bindsym $mod+grave scratchpad show, floating disable |
| 62 | |
| 63 | ############## User key ########### |
| 64 | |
| 65 | # Menus |
| 66 | bindsym $mod+Shift+Return exec rofi -show drun |
| 67 | bindsym $mod+Escape exec ~/.script/dmenu/dmenu-power.sh |
| 68 | bindsym $mod+Control+u exec ~/.script/dmenu/dmenu-config-edit.sh |
| 69 | bindsym $mod+Control+i exec ~/.script/dmenu/dmenu-pass.sh |
| 70 | |
| 71 | # Apps |
| 72 | bindsym $mod+Return exec $terminal |
| 73 | bindsym $mod+Shift+w exec $browser |
| 74 | bindsym $mod+Shift+f exec $filemanager |
| 75 | bindsym $mod+Shift+e exec $codeeditor |
| 76 | bindsym $mod+Shift+c exec $guicode |
| 77 | bindsym $mod+Shift+d exec $documentationreader |
| 78 | |
| 79 | # Sceenshot |
| 80 | bindsym --release Print exec scrot -s /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png |
| 81 | bindsym --release Shift+Print exec scrot /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png |
| 82 | |
| 83 | # Lockscreen |
| 84 | bindsym $mod+Shift+z exec betterlockscreen --off 180 -t "Computer is lockerd" -l |
| 85 | |
| 86 | # Volume |
| 87 | bindsym $mod+plus exec "amixer sset Master 2%+" |
| 88 | bindsym $mod+minus exec "amixer sset Master 2%-" |
| 89 | bindsym $mod+Shift+minus exec "amixer sset Master toggle" |
| 90 | |
| 91 | ######### Window preferens ######## |
| 92 | assign [class="Alacritty"] $ws1 |
| 93 | assign [class="(?i)firefox"] $ws2 |
| 94 | assign [class="(?i)code|vscodium|subl"] $ws3 |
| 95 | assign [title="nvim"] $ws3 |
| 96 | assign [class="(?!)thunar"] $ws4 |
| 97 | assign [title="ranger"] $ws4 |
| 98 | assign [title="Joplin"] $ws5 |
| 99 | assign [class="(?i)telegram|discord"] $ws6 |
| 100 | assign [class="Spotify"] $ws9 |
| 101 | for_window [title="Google Tasks"] floating enable |
| 102 | for_window [class="(?i)telegram|discord"] layout tabbed |
| 103 | focus_on_window_activation focus |
| 104 | |
| 105 | ########## Change focus ########### |
| 106 | bindsym $mod+h focus left |
| 107 | bindsym $mod+Left focus left |
| 108 | bindsym $mod+j focus down |
| 109 | bindsym $mod+Down focus down |
| 110 | bindsym $mod+k focus up |
| 111 | bindsym $mod+Up focus up |
| 112 | bindsym $mod+l focus right |
| 113 | bindsym $mod+Right focus right |
| 114 | |
| 115 | ########## Move window ############ |
| 116 | bindsym $mod+Shift+h move left |
| 117 | bindsym $mod+Shift+Left move left |
| 118 | bindsym $mod+Shift+j move down |
| 119 | bindsym $mod+Shift+Down move down |
| 120 | bindsym $mod+Shift+k move up |
| 121 | bindsym $mod+Shift+Up move up |
| 122 | bindsym $mod+Shift+l move right |
| 123 | bindsym $mod+Shift+Right move right |
| 124 | |
| 125 | ########## Resize window ########## |
| 126 | bindsym $mod+Control+h resize shrink width 5 px or 5 ppt |
| 127 | bindsym $mod+Control+Left resize shrink width 5 px or 5 ppt |
| 128 | bindsym $mod+Control+j resize grow height 5 px or 5 ppt |
| 129 | bindsym $mod+Control+Down resize grow height 5 px or 5 ppt |
| 130 | bindsym $mod+Control+k resize shrink height 5 px or 5 ppt |
| 131 | bindsym $mod+Control+Up resize shrink height 5 px or 5 ppt |
| 132 | bindsym $mod+Control+l resize grow width 5 px or 5 ppt |
| 133 | bindsym $mod+Control+Right resize grow width 5 px or 5 ppt |
| 134 | |
| 135 | ############ Workspaces ########### |
| 136 | set $ws1 "1" |
| 137 | set $ws2 "2" |
| 138 | set $ws3 "3" |
| 139 | set $ws4 "4" |
| 140 | set $ws5 "5" |
| 141 | set $ws6 "6" |
| 142 | set $ws7 "7" |
| 143 | set $ws8 "8" |
| 144 | set $ws9 "9" |
| 145 | |
| 146 | bindsym $mod+1 workspace $ws1 |
| 147 | bindsym $mod+2 workspace $ws2 |
| 148 | bindsym $mod+3 workspace $ws3 |
| 149 | bindsym $mod+4 workspace $ws4 |
| 150 | bindsym $mod+5 workspace $ws5 |
| 151 | bindsym $mod+6 workspace $ws6 |
| 152 | bindsym $mod+7 workspace $ws7 |
| 153 | bindsym $mod+8 workspace $ws8 |
| 154 | bindsym $mod+9 workspace $ws9 |
| 155 | |
| 156 | bindsym $mod+Shift+1 move container to workspace $ws1 |
| 157 | bindsym $mod+Shift+2 move container to workspace $ws2 |
| 158 | bindsym $mod+Shift+3 move container to workspace $ws3 |
| 159 | bindsym $mod+Shift+4 move container to workspace $ws4 |
| 160 | bindsym $mod+Shift+5 move container to workspace $ws5 |
| 161 | bindsym $mod+Shift+6 move container to workspace $ws6 |
| 162 | bindsym $mod+Shift+7 move container to workspace $ws7 |
| 163 | bindsym $mod+Shift+8 move container to workspace $ws8 |
| 164 | bindsym $mod+Shift+9 move container to workspace $ws9 |
| 165 | |
| 166 | ############### Bar ############### |
| 167 | bar { |
| 168 | status_command i3status-rs ~/.config/i3/i3status-rs.toml |
| 169 | font pango:JetBrains Mono 10 |
| 170 | position top |
| 171 | colors { |
| 172 | background #262A2B |
| 173 | statusline #FFFFFF |
| 174 | separator #58676C |
| 175 | focused_workspace #008DCD #008DCD #FFFFFF |
| 176 | active_workspace #262A2B #262A2B #FFFFFF |
| 177 | inactive_workspace #262A2B #262A2B #DFDFDF |
| 178 | urgent_workspace #FF6C6B #FF6C6B #FFFFFF |
| 179 | binding_mode #2F343A #900000 #FFFFFF |
| 180 | } |
| 181 | } |
| 182 | ############## Colors ############# |
| 183 | # Class Border Backgr Text Indicator Child_border |
| 184 | client.focused #008DCD #008DCD #FFFFFF #008DCD #008DCD |
| 185 | client.focused_inactive #008DCD #002b36 #DFDFDF #002b36 #002b36 |
| 186 | client.unfocused #262A2B #262A2B #DFDFDF #262A2B #262A2B |
| 187 | client.urgent #002b36 #262A2B #FFFFFF #262A2B #262A2B |
| 188 | client.placeholder #000000 #000000 #FFFFFF #000000 #000000 |
| 189 | client.background #FFFFFF |