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.

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