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.

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