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.

485 lines
15 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
  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 1000
  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. set $ws5 "5 🎥"
  165. workspace $ws5 output $samsung
  166. bindsym $mod+F5 workspace $ws5; exec $browser
  167. bindsym Mod4+g workspace $ws5; layout stacking; exec steam
  168. set $ws6 "6 "
  169. workspace $ws6 output $samsung
  170. assign [class="Slack"] $ws6
  171. bindsym Mod4+d workspace $ws6; exec discord
  172. bindsym Mod4+k workspace $ws6; exec slack
  173. # set $ws7 "7 "
  174. set $ws7 "7 📤"
  175. workspace $ws7 output $samsung
  176. bindsym $mod+F7 workspace $ws7; exec $def_term
  177. # set $ws8 "8 "
  178. set $ws8 "8 📊"
  179. # assign [class="jetbrains-"] $ws8
  180. workspace $ws8 output $samsung
  181. bindsym $mod+F8 workspace $ws8; exec urxvt -e htop -s PERCENT_MEM
  182. # set $ws9 "9 "
  183. set $ws9 "9 🔧"
  184. workspace $ws9 output $samsung
  185. bindsym $mod+F9 workspace $ws9; exec $def_term
  186. # set $ws10 "10 "
  187. set $ws10 "10 🎵"
  188. assign [class="spotify"] $ws10
  189. workspace $ws10 output $samsung
  190. set $hp 2
  191. bindsym Mod4+v workspace $ws10; exec urxvt -e alsamixer -c 0
  192. bindsym Mod4+h workspace $ws10; exec urxvt -e alsamixer -c $hp
  193. bindsym Mod4+s workspace $ws10; exec spotify
  194. set $ws11 "11 "
  195. # assign [class="Summoners War Exporter"] $ws11
  196. workspace $ws11 output $samsung
  197. bindsym $mod+F11 workspace $ws8; exec $def_term
  198. set $ws12 "12 "
  199. bindsym $mod+F12 workspace $ws12; exec $def_term
  200. set $ws13 "13 "
  201. bindsym Mod4+F3 workspace $ws13; exec $def_term
  202. set $ws14 "14"
  203. set $ws15 "15"
  204. # }}} ws names #
  205. # ws bindings {{{ #
  206. # switch to workspace
  207. bindsym $mod+h workspace prev
  208. bindsym $mod+l workspace next
  209. bindsym $mod+1 workspace $ws1
  210. bindsym $mod+2 workspace $ws2
  211. bindsym $mod+3 workspace $ws3
  212. bindsym $mod+4 workspace $ws4
  213. bindsym $mod+5 workspace $ws5
  214. bindsym $mod+6 workspace $ws6
  215. bindsym $mod+7 workspace $ws7
  216. bindsym $mod+8 workspace $ws8
  217. bindsym $mod+9 workspace $ws9
  218. bindsym $mod+0 workspace $ws10
  219. bindsym Mod4+1 workspace $ws11
  220. bindsym Mod4+2 workspace $ws12
  221. bindsym Mod4+3 workspace $ws13
  222. bindsym Mod4+4 workspace $ws14
  223. bindsym Mod4+5 workspace $ws15
  224. # }}} ws bindings #
  225. # move container to ws {{{ #
  226. # move focused container to workspace
  227. # bindsym $mod+control+1 move container to workspace $ws1
  228. bindsym $mod+control+1 move container to workspace $ws1; workspace $ws1
  229. bindsym $mod+control+2 move container to workspace $ws2; workspace $ws2
  230. bindsym $mod+control+3 move container to workspace $ws3; workspace $ws3
  231. bindsym $mod+control+4 move container to workspace $ws4; workspace $ws4
  232. bindsym $mod+control+5 move container to workspace $ws5; workspace $ws5
  233. bindsym $mod+control+6 move container to workspace $ws6; workspace $ws6
  234. bindsym $mod+control+7 move container to workspace $ws7; workspace $ws7
  235. bindsym $mod+control+8 move container to workspace $ws8; workspace $ws8
  236. bindsym $mod+control+9 move container to workspace $ws9; workspace $ws9
  237. bindsym $mod+control+0 move container to workspace $ws10; workspace $ws10
  238. bindsym $mod+Shift+1 move container to workspace $ws11; workspace $ws11
  239. bindsym $mod+Shift+2 move container to workspace $ws12; workspace $ws12
  240. bindsym $mod+Shift+3 move container to workspace $ws13; workspace $ws13
  241. bindsym $mod+Shift+4 move container to workspace $ws14; workspace $ws14
  242. bindsym $mod+Shift+5 move container to workspace $ws15; workspace $ws15
  243. # }}} move container to ws #
  244. # }}} workspace #
  245. # reload config/computer {{{ #
  246. bindsym $mod+Shift+s exec systemctl suspend
  247. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  248. bindsym $mod+control+r restart
  249. # reload the configuration file
  250. bindsym $mod+Shift+c reload
  251. # bindsym $mod+control+r reload
  252. bindsym $mod+control+u exec xrdb ~/.Xresources
  253. # exit i3 (logs you out of your X session)
  254. 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'"
  255. # }}} reload config #
  256. # resizing windows {{{ #
  257. bindsym $mod+control+h resize grow width 3 px or 3 ppt
  258. bindsym $mod+control+k resize grow height 3 px or 3 ppt
  259. bindsym $mod+control+j resize shrink height 3 px or 3 ppt
  260. bindsym $mod+control+l resize shrink width 3 px or 3 ppt
  261. # }}} resizing windows #
  262. # gaps {{{ #
  263. # remove window titlebars
  264. for_window [class="^.*"] border pixel 3
  265. set $inner_gaps 35
  266. set $outer_gaps 0
  267. gaps inner $inner_gaps
  268. gaps outer $outer_gaps
  269. gaps bottom 0
  270. # gaps inner 0
  271. # gaps outer 0
  272. # other gaps {{{ #
  273. # gaps horizontal 20
  274. # gaps vertical 10
  275. # gaps top
  276. # gaps left 20
  277. # gaps right 20
  278. # gaps bottom
  279. # }}} other gaps #
  280. bindsym control+shift+plus gaps inner all set $inner_gaps;gaps outer all set $outer_gaps
  281. bindsym control+shift+0 gaps inner all set 0;gaps outer all set 0
  282. # }}} gaps #
  283. # status bar {{{ #
  284. # Start i3bar to display a workspace bar (plus the system information i3status
  285. # finds out, if available)
  286. set $sb_font DejaVuSansMono Nerd Font Mono Bold
  287. # set $sb_font Hack NF Bold
  288. # set $sb_font EmojiOne
  289. set $black #000000
  290. set $white #ffffff
  291. # inactive vars {{{ #
  292. # set $inactive_ws_bg $white
  293. set $inactive_ws_bg #444c52
  294. # set $inactive_ws_text #bcccd7
  295. # set $inactive_ws_text #838e96
  296. set $inactive_ws_text #cbe4ff
  297. # set $inactive_ws_text $bg
  298. # set $inactive_ws_trans c8
  299. # set $inactive_ws_trans 96
  300. set $inactive_ws_trans 00
  301. # }}} inactive #
  302. # active vars {{{ #
  303. set $active_ws_bg #444c52
  304. # set $active_ws_bg #566066
  305. # set $active_ws_trans c8
  306. set $active_ws_trans 91
  307. # }}} active #
  308. # set $focused_ws_text $white
  309. set $focused_ws_text #ffffff
  310. # benq bar {{{ #
  311. # set $bar_trans 64
  312. set $bar_trans 00
  313. set $benq_ws_trans aa
  314. bar {
  315. i3bar_command i3bar -t
  316. font pango:$sb_font 21
  317. colors {
  318. # 0 (transparent) -> 255 (opaque) in hex
  319. background $black$bar_trans
  320. # border, bg, text color
  321. focused_workspace $inactive_ws_bg $bg $focused_ws_text
  322. # active = focused on other screen
  323. active_workspace $inactive_ws_bg $active_ws_bg$active_ws_trans $focused_ws_text
  324. inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_ws_trans $inactive_ws_text
  325. }
  326. tray_output none
  327. # status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf
  328. status_command 2>/tmp/i3blocks.err i3blocks -vvv -c ~/.config/i3blocks/i3blocks.conf | tee /tmp/i3blocks.out
  329. output $benq
  330. wheel_up_cmd nop
  331. wheel_down_cmd nop
  332. }
  333. # }}} benq bar #
  334. # sam bar {{{ #
  335. bar {
  336. output $samsung
  337. font pango:$sb_font 25
  338. # output $benq
  339. i3bar_command i3bar -t
  340. colors {
  341. background $black$bar_trans
  342. # border, bg, text color
  343. focused_workspace $inactive_ws_bg $bg $focused_ws_text
  344. active_workspace $inactive_ws_bg $active_ws_bg$active_ws_trans $focused_ws_text
  345. inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_ws_trans $inactive_ws_text
  346. }
  347. status_command i3blocks -c ~/.config/sam-i3blocks/sam-i3blocks.conf
  348. tray_output none
  349. wheel_up_cmd nop
  350. wheel_down_cmd nop
  351. }
  352. # }}} samsung bar #
  353. # # # display {{{ #
  354. # bar {
  355. # i3bar_command i3bar -t
  356. # font pango:$sb_font 23
  357. # tray_output none
  358. # status_command i3blocks -c ~/.config/i3blocks/i3blocks-display.conf
  359. # output $samsung
  360. # wheel_up_cmd nop
  361. # wheel_down_cmd nop
  362. # }
  363. # # }}} display #
  364. # }}} status bar #
  365. # mod key/font {{{ #
  366. set $mod Mod1
  367. # Font for window titles. Will also be used by the bar unless a different font
  368. # is used in the bar {} block below.
  369. font pango:Hack 11
  370. # This font is widely installed, provides lots of unicode glyphs, right-to-left
  371. # text rendering and scalability on retina/hidpi displays (thanks to pango).
  372. #font pango:DejaVu Sans Mono 8
  373. # Before i3 v4.8, we used to recommend this one as the default:
  374. # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
  375. # The font above is very space-efficient, that is, it looks good, sharp and
  376. # clear in small sizes. However, its unicode glyph coverage is limited, the old
  377. # X core fonts rendering does not support right-to-left and this being a bitmap
  378. # font, it doesn’t scale on retina/hidpi displays.
  379. # }}} mod key/font #
  380. # media keys {{{ #
  381. bindsym $mod+d exec ~/linux-config/scripts/change-sink dac
  382. bindsym $mod+o exec ~/linux-config/scripts/change-sink line-out
  383. bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -c 0 sset Master 3+
  384. bindsym XF86AudioLowerVolume exec --no-startup-id amixer -c 0 sset Master 3-
  385. bindsym control+$mod+plus exec --no-startup-id amixer -c 2 sset PCM 3+
  386. bindsym control+$mod+minus exec --no-startup-id amixer -c 2 sset PCM 3-
  387. bindsym XF86AudioMute exec --no-startup-id amixer -D pulse set Master 0+ toggle
  388. # Media player controls
  389. bindsym XF86AudioPlay exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
  390. bindsym XF86AudioStop exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop"
  391. bindsym XF86AudioPrev exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
  392. bindsym XF86AudioNext exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
  393. # }}} media keys #