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.

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