config 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  1. ##### My (demuredemeanor) i3 config
  2. # Uses tabstop=4; shiftwidth=4 tabs; foldmarker={{{,}}};
  3. # https://notabug.org/demure/dotfiles/
  4. # legacy repo http://github.com/demure/dotfiles
  5. # vim: set filetype=i3config:
  6. ## Set prefix to Super
  7. set $mod Mod4
  8. # Font for window titles. Will also be used by the bar unless a different font
  9. # is used in the bar {} block below.
  10. font pango:monospace 8
  11. # This font is widely installed, provides lots of unicode glyphs, right-to-left
  12. # text rendering and scalability on retina/hidpi displays (thanks to pango).
  13. #font pango:DejaVu Sans Mono 8
  14. ## If you try to go to the same workspace you are on, jump to last workspace
  15. workspace_auto_back_and_forth yes
  16. ### Variables ### {{{
  17. set $Locker i3lock -e -c 2E3436 && sleep 1
  18. ### Workspace Names ### {{{
  19. set $ws1 1:
  20. set $ws2 2:
  21. set $ws3 3:
  22. set $ws4 4
  23. set $ws5 5
  24. set $ws6 6
  25. set $ws7 7
  26. set $ws8 8
  27. set $ws9 9
  28. set $ws10 10
  29. ### End Workspace Names ### }}}
  30. ### End Variables ### }}}
  31. ### Bindings ### {{{
  32. ### i3 Keys ### {{{
  33. ## reload the configuration file
  34. bindsym $mod+Shift+c reload
  35. ## restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  36. bindsym $mod+Shift+r exec i3-msg restart
  37. ## exit i3 (logs you out of your X session)
  38. bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
  39. ### End i3 Keys ### }}}
  40. ### Workspace Bindings ### {{{
  41. ### Last Workspace ### {{{
  42. ## Move to last workspace
  43. bindsym $mod+Tab workspace back_and_forth
  44. ## Send container to last workspace
  45. bindsym $mod+Shift+Tab move container to workspace back_and_forth
  46. ### End Last Workspace ### }}}
  47. ### Switch Workspace ### {{{
  48. ## switch to workspace
  49. bindsym $mod+1 workspace $ws1
  50. bindsym $mod+2 workspace $ws2
  51. bindsym $mod+3 workspace $ws3
  52. bindsym $mod+4 workspace $ws4
  53. bindsym $mod+5 workspace $ws5
  54. bindsym $mod+6 workspace $ws6
  55. bindsym $mod+7 workspace $ws7
  56. bindsym $mod+8 workspace $ws8
  57. bindsym $mod+9 workspace $ws9
  58. bindsym $mod+0 workspace $ws10
  59. ### End Switch Workspace ### }}}
  60. ### Send Workspace ### {{{
  61. ## move focused container to workspace
  62. bindsym $mod+Shift+1 move container to workspace $ws1
  63. bindsym $mod+Shift+2 move container to workspace $ws2
  64. bindsym $mod+Shift+3 move container to workspace $ws3
  65. bindsym $mod+Shift+4 move container to workspace $ws4
  66. bindsym $mod+Shift+5 move container to workspace $ws5
  67. bindsym $mod+Shift+6 move container to workspace $ws6
  68. bindsym $mod+Shift+7 move container to workspace $ws7
  69. bindsym $mod+Shift+8 move container to workspace $ws8
  70. bindsym $mod+Shift+9 move container to workspace $ws9
  71. bindsym $mod+Shift+0 move container to workspace $ws10
  72. ### End Send Workspace ### }}}
  73. ### Move Workspace Different Monitor ### {{{
  74. ## Move the current workspace to the next output
  75. bindsym $mod+Mod1+Left move workspace to output Left
  76. bindsym $mod+Mod1+Down move workspace to output Down
  77. bindsym $mod+Mod1+Up move workspace to output Up
  78. bindsym $mod+Mod1+Right move workspace to output right
  79. ### End Move Workspace Different Monitor ### }}}
  80. ### Cycle Through Workspaces ### {{{
  81. ## Added for touchegg
  82. bindsym $mod+u workspace prev
  83. bindsym $mod+o workspace next
  84. ### End Cycle Through Workspaces ### }}}
  85. ### End Workspace Bindings ### }}}
  86. ### Window Bindings ### {{{
  87. ## kill focused window
  88. bindsym $mod+Shift+q kill
  89. ### Sticky Windows, good for picture in picture (shows floating window on all workspaces)
  90. bindsym $mod+Shift+s sticky toggle
  91. ### Split Orientation ### {{{
  92. ## split in horizontal orientation
  93. bindsym $mod+h split h
  94. ## split in vertical orientation
  95. bindsym $mod+v split v
  96. ### End Split Orientation ### }}}
  97. ### End Window Bindings ### }}}
  98. ### Focus Bindings ### {{{
  99. ## enter fullscreen mode for the focused container
  100. bindsym $mod+f fullscreen toggle
  101. ## enter fullscreen mode over all monitors
  102. bindsym $mod+Shift+f fullscreen toggle global
  103. ### Tile / Float ### {{{
  104. ## toggle tiling / floating
  105. bindsym $mod+Shift+space floating toggle
  106. ## change focus between tiling / floating windows
  107. bindsym $mod+space focus mode_toggle
  108. ### End Tile / Float ### }}}
  109. ### Change Focus ### {{{
  110. ## change focus
  111. bindsym $mod+j focus left
  112. bindsym $mod+k focus down
  113. bindsym $mod+l focus up
  114. bindsym $mod+semicolon focus right
  115. ## alternatively, you can use the cursor keys:
  116. bindsym $mod+Left focus left
  117. bindsym $mod+Down focus down
  118. bindsym $mod+Up focus up
  119. bindsym $mod+Right focus right
  120. ### End Change Focus ### }}}
  121. ### Move Focused Window ### {{{
  122. ## move focused window
  123. bindsym $mod+Shift+j move left
  124. bindsym $mod+Shift+k move down
  125. bindsym $mod+Shift+l move up
  126. bindsym $mod+Shift+semicolon move right
  127. ## alternatively, you can use the cursor keys:
  128. bindsym $mod+Shift+Left move left
  129. bindsym $mod+Shift+Down move down
  130. bindsym $mod+Shift+Up move up
  131. bindsym $mod+Shift+Right move right
  132. ### End Move Focused Window ### }}}
  133. ### Focus Urgent Workspace {{{
  134. bindsym $mod+x [urgent=latest] focus
  135. ### End Focus Urgent Workspace ###}}}
  136. ### End Focus Bindings ### }}}
  137. ### Container Bindings ### {{{
  138. ### Change Container Layout ### {{{
  139. ## change container layout (stacked, tabbed, toggle split)
  140. bindsym $mod+s layout stacking
  141. bindsym $mod+w layout tabbed
  142. bindsym $mod+e layout toggle split
  143. ### End Change Container Layout ### }}}
  144. ### Parent / Child Container ### {{{
  145. ## focus the parent container
  146. bindsym $mod+a focus parent
  147. ## focus the child container
  148. bindsym $mod+d focus child
  149. ### End Parent / Child Container ### }}}
  150. ### End Container Bindings ### }}}
  151. ### Mouse Bindings ### {{{
  152. ## Use Mouse+$mod to drag floating windows to their wanted position
  153. floating_modifier $mod
  154. ## Seems like this only works on border or title bar...
  155. #bindsym --whole-window --border button6 workspace prev
  156. #bindsym --whole-window --border button7 workspace next
  157. ## Removed --whole-window as it started working, and touchpoint scrolling affected.
  158. bindsym --border button6 workspace prev
  159. bindsym --border button7 workspace next
  160. ### End Mouse Bindings ### }}}
  161. ### Scratch Pad ### {{{
  162. ## Make the currently focused window a scratchpad
  163. bindsym $mod+Shift+minus move scratchpad
  164. ## Show the first scratchpad window
  165. bindsym $mod+minus scratchpad show
  166. ### End Scratch Pad ### }}}
  167. ### User Interface Bindings ### {{{
  168. ### Brightness Bindings ### {{{
  169. bindsym XF86MonBrightnessUp exec xbacklight -inc 5 ## Increase screen brightness
  170. bindsym Shift+XF86MonBrightnessUp exec xbacklight -inc 1 ## Fine increase screen brightness
  171. bindsym XF86MonBrightnessDown exec xbacklight -dec 5 ## Decrease screen brightness
  172. bindsym Shift+XF86MonBrightnessDown exec xbacklight -dec 1 ## Fine decrease screen brightness
  173. bindsym $mod+XF86MonBrightnessUp exec xbacklight -set 100 ## Set max screen brightness
  174. bindsym $mod+XF86MonBrightnessDown exec xbacklight -set 1 ## Set min screen brightness
  175. ### End Brightness Bindings ### }}}
  176. ### Pulse Audio Controls ### {{{
  177. ## Softvol increase possible with pactl
  178. ## NOTE: due to HDMI output connect/disconnects causing sink number changes, sink '0' is now <strike>a command substitution<strike> @DEFAULT_SINK@
  179. ## NOTE: My thinkpad usb c gen 2 dock needs something to run the following to update the default sink:
  180. ## pactl set-default-sink $(pactl list short sinks | awk '/RUNNING/ {print $1}')
  181. bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% ## Increase sound volume
  182. bindsym Shift+XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +1% ## Fine increase sound volume
  183. bindsym $mod+XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ 100% ## Set volume to "100%"
  184. bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% ## Decrease sound volume
  185. bindsym Shift+XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -1% ## Fine decrease sound volume
  186. bindsym $mod+XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ 50% ## Set volume to "50%"
  187. bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle ## Mute sound
  188. bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle ## Toggle default mic mute
  189. bindsym $mod+XF86AudioMicMute exec --no-startup-id pactl list short sources | awk '/input.*RUNNING/ {system("pactl set-source-mute " $1 " toggle")}' ## Find and mute mics
  190. ## push to talk
  191. bindsym $mod+z exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ 0 ## Hold to talk
  192. bindsym --release $mod+z exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ 1 ## Release to mute
  193. bindsym $mod+Shift+z exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ 0 ## Unmute
  194. bindsym XF86PickupPhone exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ 0 ## Hold to talk
  195. bindsym --release XF86PickupPhone exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ 1 ## Release to mute
  196. bindsym XF86Go exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ 0 ## Hold to talk, x1carb11
  197. bindsym --release XF86Go exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ 1 ## Release to mute, x1carb11
  198. ### End Pulse Audio ### }}}
  199. ### Toggle redshift ### {{{
  200. bindsym $mod+slash exec --no-startup-id pkill -USR1 redshift
  201. ### End Toggle redshift ### }}}
  202. ### End User Interface Bindings ### }}}
  203. ### Program Call Bindings ### {{{
  204. ### Launch Term ### {{{
  205. ## start a terminal
  206. bindsym $mod+Return exec kitty
  207. ## Backup term of urxvt
  208. bindsym $mod+Shift+Return exec urxvt
  209. ## Emergency backup term
  210. bindsym $mod++mod1+Return exec i3-sensible-terminal
  211. ### End Launch Term ### }}}
  212. ### Screen Shots ### {{{
  213. bindsym $mod+Home exec --no-startup-id exec scrot -m -F '%Y%m%d-%H%M%S_$wx$h_screen.png' -e 'mv $f ~/temp/' ## Backup binding
  214. bindsym Print exec --no-startup-id exec scrot -m -F '%Y%m%d-%H%M%S_$wx$h_screen.png' -e 'mv $f ~/temp/'
  215. #bindsym XF86Explorer exec --no-startup-id exec scrot -m -F '%Y%m%d-%H%M%S_$wx$h_screen.png' -e 'mv $f ~/temp/' ## x260
  216. #bindsym XF86Favorites exec --no-startup-id exec scrot -m -F '%Y%m%d-%H%M%S_$wx$h_screen.png' -e 'mv $f ~/temp/' ## x270
  217. bindsym XF86Display exec --no-startup-id exec scrot -m -F '%Y%m%d-%H%M%S_$wx$h_screen.png' -e 'mv $f ~/temp/' ## xnano
  218. bindsym XF86Mail exec --no-startup-id exec scrot -m -F '%Y%m%d-%H%M%S_$wx$h_screen.png' -e 'mv $f ~/temp/' ## sofle keyboard
  219. ## Note: you need to click on the window, after key combo, to capture it.
  220. ## Note: Needs to have startup ip, as interacts with GUI
  221. bindsym $mod+Shift+Home exec --no-startup-id scrot -s -F '%Y%m%d-%H%M%S_$wx$h_screen.png' -e 'mv $f ~/temp/' ## Backup binding
  222. bindsym Shift+Print exec --no-startup-id scrot -s -F '%Y%m%d-%H%M%S_$wx$h_screen.png' -e 'mv $f ~/temp/'
  223. #bindsym Shift+XF86Explorer exec --no-startup-id scrot -s -F '%Y%m%d-%H%M%S_$wx$h_screen.png' -e 'mv $f ~/temp/' ## x260
  224. #bindsym Shift+XF86Favorites exec --no-startup-id scrot -s -F '%Y%m%d-%H%M%S_$wx$h_screen.png' -e 'mv $f ~/temp/' ## x270
  225. bindsym Shift+XF86Display exec --no-startup-id scrot -s -F '%Y%m%d-%H%M%S_$wx$h_screen.png' -e 'mv $f ~/temp/' ## xnano
  226. bindsym Shift+XF86Mail exec --no-startup-id scrot -s -F '%Y%m%d-%H%M%S_$wx$h_screen.png' -e 'mv $f ~/temp/' ## sofle keyboard
  227. bindsym Control+XF86Mail exec --no-startup-id scrot -s -F '%Y%m%d-%H%M%S_$wx$h_screen.png' -e 'mv $f ~/temp/' ## sofle keyboard
  228. ### End Screen Shots ### }}}
  229. ### Rofi Bindings ### {{{
  230. ## Use rofi, it's better
  231. ## start dmenu (a program launcher)
  232. #bindsym $mod+d exec dmenu_run
  233. bindsym $mod+p exec rofi -show run
  234. bindsym XF86Search exec rofi -show run ## sofle keyboard
  235. ### rofi-pass binding
  236. bindsym $mod+Shift+p exec rofi-pass
  237. bindsym Shift+XF86Search exec rofi-pass ## sofle keyboard
  238. bindsym Control+XF86Search exec rofi-pass ## sofle keyboard
  239. ### End Rofi Bindings ### }}}
  240. ### External IP Toggle For i3 polybar ### {{{
  241. ## awk -v TEMP=/tmp/i3_polybar_ip_toggle_${USER} 'BEGIN {{FILE=getline < TEMP < 0 ? "0" : "1"} {if($0==1){STATE=1} else {STATE=0}} {if(STATE==0){system("echo 1 > "TEMP)} else {system("echo 0 > "TEMP)}} }'
  242. #bindsym XF86LaunchA exec awk -v TEMP=/tmp/i3_polybar_ip_toggle_${USER} 'BEGIN {{FILE=getline < TEMP < 0 ? "0" : "1"} {if($0==1){STATE=1} else {STATE=0}} {if(STATE==0){system("echo 1 > "TEMP)} else {system("echo 0 > "TEMP)}} }' ## x260
  243. #bindsym XF86Display exec awk -v TEMP=/tmp/i3_polybar_ip_toggle_${USER} 'BEGIN {{FILE=getline < TEMP < 0 ? "0" : "1"} {if($0==1){STATE=1} else {STATE=0}} {if(STATE==0){system("echo 1 > "TEMP)} else {system("echo 0 > "TEMP)}} }' ## x270
  244. ### End External IP For i3 polybar ### }}}
  245. ### Clipster Clipboard Manager ### {{{
  246. bindsym $mod+c exec clipster -sc
  247. ### End Clipster ### }}}
  248. ### End Program Call Bindings ### }}}
  249. ### Misc Bindings ### {{{
  250. ### End Misc Bindings ### }}}
  251. ### End Bindings ### }}}
  252. ### i3 Modes ### {{{
  253. ### System Control Mode ### {{{
  254. mode "system-control" {
  255. bindsym l exec --no-startup-id $Locker, mode "default"
  256. bindsym e exec --no-startup-id i3-msg exit, mode "default"
  257. bindsym s exec --no-startup-id $Locker && systemctl suspend, mode "default"
  258. bindsym h exec --no-startup-id $Locker && systemctl hibernate, mode "default"
  259. bindsym r exec --no-startup-id systemctl reboot, mode "default"
  260. bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"
  261. bindsym c exec --no-startup-id sudo /usr/bin/tomb close all, mode "default"
  262. bindsym Shift+c exec --no-startup-id sudo /usr/bin/tomb slam, mode "default"
  263. ## Invert screen colors
  264. bindsym i exec --no-startup-id xcalib -invert -alter, mode "default"
  265. ## Set brightness to my default of 30%
  266. bindsym b exec --no-startup-id xbacklight -set 30, mode "default"
  267. ## One minute timer, big
  268. bindsym t exec urxvt -fn xft:PragmataProMono-Regular:pixelsize=70 -e termdown -WBb -c 10 -t TIME 1m, mode "default"
  269. ## One minute timer, small
  270. bindsym Shift+t exec urxvt -e termdown -WBb -c 10 -t TIME 1m, mode "default"
  271. ## Flip screen horizontally
  272. bindsym f exec --no-startup-id xrandr -x, mode "default"
  273. ## Flip screen vertically
  274. bindsym Shift+F exec --no-startup-id xrandr -y, mode "default"
  275. ## Toggle between $TZ and UTC in polybar
  276. bindsym u exec awk -v TEMP=/tmp/i3_polybar_utc_${USER} 'BEGIN {{FILE=getline < TEMP < 0 ? "0" : "1"} {if($0==1){STATE=1} else {STATE=0}} {if(STATE==0){system("echo 1 > "TEMP)} else {system("echo 0 > "TEMP)}} }', mode "default"
  277. ## Unload gpg keys
  278. bindsym g exec --no-startup-id gpgconf --kill gpg-agent, mode "default"
  279. ## Reload polybar
  280. bindsym k exec --no-startup-id "$HOME/.config/polybar/scripts/start_polybar.sh", mode "default"
  281. ## Toggle xss-lock, used for lock on idle
  282. bindsym Shift+l exec --no-startup-id "$HOME/projects/personal/scripts/toggler.sh xss-lock", mode "default"
  283. ## Toggle screen off on idle
  284. bindsym p exec --no-startup-id "$HOME/projects/personal/scripts/toggler.sh powersave", mode "default"
  285. bindsym --release Shift+x exec "xkill", mode "default"
  286. ## back to normal: Enter or Escape
  287. bindsym Return mode "default"
  288. bindsym Escape mode "default"
  289. }
  290. bindsym $mod+Pause mode "system-control"
  291. bindsym $mod+End mode "system-control"
  292. ## x270
  293. #bindsym XF86Tools mode "system-control"
  294. ## x1nano and sofle keyboard
  295. bindsym XF86Favorites mode "system-control"
  296. ### End System Control Mode ### }}}
  297. ### App Quick Launch ### {{{
  298. ## Launch mode, one app per key.
  299. mode "quick-launch" {
  300. bindsym a exec pavucontrol ; mode "default"
  301. bindsym b exec qutebrowser ; mode "default"
  302. bindsym c exec speedcrunch ; mode "default"
  303. bindsym f exec firefox ; mode "default"
  304. ## gksudo is dead
  305. #bindsym g exec gksudo gameconqueror ; mode "default"
  306. bindsym g exec urxvt -e sudo scanmem ; mode "default"
  307. bindsym Shift+m exec --no-startup-id sudo /usr/bin/tomb open -k ~/vault.tomb.key ~/vault.tomb -g ; mode "default"
  308. ## Handles tv3 python3 version too
  309. #bindsym n exec urxvt --title terminal_velocity -e sh -c "terminal_velocity || $HOME/.local/bin/tv3" ; mode "default"
  310. bindsym n exec urxvt --title terminal_notes -e sh -c "note" ; mode "default"
  311. bindsym o exec libreoffice ; mode "default"
  312. bindsym t exec i3-sensible-terminal ; mode "default"
  313. bindsym v exec $HOME/bin/start-vpn.sh ; mode "default"
  314. bindsym w exec urxvt -e connman-ncurses ; mode "default"
  315. ## Keeping this as an example
  316. ## gnome-disks will not launch twice, gparted will. Avoid that.
  317. #bindsym d exec ((pidof gpartedbin) || gksudo gparted); exec gnome-disks ; mode "default"
  318. bindsym Return mode "default"
  319. bindsym Escape mode "default"
  320. }
  321. #bindsym $mod+Shift+g mode "quick-launch"
  322. bindsym $mod+g mode "quick-launch"
  323. ### End App Quick Launch ### }}}
  324. ### App Focus Mode ### {{{
  325. mode "app-focus" {
  326. ## hardcoded focus keybindings
  327. bindsym b [class="(?i)qutebrowser"] focus, mode "default"
  328. bindsym w [class="(?i)terminal" title="weechat"] focus, mode "default"
  329. #bindsym m [class="(?i)icedove"] focus, mode "default"
  330. #bindsym f [class="(?i)spacefm"] focus, mode "default"
  331. bindsym z [class="(?i)zathura"] focus, mode "default"
  332. ## back to normal: Enter or Escape
  333. bindsym Return mode "default"
  334. bindsym Escape mode "default"
  335. }
  336. bindsym $mod+Shift+g mode "app-focus"
  337. ### End App Focus Mode ### }}}
  338. ### Resize Window Mode ### {{{
  339. ## resize window (you can also use the mouse for that)
  340. mode "resize" {
  341. ## These bindings trigger as soon as you enter the resize mode
  342. ## They resize the border in the direction you pressed, e.g.
  343. ## when pressing left, the window is resized so that it has
  344. ## more space on its left
  345. bindsym h resize shrink left 10 px or 10 ppt
  346. bindsym j resize shrink down 10 px or 10 ppt
  347. bindsym k resize shrink up 10 px or 10 ppt
  348. bindsym l resize shrink right 10 px or 10 ppt
  349. bindsym Shift+H resize grow left 10 px or 10 ppt
  350. bindsym Shift+J resize grow down 10 px or 10 ppt
  351. bindsym Shift+K resize grow up 10 px or 10 ppt
  352. bindsym Shift+L resize grow right 10 px or 10 ppt
  353. ## Same bindings, but for the arrow keys
  354. bindsym Left resize shrink left 10 px or 10 ppt
  355. bindsym Down resize shrink down 10 px or 10 ppt
  356. bindsym Up resize shrink up 10 px or 10 ppt
  357. bindsym Right resize shrink right 10 px or 10 ppt
  358. bindsym Shift+Left resize grow left 10 px or 10 ppt
  359. bindsym Shift+Down resize grow down 10 px or 10 ppt
  360. bindsym Shift+Up resize grow up 10 px or 10 ppt
  361. bindsym Shift+Right resize grow right 10 px or 10 ppt
  362. ## Go to precise mode
  363. bindsym p mode "resize_precise"
  364. ## Back to normal: Enter or Escape
  365. bindsym Return mode "default"
  366. bindsym Escape mode "default"
  367. }
  368. ### Precise Resize ### {{{
  369. mode "resize_precise" {
  370. bindsym h resize shrink left 1 px or 1 ppt
  371. bindsym j resize shrink down 1 px or 1 ppt
  372. bindsym k resize shrink up 1 px or 1 ppt
  373. bindsym l resize shrink right 1 px or 1 ppt
  374. bindsym Shift+H resize grow left 1 px or 1 ppt
  375. bindsym Shift+J resize grow down 1 px or 1 ppt
  376. bindsym Shift+K resize grow up 1 px or 1 ppt
  377. bindsym Shift+L resize grow right 1 px or 1 ppt
  378. ## Same bindings, but for the arrow keys
  379. bindsym Left resize shrink left 1 px or 1 ppt
  380. bindsym Down resize shrink down 1 px or 1 ppt
  381. bindsym Up resize shrink up 1 px or 1 ppt
  382. bindsym Right resize shrink right 1 px or 1 ppt
  383. bindsym Shift+Left resize grow left 1 px or 1 ppt
  384. bindsym Shift+Down resize grow down 1 px or 1 ppt
  385. bindsym Shift+Up resize grow up 1 px or 1 ppt
  386. bindsym Shift+Right resize grow right 1 px or 1 ppt
  387. ## Return to normal resize
  388. bindsym p mode "resize"
  389. ## Back to normal: Enter or Escape
  390. bindsym Return mode "default"
  391. bindsym Escape mode "default"
  392. }
  393. ### End Precise Resize ### }}}
  394. bindsym $mod+r mode "resize"
  395. ### End Resize Mode ### }}}
  396. ### Control spotify via spotify-tui and spotifyd ### {{{
  397. mode "control-spotify" {
  398. bindsym p exec --no-startup-id spotify-tui playback --toggle, mode "default"
  399. bindsym l exec --no-startup-id spotify-tui playback --like, mode "default"
  400. bindsym r exec --no-startup-id spotify-tui playback --repeat, mode "default"
  401. bindsym s exec --no-startup-id spotify-tui playback --shuffle, mode "default"
  402. bindsym comma exec --no-startup-id spotify-tui playback --previous, mode "default"
  403. bindsym period exec --no-startup-id spotify-tui playback --next, mode "default"
  404. bindsym Shift+less exec --no-startup-id spotify-tui playback --previous, mode "default"
  405. bindsym Shift+greater exec --no-startup-id spotify-tui playback --next, mode "default"
  406. ## back to normal: Enter or Escape
  407. bindsym Return mode "default"
  408. bindsym Escape mode "default"
  409. }
  410. bindsym $mod+m mode "control-spotify"
  411. ### End Control spotify via spotify-tui and spotifyd ### }}}
  412. ### Control Pianobar Mode ### {{{
  413. mode "control-pianobar" {
  414. bindsym p exec --no-startup-id ~/.config/pianobar/control-pianobar.sh play, mode "default"
  415. bindsym q exec --no-startup-id ~/.config/pianobar/control-pianobar.sh quit, mode "default"
  416. bindsym h exec --no-startup-id ~/.config/pianobar/control-pianobar.sh history, mode "default"
  417. bindsym n exec --no-startup-id ~/.config/pianobar/control-pianobar.sh next, mode "default"
  418. bindsym t exec --no-startup-id ~/.config/pianobar/control-pianobar.sh tired, mode "default"
  419. bindsym s exec --no-startup-id ~/.config/pianobar/control-pianobar.sh switchstation, mode "default"
  420. bindsym \, exec --no-startup-id ~/.config/pianobar/control-pianobar.sh previousstation, mode "default"
  421. bindsym . exec --no-startup-id ~/.config/pianobar/control-pianobar.sh nextstation, mode "default"
  422. bindsym l exec --no-startup-id ~/.config/pianobar/control-pianobar.sh love, mode "default"
  423. bindsym b exec --no-startup-id ~/.config/pianobar/control-pianobar.sh ban, mode "default"
  424. bindsym e exec --no-startup-id ~/.config/pianobar/control-pianobar.sh explain, mode "default"
  425. bindsym c exec --no-startup-id ~/.config/pianobar/control-pianobar.sh current, mode "default"
  426. ## back to normal: Enter or Escape
  427. bindsym Return mode "default"
  428. bindsym Escape mode "default"
  429. }
  430. #bindsym $mod+m mode "control-pianobar"
  431. ### End Control Pianobar Mode ### }}}
  432. ### Control mpd Mode ### {{{
  433. mode "control-mpd" {
  434. bindsym space exec --no-startup-id mpc -q toggle, mode "default"
  435. bindsym p exec --no-startup-id mpc -q play, mode "default"
  436. bindsym r exec --no-startup-id mpc -q random, mode "default"
  437. bindsym s exec --no-startup-id mpc -q stop, mode "default"
  438. bindsym q exec --no-startup-id mpc -q stop, mode "default"
  439. bindsym comma exec --no-startup-id mpc -q prev, mode "default"
  440. bindsym period exec --no-startup-id mpc -q next, mode "default"
  441. bindsym Shift+less exec --no-startup-id mpc -q prev, mode "default"
  442. bindsym Shift+greater exec --no-startup-id mpc -q next, mode "default"
  443. ## back to normal: Enter or Escape
  444. bindsym Return mode "default"
  445. bindsym Escape mode "default"
  446. }
  447. bindsym $mod+Shift+m mode "control-mpd"
  448. ### End Control mpd Mode ### }}}
  449. ## xrandr mode?
  450. ### End i3 Modes ### }}}
  451. ### Window Treatments ### {{{
  452. ## (adding "(?i)" means ignore case)
  453. ### Program Floating ### {{{
  454. for_window [class="mpv|feh|Pinentry|Gnome-calculator|Pavucontrol"] floating enable
  455. for_window [title="Steam - Update*|Steam - Self Updater|Event Tester|termdown"] floating enable
  456. ## Make wicd-curses and terminal_velocity pop up bigger, and centered
  457. ## Added second criteria to reduce false positives
  458. for_window [class="URxvt"] [title="wicd-curses|connman-ncurses|terminal_notes"] floating enable, resize set width 800px height 600px, move position center
  459. for_window [class="QtPass"] floating enable, resize set width 800px height 600px, move position center
  460. ### End Program Floating ### }}}
  461. ## Full screen
  462. for_window [title="ManaPlus"] fullscreen
  463. ## Disable border
  464. for_window [class="mpv|URxvt|kitty|(?i)chromium|terminator|qutebrowser|manaplus|(?i)firefox|(?)google-chrome"] border 1pixel
  465. ## Tab view
  466. for_window [class="Virt-manager"] focus child, layout tabbed, focus
  467. ## Move mpv podcast window to bottom right corner
  468. for_window [class="mpv"] [title="podcast"] move position 1550 800
  469. ### Deal with pop ups ### {{{
  470. for_window [window_role="pop-up"] floating enable
  471. for_window [window_role="task_dialog"] floating enable
  472. for_window [title="Preferences$"] floating enable
  473. ### End Popups ### }}}
  474. ### Scratchpad ### {{{
  475. #for_window [title="nvPY"] move scratchpad
  476. ### End Scratchpad ### }}}
  477. ### End Window Treatments ### }}}
  478. ### Assign Application Workspace ### {{{
  479. #assign [class="(?i)spacefm"] $ws7
  480. ### End Assign Application Workspace ### }}}
  481. ### Exec Programs ### {{{
  482. ## Start polybar
  483. exec_always --no-startup-id $HOME/.config/polybar/scripts/start_polybar.sh
  484. exec --no-startup-id [ "$(xrandr | grep -o eDP-1)" = "eDP-1" ] && xrandr --output eDP-1 --primary
  485. ## shift + numlock for mouse mode num pad, see https://linuxreviews.org/HOWTO_use_the_numeric_keyboard_keys_as_mouse_in_XOrg
  486. #exec --no-startup-id setxkbmap -option keypad:pointerkeys
  487. exec --no-startup-id [ -e $HOME/.Xmodmap ] && xmodmap $HOME/.Xmodmap
  488. ## Set pulseaudio bell sound, and set volume
  489. exec --no-startup-id pactl upload-sample ~/.config/notice_beeps/tick.ogg bell && pactl load-module module-x11-bell sample=bell && xset b 75
  490. exec --no-startup-id compton -b
  491. ## autorandr needs profiles already added
  492. exec --no-startup-id srandrd autorandr
  493. #exec --no-startup-id srandrd $HOME/projects/personal/scripts/hdmi_sound_toggle.sh
  494. #exec --no-startup-id srandrd $HOME/.config/polybar/scripts/start_polybar.sh
  495. #exec --no-startup-id srandrd $HOME/.config/conky/start_conky.sh
  496. exec --no-startup-id nitrogen --restore
  497. exec --no-startup-id xss-lock -l -- i3lock -fnec 2E3436
  498. exec --no-startup-id udiskie
  499. exec --no-startup-id redshift
  500. exec --no-startup-id syncthing -no-browser
  501. exec --no-startup-id touchegg
  502. exec --no-startup-id unclutter
  503. exec --no-startup-id clipster -d
  504. ## Note to self, removed hard coded ~/.mpd from mpd-dynamic
  505. #exec --no-startup-id mpd && mpd-dynamic
  506. exec --no-startup-id sleep 120 && spotifyd
  507. #exec --no-startup-id i3-msg "workspace $ws7; exec /usr/bin/spacefm"
  508. #exec --no-startup-id i3-msg "workspace $ws3; exec qutebrowser"
  509. exec --no-startup-id i3-msg "workspace $ws1; exec kitty"
  510. exec --no-startup-id sleep 30 && pkill -USR1 redshift
  511. exec --no-startup-id sleep 15 && autorandr -c
  512. exec --no-startup-id sleep 15 && $HOME/projects/personal/scripts/hdmi_sound_toggle.sh
  513. exec --no-startup-id sleep 15 && $HOME/.config/conky/start_conky.sh
  514. ### End Exec Programs ### }}}