config 25 KB

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