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.

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