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