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.

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