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.

305 lines
11 KiB

4 years ago
4 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. # Please see http://i3wm.org/docs/userguide.html for a complete reference!
  2. set $mod Mod4
  3. set $alt Mod1
  4. #exec --no-startup-id nitrogen --restore ~/Wallpapers
  5. # exec --no-startup-id compton -b
  6. exec --no-startup-id nm-applet
  7. exec --no-startup-id xss-lock -- i3lock-fancy
  8. exec --no-startup-id xset r rate 250 25
  9. exec --no-startup-id xset b off
  10. exec --no-startup-id setxkbmap -option caps:escape
  11. exec --no-startup-id nightshift -l 39.0315533:-94.4954291 -d
  12. # exec --no-startup-id setxkbmap -model apple_laptop -layout us -variant dvp
  13. exec --no-startup-id /home/joshfabean/.screenlayout/dual-screen.sh
  14. font pango:JetBrains Mono, FontAwesome 12
  15. bindsym $mod+F7 exec --no-startup-id xset r rate 250 25 && xset b off && setxkbmap -option caps:escape
  16. # Use Mouse+$mod to drag floating windows to their wanted position
  17. floating_modifier $mod
  18. # start a terminal
  19. bindsym $mod+Return exec --no-startup-id alacritty
  20. # kill focused window
  21. bindsym $mod+q kill
  22. # lock screen
  23. bindsym $mod+$alt+s exec i3lock-fancy
  24. # start dmenu (a program launcher)
  25. bindsym XF86LaunchA exec --no-startup-id rofi -show run
  26. bindcode 225 exec --no-startup-id rofi -show run
  27. bindsym $mod+F9 exec --no-startup-id rofi -show run
  28. #bindsym $mod+space exec --no-startup-id rofi -fullscreen -show run
  29. bindsym $mod+space exec --no-startup-id rofi -show run
  30. # screenshot
  31. bindsym $mod+Shift+Control+4 exec --no-startup-id deepin-screenshot
  32. # change focus
  33. bindsym $mod+j focus left
  34. bindsym $mod+k focus down
  35. bindsym $mod+l focus up
  36. bindsym $mod+semicolon focus right
  37. # alternatively, you can use the cursor keys:
  38. bindsym $mod+Left focus left
  39. bindsym $mod+Down focus down
  40. bindsym $mod+Up focus up
  41. bindsym $mod+Right focus right
  42. # move focused window
  43. bindsym $mod+Shift+j move left
  44. bindsym $mod+Shift+k move down
  45. bindsym $mod+Shift+l move up
  46. bindsym $mod+Shift+semicolon move right
  47. # alternatively, you can use the cursor keys:
  48. bindsym $mod+Shift+Left move left
  49. bindsym $mod+Shift+Down move down
  50. bindsym $mod+Shift+Up move up
  51. bindsym $mod+Shift+Right move right
  52. # split in horizontal orientation
  53. bindsym $mod+h split h
  54. # split in vertical orientation
  55. bindsym $mod+v split v
  56. # enter fullscreen mode for the focused container
  57. bindsym $mod+d fullscreen
  58. bindsym $mod+$alt+f fullscreen
  59. # change container layout (stacked, tabbed, toggle split)
  60. bindsym $mod+s layout stacking
  61. bindsym $mod+t layout tabbed
  62. bindsym $mod+e layout toggle split
  63. # toggle tiling / floating
  64. bindsym $mod+Shift+space floating toggle
  65. # change focus between tiling / floating windows
  66. bindsym $mod+$alt+space focus mode_toggle
  67. # focus the parent container
  68. bindsym $mod+p focus parent
  69. # focus the child container
  70. bindsym $mod+c focus child
  71. set $workSpace1 "1"
  72. set $workSpace2 "2"
  73. set $workSpace3 "3"
  74. set $workSpace4 "4"
  75. # switch to workspace
  76. bindsym $mod+1 workspace $workSpace1
  77. bindsym $mod+2 workspace $workSpace2
  78. bindsym $mod+3 workspace $workSpace3
  79. bindsym $mod+4 workspace $workSpace4
  80. bindsym $mod+5 workspace 5
  81. bindsym $mod+6 workspace 6
  82. bindsym $mod+7 workspace 7
  83. bindsym $mod+8 workspace 8
  84. bindsym $mod+9 workspace 9
  85. bindsym $mod+0 workspace 10
  86. bindsym Mod1+Control+Right workspace next
  87. bindsym Mod1+Control+Left workspace prev
  88. workspace_auto_back_and_forth yes
  89. bindsym $mod+z workspace back_and_forth
  90. bindsym $mod+Shift+z move container to workspace back_and_forth
  91. # move focused container to workspace
  92. bindsym $mod+Shift+1 move container to workspace $workSpace1
  93. bindsym $mod+Shift+2 move container to workspace $workSpace2
  94. bindsym $mod+Shift+3 move container to workspace $workSpace3
  95. bindsym $mod+Shift+4 move container to workspace $workSpace4
  96. bindsym $mod+Shift+5 move container to workspace number 5
  97. bindsym $mod+Shift+6 move container to workspace number 6
  98. bindsym $mod+Shift+7 move container to workspace number 7
  99. bindsym $mod+Shift+8 move container to workspace number 8
  100. bindsym $mod+Shift+9 move container to workspace number 9
  101. bindsym $mod+Shift+0 move container to workspace number 10
  102. #Custom Keybindings
  103. bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10% #-steps 1
  104. bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10% #-steps 1
  105. bindsym $mod+f exec --no-startup-id termite -e ranger
  106. bindsym $mod+m move scratchpad
  107. bindsym $mod+n scratchpad show
  108. #Make sure these windows behave as they should
  109. for_window [class="^.*"] border pixel 2
  110. for_window [class="Cb-exit" instance="cb-exit"] floating enable
  111. for_window [class="Cb-exit" instance="cb-exit"] border none
  112. for_window [class="^Pavucontrol$"] floating enable
  113. for_window [instance="crx_gaedmjdfmmahhbjefcbgaolhhanlaolb"] floating enable
  114. for_window [class="Google-chrome" instance="crx_nckgahadagoaajjgafhacjanaoiihapd"] floating enable
  115. for_window [class="chrome_app_list"] floating enable
  116. for_window [class="Plexamp"] floating enable
  117. # https://github.com/ValveSoftware/steam-for-linux/issues/1040
  118. for_window [class="^Steam$" title="^Friends$"] floating enable
  119. for_window [class="^Steam$" title="Steam - News"] floating enable
  120. for_window [class="^Steam$" title=".* - Chat"] floating enable
  121. for_window [class="^Steam$" title="^Settings$"] floating enable
  122. for_window [class="^Steam$" title=".* - event started"] floating enable
  123. for_window [class="^Steam$" title=".* CD key"] floating enable
  124. for_window [class="^Steam$" title="^Steam - Self Updater$"] floating enable
  125. for_window [class="^Steam$" title="^Screenshot Uploader$"] floating enable
  126. for_window [class="^Steam$" title="^Steam Guard - Computer Authorization Required$"] floating enable
  127. for_window [title="^Steam Keyboard$"] floating enable
  128. assign [class="Slack"] $workSpace3
  129. assign [class="Plexamp"] $workSpace3
  130. #Hide border if 1 window
  131. hide_edge_borders both
  132. # reload the configuration file
  133. bindsym $mod+Shift+c reload
  134. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  135. bindsym $mod+Shift+r restart
  136. # exit i3 (logs you out of your X session)
  137. 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'"
  138. # resize window (you can also use the mouse for that)
  139. mode "resize" {
  140. # These bindings trigger as soon as you enter the resize mode
  141. # Pressing left will shrink the window’s width.
  142. # Pressing right will grow the window’s width.
  143. # Pressing up will shrink the window’s height.
  144. # Pressing down will grow the window’s height.
  145. bindsym j resize shrink width 10 px or 10 ppt
  146. bindsym k resize grow height 10 px or 10 ppt
  147. bindsym l resize shrink height 10 px or 10 ppt
  148. bindsym semicolon resize grow width 10 px or 10 ppt
  149. # same bindings, but for the arrow keys
  150. bindsym Left resize shrink width 10 px or 10 ppt
  151. bindsym Down resize grow height 10 px or 10 ppt
  152. bindsym Up resize shrink height 10 px or 10 ppt
  153. bindsym Right resize grow width 10 px or 10 ppt
  154. # back to normal: Enter or Escape
  155. bindsym Return mode "default"
  156. bindsym Escape mode "default"
  157. }
  158. bindsym $mod+r mode "resize"
  159. # Resize Containers, Vim-style ($mod+Control+[hjkl])
  160. bindsym $mod+Control+j resize grow height 5 px or 5 ppt
  161. bindsym $mod+Control+k resize shrink height 5 px or 5 ppt
  162. bindsym $mod+Control+l resize grow width 5 px or 5 ppt
  163. bindsym $mod+Control+h resize shrink width 5 px or 5 ppt
  164. bindsym $mod+Control+Up resize grow height 5 px or 5 ppt
  165. bindsym $mod+Control+Down resize shrink height 5 px or 5 ppt
  166. bindsym $mod+Control+Right resize grow width 5 px or 5 ppt
  167. bindsym $mod+Control+Left resize shrink width 5 px or 5 ppt
  168. # Start i3bar to display a workspace bar (plus the system information i3status
  169. # finds out, if available)
  170. bar {
  171. position top
  172. status_command SCRIPT_DIR=/home/joshfabean/.config/i3blocks i3blocks
  173. font pango:Liberation 10, FontAwesome 12
  174. # strip_workspace_numbers yes
  175. # strip_workspace_numbers yes
  176. colors {
  177. separator #586e75
  178. background #0c1014
  179. statusline #aea79f
  180. focused_workspace #091f2e #091f2e #ffffff
  181. active_workspace #073642 #073642 #ffffff
  182. inactive_workspace #0c1014 #0c1014 #aea79f
  183. urgent_workspace #77216f #77216f #ffffff
  184. }
  185. }
  186. # class border backgr. text indicator
  187. client.focused #FFFFFF #BF360C #fdf6e3 #FF0000
  188. client.focused_inactive #073642 #FF9800 #93a1a1 #002b36
  189. client.unfocused #002b36 #311B92 #586e75 #002b36
  190. client.urgent #dc322f #b71c1c #fdf6e3 #dc322f
  191. # gaps
  192. gaps inner 15
  193. smart_gaps on
  194. set $mode_gaps Gaps: (o) outer, (i) inner
  195. set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
  196. set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
  197. bindsym $mod+Shift+g mode "$mode_gaps"
  198. bindsym $mod+g mode gaps inner 0
  199. mode "$mode_gaps" {
  200. bindsym o mode "$mode_gaps_outer"
  201. bindsym i mode "$mode_gaps_inner"
  202. bindsym Return mode "default"
  203. bindsym Escape mode "default"
  204. }
  205. mode "$mode_gaps_inner" {
  206. bindsym plus gaps inner current plus 5
  207. bindsym minus gaps inner current minus 5
  208. bindsym 0 gaps inner current set 0
  209. bindsym Shift+plus gaps inner all plus 5
  210. bindsym Shift+minus gaps inner all minus 5
  211. bindsym Shift+0 gaps inner all set 0
  212. bindsym Return mode "default"
  213. bindsym Escape mode "default"
  214. }
  215. mode "$mode_gaps_outer" {
  216. bindsym plus gaps outer current plus 5
  217. bindsym minus gaps outer current minus 5
  218. bindsym 0 gaps outer current set 0
  219. bindsym Shift+plus gaps outer all plus 5
  220. bindsym Shift+minus gaps outer all minus 5
  221. bindsym Shift+0 gaps outer all set 0
  222. bindsym Return mode "default"
  223. bindsym Escape mode "default"
  224. }
  225. #bindsym Control+k exec --no-startup-id echo "core.weechat */buffer_dmenu" >> $(find ~/.weechat -type p)
  226. # exec --no-startup-id xfce4-volumed-pulse
  227. # exec --no-startup-id pasystray
  228. exec --no-startup-id pcmanfm -d
  229. # exec --no-startup-id rescuetime
  230. exec --no-startup-id blueman-applet
  231. exec --no-startup-id dunst
  232. bindsym XF86AudioLowerVolume exec --no-startup-id "pulseaudio-ctl down ; pkill -RTMIN+1 i3blocks"
  233. bindsym XF86AudioRaiseVolume exec --no-startup-id "pulseaudio-ctl up ; pkill -RTMIN+1 i3blocks"
  234. bindsym XF86AudioMute exec --no-startup-id "pulseaudio-ctl mute ; pkill -RTMIN+1 i3blocks"
  235. # bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
  236. # bindsym XF86AudioPause exec --no-startup-id playerctl play-pause
  237. # bindsym XF86AudioPlayPause exec --no-startup-id playerctl play-pause
  238. bindsym $mod1+Shift+p exec --no-startup-id echo "cycle pause" > ~/.config/mpv/control
  239. # Chrome special flags and others set in /etc/profiles.d/variables.sh like the following: --touch-devices=2 --force-device-scale-factor=2
  240. #
  241. #exec --nostartup-id compton -b