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.

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