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.

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