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.

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