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.

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