Dotfiles for my tiling window manager + terminal workflow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

328 lines
11 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. # startup {{{ #
  2. set $browser "google-chrome"
  3. set $def_term "urxvt"
  4. # set $runelite "java -jar ~/Downloads/RuneLite.jar"
  5. set $swex "sudo ~/Downloads/swex.appimage"
  6. exec redshift -O 2000
  7. # random bg
  8. exec wal -i "$HOME/Pictures/Backgrounds/dim"
  9. exec imwheel
  10. exec --no-startup-id start-pulseaudio-x11
  11. exec --no-startup-id i3-msg 'workspace $ws2; exec $def_term'
  12. exec --no-startup-id i3-msg 'workspace $ws3; exec $browser'
  13. # exec --no-startup-id i3-msg 'workspace $ws11; exec $swex'
  14. exec_always --no-startup-id numlockx on
  15. # }}} startup #
  16. # applications {{{ #
  17. set $mod Mod1
  18. set $sch_dir "$HOME/Documents/School"
  19. # app shortcuts {{{ #
  20. bindsym Mod4+a exec studio
  21. # bindsym Mod4+1 exec xdotool click --repeat 5 --delay 100 1
  22. # bindsym Mod4+2 exec xdotool click --repeat 10 --delay 100 1
  23. # bindsym Mod4+3 exec xdotool click --repeat 20 --delay 100 1
  24. # bindsym $mod+control+Return exec i3-sensible-terminal
  25. bindsym $mod+control+Return exec $def_term
  26. bindsym Mod4+c exec $browser
  27. bindsym Mod4+f exec firefox
  28. bindsym Mod4+o exec okular
  29. bindsym Mod4+m exec okular $sch_dir/calc-textbook.pdf
  30. bindsym Mod4+n exec nemo
  31. bindsym Mod4+p workspace $ws4; exec pgadmin3
  32. # bindsym Mod4+p exec pycharm
  33. # bindsym Mod4+r exec urxvt -e ranger
  34. bindsym Mod4+r exec $runelite
  35. bindsym control+$mod+s exec systemctl suspend
  36. bindsym Mod4+x exec $swex
  37. bindsym Print exec ksnapshot
  38. # }}} app shortcuts #
  39. # redshift {{{ #
  40. bindsym $mod+Mod4+1 exec redshift -O 1000
  41. bindsym $mod+Mod4+2 exec redshift -O 1250
  42. bindsym $mod+Mod4+3 exec redshift -O 1500
  43. bindsym $mod+Mod4+4 exec redshift -O 2000
  44. bindsym $mod+Mod4+5 exec redshift -O 2500
  45. bindsym $mod+Mod4+6 exec redshift -O 3000
  46. bindsym $mod+Mod4+7 exec redshift -O 4000
  47. bindsym $mod+Mod4+8 exec redshift -O 5000
  48. bindsym $mod+Mod4+grave exec redshift -x
  49. # }}} redshift #
  50. # menu {{{ #
  51. # start dmenu (a program launcher)
  52. bindsym Mod4+Return exec dmenu_run
  53. # There also is the (new) i3-dmenu-desktop which only displays applications
  54. # shipping a .desktop file. It is a wrapper around dmenu, so you need that
  55. # installed.
  56. # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
  57. # }}} menu #
  58. # Use Mouse+$mod to drag floating windows to their wanted position
  59. floating_modifier $mod
  60. # }}} applications #
  61. # changing/focusing/moving windows {{{ #
  62. # change focus
  63. bindsym control+h focus left
  64. bindsym control+j focus down
  65. bindsym control+k focus up
  66. bindsym control+l focus right
  67. # move workspace to other monitor
  68. bindsym $mod+minus move workspace to output left
  69. bindsym $mod+plus move workspace to output right
  70. # alternatively, you can use the cursor keys:
  71. bindsym $mod+Left focus left
  72. bindsym $mod+Down focus down
  73. bindsym $mod+Up focus up
  74. bindsym $mod+Right focus right
  75. # move focused window
  76. bindsym control+Shift+h move left
  77. bindsym control+Shift+j move down
  78. bindsym control+Shift+k move up
  79. bindsym control+Shift+l move right
  80. # alternatively, you can use the cursor keys:
  81. bindsym $mod+Shift+Left move left
  82. bindsym $mod+Shift+Down move down
  83. bindsym $mod+Shift+Up move up
  84. bindsym $mod+Shift+Right move right
  85. # split in horizontal orientation
  86. bindsym $mod+b split h
  87. # split in vertical orientation
  88. bindsym $mod+v split v
  89. bindsym control+Shift+x kill
  90. # }}} changing/focusing/moving windows #
  91. # container display {{{ #
  92. # backgrounds
  93. bindsym $mod+q exec wal -i "$HOME/Pictures/Backgrounds/vibrant"
  94. bindsym $mod+w exec wal -i "$HOME/Pictures/Backgrounds/dim"
  95. bindsym $mod+r exec wal -i "$HOME/Pictures/Backgrounds/"
  96. bindsym $mod+z exec feh --bg-fill ~/Pictures/Backgrounds/dim/black.jpg
  97. # enter fullscreen mode for the focused container
  98. bindsym $mod+f fullscreen toggle
  99. # change container layout (stacked, tabbed, toggle split)
  100. bindsym $mod+s layout stacking
  101. bindsym $mod+t layout tabbed
  102. bindsym $mod+e layout toggle split
  103. # toggle tiling /floating
  104. bindsym $mod+Shift+space floating toggle
  105. # change focus between tiling / floating windows
  106. bindsym $mod+space focus mode_toggle
  107. # focus the parent container
  108. bindsym $mod+a focus parent
  109. # focus the child container
  110. #bindsym $mod+d focus child
  111. # }}} container display #
  112. # workspace {{{ #
  113. # ws names {{{ #
  114. set $samsung "DVI-I-1"
  115. set $benq "HDMI-0"
  116. set $ws1 "1 "
  117. workspace $ws1 output $benq
  118. bindsym $mod+F1 workspace $ws1; exec $def_term
  119. set $ws2 "2 "
  120. workspace $ws2 output $samsung
  121. bindsym $mod+F2 workspace $ws2; exec $def_term
  122. set $ws3 "3 "
  123. workspace $ws3 output $benq
  124. bindsym $mod+F3 workspace $ws3; exec $browser
  125. set $ws4 "4 "
  126. workspace $ws4 output $samsung
  127. bindsym $mod+F4 workspace $ws4; exec $def_term
  128. set $ws5 "5 "
  129. workspace $ws5 output $samsung
  130. bindsym $mod+F5 workspace $ws5; exec $browser
  131. bindsym Mod4+g workspace $ws5; layout stacking; exec steam
  132. set $ws6 "6 "
  133. workspace $ws6 output $samsung
  134. assign [class="Slack"] $ws6
  135. bindsym Mod4+d workspace $ws6; exec discord
  136. bindsym Mod4+k workspace $ws6; exec slack
  137. set $ws7 "7 "
  138. workspace $ws7 output $samsung
  139. bindsym $mod+F7 workspace $ws7; exec $def_term
  140. set $ws8 "8 🕮"
  141. # assign [class="jetbrains-"] $ws8
  142. bindsym $mod+F8 workspace $ws8; exec $def_term
  143. set $ws9 "9 "
  144. workspace $ws9 output $samsung
  145. bindsym $mod+F9 workspace $ws9; exec $def_term
  146. set $ws10 "10 🎵"
  147. assign [class="spotify"] $ws10
  148. workspace $ws10 output $samsung
  149. bindsym $mod+F10 workspace $ws10; exec $def_term
  150. bindsym Mod4+s workspace $ws10; exec spotify
  151. set $ws11 "11 "
  152. assign [class="Summoners War Exporter"] $ws11
  153. workspace $ws11 output $benq
  154. bindsym $mod+F11 workspace $ws11; exec $def_term
  155. set $ws12 "12 "
  156. bindsym $mod+F12 workspace $ws12; exec $def_term
  157. set $ws13 "13 🕮"
  158. bindsym Mod4+F3 workspace $ws13; exec $def_term
  159. set $ws14 "14"
  160. set $ws15 "15"
  161. # }}} ws names #
  162. # ws bindings {{{ #
  163. # switch to workspace
  164. bindsym $mod+h workspace prev
  165. bindsym $mod+l workspace next
  166. bindsym $mod+1 workspace $ws1
  167. bindsym $mod+2 workspace $ws2
  168. bindsym $mod+3 workspace $ws3
  169. bindsym $mod+4 workspace $ws4
  170. bindsym $mod+5 workspace $ws5
  171. bindsym $mod+6 workspace $ws6
  172. bindsym $mod+7 workspace $ws7
  173. bindsym $mod+8 workspace $ws8
  174. bindsym $mod+9 workspace $ws9
  175. bindsym $mod+0 workspace $ws10
  176. bindsym Mod4+1 workspace $ws11
  177. bindsym Mod4+2 workspace $ws12
  178. bindsym Mod4+3 workspace $ws13
  179. bindsym Mod4+4 workspace $ws14
  180. bindsym Mod4+5 workspace $ws15
  181. # }}} ws bindings #
  182. # move container to ws {{{ #
  183. # move focused container to workspace
  184. # bindsym $mod+control+1 move container to workspace $ws1
  185. bindsym $mod+control+1 move container to workspace $ws1; workspace $ws1
  186. bindsym $mod+control+2 move container to workspace $ws2; workspace $ws2
  187. bindsym $mod+control+3 move container to workspace $ws3; workspace $ws3
  188. bindsym $mod+control+4 move container to workspace $ws4; workspace $ws4
  189. bindsym $mod+control+5 move container to workspace $ws5; workspace $ws5
  190. bindsym $mod+control+6 move container to workspace $ws6; workspace $ws6
  191. bindsym $mod+control+7 move container to workspace $ws7; workspace $ws7
  192. bindsym $mod+control+8 move container to workspace $ws8; workspace $ws8
  193. bindsym $mod+control+9 move container to workspace $ws9; workspace $ws9
  194. bindsym $mod+control+0 move container to workspace $ws10; workspace $ws10
  195. bindsym $mod+Shift+1 move container to workspace $ws11; workspace $ws11
  196. bindsym $mod+Shift+2 move container to workspace $ws12; workspace $ws12
  197. bindsym $mod+Shift+3 move container to workspace $ws13; workspace $ws13
  198. bindsym $mod+Shift+4 move container to workspace $ws14; workspace $ws14
  199. bindsym $mod+Shift+5 move container to workspace $ws15; workspace $ws15
  200. # }}} move container to ws #
  201. # }}} workspace #
  202. # reload config/computer {{{ #
  203. bindsym $mod+Shift+s exec systemctl suspend
  204. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  205. bindsym $mod+control+r restart
  206. # reload the configuration file
  207. bindsym $mod+Shift+c reload
  208. # exit i3 (logs you out of your X session)
  209. 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'"
  210. # }}} reload config #
  211. # resizing windows {{{ #
  212. bindsym $mod+control+h resize grow width 3 px or 3 ppt
  213. bindsym $mod+control+k resize grow height 3 px or 3 ppt
  214. bindsym $mod+control+j resize shrink height 3 px or 3 ppt
  215. bindsym $mod+control+l resize shrink width 3 px or 3 ppt
  216. # }}} resizing windows #
  217. # gaps {{{ #
  218. # remove window titlebars
  219. for_window [class="^.*"] border pixel 5
  220. # default gaps
  221. # gaps inner 25
  222. gaps inner 0
  223. gaps outer 0
  224. bindsym control+shift+plus gaps inner all set 25;gaps outer all set 5
  225. bindsym control+shift+0 gaps inner all set 0;gaps outer all set 0
  226. # }}} gaps #
  227. # status bar {{{ #
  228. # Start i3bar to display a workspace bar (plus the system information i3status
  229. # finds out, if available)
  230. set $sb_font Hack Bold
  231. bar {
  232. font pango:$sb_font 17
  233. tray_output none
  234. status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf
  235. output HDMI-0
  236. wheel_up_cmd nop
  237. wheel_down_cmd nop
  238. }
  239. bar {
  240. output $samsung
  241. status_command i3blocks -c ~/.config/sam-i3blocks/sam-i3blocks.conf
  242. tray_output none
  243. font pango:$sb_font 22
  244. # font pango:monospace 22, FontAwesome 22
  245. wheel_up_cmd nop
  246. wheel_down_cmd nop
  247. }
  248. # }}} status bar #
  249. # mod key/font {{{ #
  250. set $mod Mod1
  251. # Font for window titles. Will also be used by the bar unless a different font
  252. # is used in the bar {} block below.
  253. font pango:Hack 11
  254. # This font is widely installed, provides lots of unicode glyphs, right-to-left
  255. # text rendering and scalability on retina/hidpi displays (thanks to pango).
  256. #font pango:DejaVu Sans Mono 8
  257. # Before i3 v4.8, we used to recommend this one as the default:
  258. # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
  259. # The font above is very space-efficient, that is, it looks good, sharp and
  260. # clear in small sizes. However, its unicode glyph coverage is limited, the old
  261. # X core fonts rendering does not support right-to-left and this being a bitmap
  262. # font, it doesn’t scale on retina/hidpi displays.
  263. # }}} mod key/font #
  264. # media keys {{{ #
  265. bindsym $mod+d exec ~/linux-config/change-sink.sh dac
  266. bindsym $mod+o exec ~/linux-config/change-sink.sh line-out
  267. bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -c 0 sset Master 3+
  268. bindsym XF86AudioLowerVolume exec --no-startup-id amixer -c 0 sset Master 3-
  269. bindsym control+$mod+plus exec --no-startup-id amixer -c 2 sset PCM 3+
  270. bindsym control+$mod+minus exec --no-startup-id amixer -c 2 sset PCM 3-
  271. bindsym XF86AudioMute exec --no-startup-id amixer -D pulse set Master 0+ toggle
  272. # Media player controls
  273. bindsym XF86AudioPlay exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
  274. bindsym XF86AudioStop exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop"
  275. bindsym XF86AudioPrev exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
  276. bindsym XF86AudioNext exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
  277. # }}} media keys #