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.

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