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 | # 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 kitty |
| 20 | set $browser firefox |
| 21 | set $filemanager pcmanfm |
| 22 | |
| 23 | ############ Autostart ############ |
| 24 | exec --no-startup-id exec picom -b |
| 25 | exec --no-startup-id exec nmcli radio wifi on; nmcli device wifi connect Pechenka password 24032006 name net |
| 26 | exec --no-startup-id exec redshift-gtk |
| 27 | exec --no-startup-id exec nitrogen --restore |
| 28 | exec --no-startup-id exec setxkbmap "us,ru,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" |
| 29 | exec --no-startup-id exec org.telegram.desktop |
| 30 | exec --no-startup-id exec conky |
| 31 | #exec --no-startup-id exec discord |
| 32 | exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 |
| 33 | exec_always --no-startup-id $HOME/.config/i3/bar.sh |
| 34 | |
| 35 | ############ Key bindings ######### |
| 36 | |
| 37 | ### I3 |
| 38 | # Kill focus window |
| 39 | bindsym $mod+q kill |
| 40 | # Restart i3wm |
| 41 | bindsym $mod+Control+r restart |
| 42 | # Focus the parent container |
| 43 | bindsym $mod+a focus parent |
| 44 | # Floating window |
| 45 | bindsym $mod+Shift+space floating toggle |
| 46 | # Splits |
| 47 | bindsym $mod+b split h |
| 48 | bindsym $mod+v split v |
| 49 | # Change container layout(stacked, tabbed, toggle split) |
| 50 | bindsym $mod+s layout stacking |
| 51 | bindsym $mod+w layout tabbed |
| 52 | bindsym $mod+e layout toggle split |
| 53 | # Scratchpad |
| 54 | bindsym $mod+Shift+grave move scratchpad |
| 55 | bindsym $mod+grave scratchpad show, floating disable |
| 56 | |
| 57 | ### Launchers |
| 58 | bindsym $mod+p exec "dmenu_run -h 24 -p Run" |
| 59 | bindsym $mod+Shift+Return exec "rofi -show drun -drun-display-format '{name}'" |
| 60 | bindsym $mod+Escape exec "~/.script/dmenu/dmenu-power.sh" |
| 61 | bindsym $mod+Control+u exec ~/.script/dmenu/dmenu-config-edit.sh |
| 62 | bindsym $mod+Control+i exec passmenu -h 24 -p Passwords |
| 63 | bindsym $alt+Tab exec "rofi -show window -show-icons" |
| 64 | bindsym $mod+$alt+t exec $terminal nvim .todo |
| 65 | |
| 66 | |
| 67 | ### Applications |
| 68 | bindsym $mod+Return exec $terminal |
| 69 | bindsym $mod+F2 exec $browser |
| 70 | bindsym $mod+F3 exec gnvim |
| 71 | bindsym $mod+F4 exec $filemanager |
| 72 | bindsym --release $mod+Shift+Escape exec xkill |
| 73 | |
| 74 | |
| 75 | ### Sceenshot |
| 76 | bindsym --release Print exec "scrot -s /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png" |
| 77 | bindsym --release Shift+Print exec "scrot /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png" |
| 78 | |
| 79 | |
| 80 | ### Volume |
| 81 | bindsym $mod+plus exec "pactl set-sink-volume alsa_output.pci-0000_00_1b.0.analog-stereo +5%" |
| 82 | bindsym $mod+minus exec "pactl set-sink-volume alsa_output.pci-0000_00_1b.0.analog-stereo -5%" |
| 83 | bindsym $mod+Shift+minus exec "pactl set-sink-mute alsa_output.pci-0000_00_1b.0.analog-stereo toggle" |
| 84 | |
| 85 | ######### Window preferens ######## |
| 86 | #assign [class="Kitty"] $ws1 |
| 87 | #assign [class="(?i)chromium|firefox|qutebrowser"] $ws2 |
| 88 | #assign [class="(?i)subl|code|emacs"] $ws3 |
| 89 | #assign [class="(?i)thunar"] $ws4 |
| 90 | #assign [title="Notable|Simplenote"] $ws5 |
| 91 | assign [class="(?i)telegram|discord|viber"] $ws6 |
| 92 | assign [title="KeePassXC"] $ws7 |
| 93 | #for_window [title="Ranger_FM"] move to workspace $ws4 |
| 94 | #for_window [class="Spotify"] move to workspace $ws9 |
| 95 | for_window [class="(?i)mousepad"] floating enable |
| 96 | for_window [class="(?i)lxappearance|qt5ct"] floating enable |
| 97 | for_window [class="(?i)nitrogen"] floating enable |
| 98 | for_window [class="(?i)virtualbox"] floating enable |
| 99 | #focus_on_window_activation focus |
| 100 | |
| 101 | ############## Gaps ############### |
| 102 | #gaps inner 4 |
| 103 | #smart_gaps on |
| 104 | |
| 105 | ##### Change containet 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 focused container ###### |
| 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 | ############ Workspaces ########### |
| 126 | set $ws1 "1" |
| 127 | set $ws2 "2" |
| 128 | set $ws3 "3" |
| 129 | set $ws4 "4" |
| 130 | set $ws5 "5" |
| 131 | set $ws6 "6" |
| 132 | set $ws7 "7" |
| 133 | set $ws8 "8" |
| 134 | set $ws9 "9" |
| 135 | |
| 136 | bindsym $mod+1 workspace $ws1 |
| 137 | bindsym $mod+2 workspace $ws2 |
| 138 | bindsym $mod+3 workspace $ws3 |
| 139 | bindsym $mod+4 workspace $ws4 |
| 140 | bindsym $mod+5 workspace $ws5 |
| 141 | bindsym $mod+6 workspace $ws6 |
| 142 | bindsym $mod+7 workspace $ws7 |
| 143 | bindsym $mod+8 workspace $ws8 |
| 144 | bindsym $mod+9 workspace $ws9 |
| 145 | |
| 146 | bindsym $mod+Shift+1 move container to workspace $ws1 |
| 147 | bindsym $mod+Shift+2 move container to workspace $ws2 |
| 148 | bindsym $mod+Shift+3 move container to workspace $ws3 |
| 149 | bindsym $mod+Shift+4 move container to workspace $ws4 |
| 150 | bindsym $mod+Shift+5 move container to workspace $ws5 |
| 151 | bindsym $mod+Shift+6 move container to workspace $ws6 |
| 152 | bindsym $mod+Shift+7 move container to workspace $ws7 |
| 153 | bindsym $mod+Shift+8 move container to workspace $ws8 |
| 154 | bindsym $mod+Shift+9 move container to workspace $ws9 |
| 155 | |
| 156 | ############## Modes ############## |
| 157 | bindsym $mod+r mode "resize" |
| 158 | bindsym $mod+g mode "gaps" |
| 159 | mode "resize" { |
| 160 | bindsym h resize shrink width 10 px or 10 ppt |
| 161 | bindsym j resize grow height 10 px or 10 ppt |
| 162 | bindsym k resize shrink height 10 px or 10 ppt |
| 163 | bindsym l resize grow width 10 px or 10 ppt |
| 164 | |
| 165 | bindsym Left resize shrink width 10 px or 10 ppt |
| 166 | bindsym Down resize grow height 10 px or 10 ppt |
| 167 | bindsym Up resize shrink height 10 px or 10 ppt |
| 168 | bindsym Right resize grow width 10 px or 10 ppt |
| 169 | |
| 170 | bindsym Return mode "default" |
| 171 | bindsym Escape mode "default" |
| 172 | bindsym $mod+r mode "default" |
| 173 | } |
| 174 | mode "gaps" { |
| 175 | bindsym plus gaps inner current plus 2 |
| 176 | bindsym minus gaps inner current minus 2 |
| 177 | bindsym 0 gaps inner current set 0 |
| 178 | |
| 179 | bindsym Shift+plus gaps inner all plus 4 |
| 180 | bindsym Shift+minus gaps inner all minus 4 |
| 181 | bindsym Shift+0 gaps inner all set 0 |
| 182 | |
| 183 | bindsym Return mode "default" |
| 184 | bindsym Escape mode "default" |
| 185 | bindsym $mod+g mode "default" |
| 186 | } |
| 187 | |
| 188 | ############## Colors ############# |
| 189 | # Class Border Backgr Text Indicator Child_border |
| 190 | client.focused #268bd2 #268bd2 #dfdfdf #268bd2 #268bd2 |
| 191 | client.focused_inactive #002b36 #002b36 #dfdfdf #002b36 #002b36 |
| 192 | client.unfocused #002b36 #002b36 #586e75 #002b36 #002b36 |
| 193 | client.urgent #002b36 #002b36 #ffffff #002b36 #002b36 |
| 194 | client.placeholder #000000 #000000 #ffffff #000000 #000000 |
| 195 | client.background #ffffff |