owenh28

Untitled

Jan 12th, 2022
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.13 KB | None | 0 0
  1. ## Copyright (C) 2020-2021 Aditya Shakya <[email protected]>
  2. ## Everyone is permitted to copy and distribute copies of this file under GNU-GPL3
  3. ##
  4. ## i3wm configuration for Archcraft
  5.  
  6. ##-- Mod Keys ----------------------------
  7. set $mod Mod4
  8. set $alt Mod1
  9.  
  10. ##-- Fonts (Global) ----------------------
  11. font pango:JetBrains Mono Medium 20
  12.  
  13. ##-- Gaps --------------------------------
  14.  
  15. # Title bar text alignment
  16. title_align center
  17.  
  18. # Uncomment this to enable title bars
  19. #for_window [class=".*"] border normal 4
  20.  
  21. # Uncomment this to disable title bars
  22. for_window [class=".*"] border pixel 2
  23.  
  24. # Gaps (Outer gaps are added to the inner gaps)
  25. gaps inner 7
  26. gaps outer 0
  27.  
  28. # Only enable gaps on a workspace when there is at least one container
  29. #smart_gaps on
  30.  
  31. # Activate smart borders (always)
  32. #smart_borders on
  33.  
  34. ##-- Colors ------------------------------
  35.  
  36. # class border backgr. text indicator child_border
  37. client.focused #DA6E89 #DA6E89 #FFFFFF #98C379 #DA6E89
  38. client.focused_inactive #61AFEF #61AFEF #1E222A #98C379 #61AFEF
  39. client.unfocused #2C3038 #2C3038 #FFFFFF #98C379 #2C3038
  40. client.urgent #C678DD #C678DD #FFFFFF #98C379 #C678DD
  41. client.placeholder #1E222A #1E222A #FFFFFF #98C379 #1E222A
  42.  
  43. client.background #1E222A
  44.  
  45. ##-- Autostart ---------------------------
  46.  
  47. exec_always --no-startup-id ~/.config/i3/bin/autostart.sh
  48.  
  49. ##-- Key Bindings ------------------------
  50.  
  51. # -- Terminal --
  52. bindsym $mod+Return exec --no-startup-id ~/.config/i3/bin/i3term.sh
  53. bindsym $mod+Shift+Return exec --no-startup-id ~/.config/i3/bin/i3term.sh -f
  54. bindsym $mod+t exec --no-startup-id ~/.config/i3/bin/i3term.sh -s
  55.  
  56. # -- Apps --
  57. bindsym $mod+Shift+f exec --no-startup-id thunar
  58. bindsym $mod+Shift+e exec --no-startup-id geany
  59. bindsym $mod+Shift+w exec --no-startup-id firefox
  60. bindsym $alt+Control+v exec --no-startup-id "alacritty --config-file ~/.config/i3/alacritty/alacritty.yml -e vim"
  61. bindsym $alt+Control+n exec --no-startup-id "alacritty --config-file ~/.config/i3/alacritty/alacritty.yml -e nvim"
  62. bindsym $alt+Control+r exec --no-startup-id "alacritty --config-file ~/.config/i3/alacritty/alacritty.yml -e ranger"
  63. bindsym $alt+Control+h exec --no-startup-id "alacritty --config-file ~/.config/i3/alacritty/alacritty.yml -e htop"
  64. bindsym $alt+Control+b exec --no-startup-id "alacritty --config-file ~/.config/i3/alacritty/alacritty.yml -e bashtop"
  65.  
  66. # -- Rofi --
  67. bindsym $alt+F1 exec --no-startup-id ~/.config/i3/rofi/bin/launcher
  68. bindsym $mod+n exec --no-startup-id ~/.config/i3/rofi/bin/network_menu
  69. bindsym $mod+x exec --no-startup-id ~/.config/i3/rofi/bin/powermenu
  70. bindsym $mod+m exec --no-startup-id ~/.config/i3/rofi/bin/mpd
  71. bindsym $mod+i exec --no-startup-id ~/.config/i3/rofi/bin/network
  72. bindsym $mod+s exec --no-startup-id ~/.config/i3/rofi/bin/screenshot
  73. bindsym $mod+r exec --no-startup-id ~/.config/i3/rofi/bin/asroot
  74. bindsym $mod+w exec --no-startup-id ~/.config/i3/rofi/bin/windows
  75.  
  76. # -- Function keys --
  77. bindsym XF86MonBrightnessUp exec --no-startup-id "brightness --inc"
  78. bindsym XF86MonBrightnessDown exec --no-startup-id "brightness --dec"
  79. bindsym XF86AudioRaiseVolume exec --no-startup-id "volume --inc"
  80. bindsym XF86AudioLowerVolume exec --no-startup-id "volume --dec"
  81. bindsym XF86AudioMute exec --no-startup-id "volume --toggle"
  82. bindsym XF86AudioNext exec --no-startup-id "mpc next"
  83. bindsym XF86AudioPrev exec --no-startup-id "mpc prev"
  84. bindsym XF86AudioPlay exec --no-startup-id "mpc toggle"
  85. bindsym XF86AudioStop exec --no-startup-id "mpc stop"
  86.  
  87. # -- Screenshots --
  88. bindsym Print exec --no-startup-id "takeshot --now"
  89. bindsym $mod+Print exec --no-startup-id "takeshot --in5"
  90. bindsym Shift+Print exec --no-startup-id "takeshot --in10"
  91. bindsym Control+Print exec --no-startup-id "takeshot --win"
  92. bindsym $mod+Control+Print exec --no-startup-id "takeshot --area"
  93.  
  94. # -- i3wm --
  95.  
  96. # Lockscreen
  97. bindsym $alt+Control+l exec ~/.config/i3/bin/i3lock.sh
  98.  
  99. # Use Mouse+$mod to drag floating windows to their wanted position
  100. floating_modifier $mod
  101.  
  102. # kill focused window
  103. bindsym $mod+q kill
  104. bindsym $mod+c kill
  105.  
  106. # change focus
  107. bindsym $mod+j focus left
  108. bindsym $mod+k focus down
  109. bindsym $mod+l focus up
  110. bindsym $mod+semicolon focus right
  111.  
  112. # alternatively, you can use the cursor keys:
  113. bindsym $mod+Left focus left
  114. bindsym $mod+Down focus down
  115. bindsym $mod+Up focus up
  116. bindsym $mod+Right focus right
  117.  
  118. # move focused window
  119. bindsym $mod+Shift+j move left
  120. bindsym $mod+Shift+k move down
  121. bindsym $mod+Shift+l move up
  122. bindsym $mod+Shift+semicolon move right
  123.  
  124. # alternatively, you can use the cursor keys:
  125. bindsym $mod+Shift+Left move left
  126. bindsym $mod+Shift+Down move down
  127. bindsym $mod+Shift+Up move up
  128. bindsym $mod+Shift+Right move right
  129.  
  130. # split in horizontal orientation
  131. bindsym $mod+h split h
  132.  
  133. # split in vertical orientation
  134. bindsym $mod+v split v
  135.  
  136. # enter fullscreen mode for the focused container
  137. bindsym $mod+f fullscreen toggle
  138.  
  139. # change container layout (stacked, tabbed, toggle split)
  140. bindsym $mod+Shift+z layout stacking
  141. bindsym $mod+Shift+x layout tabbed
  142. bindsym $mod+Shift+c layout toggle split
  143.  
  144. # toggle tiling / floating
  145. bindsym $mod+space floating toggle
  146.  
  147. # change focus between tiling / floating windows
  148. bindsym $mod+Shift+space focus mode_toggle
  149.  
  150. # focus the parent container
  151. bindsym $mod+a focus parent
  152.  
  153. # focus the child container
  154. bindsym $mod+d focus child
  155.  
  156. ##-- Workspaces ---------------------
  157.  
  158. # Define names for default workspaces for which we configure key bindings later on.
  159. # We use variables to avoid repeating the names in multiple places.
  160. set $ws1 "1"
  161. set $ws2 "2"
  162. set $ws3 "3"
  163. set $ws4 "4"
  164. set $ws5 "5"
  165. set $ws6 "6"
  166. set $ws7 "7"
  167. set $ws8 "8"
  168. set $ws9 "9"
  169. set $ws10 "10"
  170.  
  171. # switch to workspace
  172. bindsym $mod+1 workspace number $ws1
  173. bindsym $mod+2 workspace number $ws2
  174. bindsym $mod+3 workspace number $ws3
  175. bindsym $mod+4 workspace number $ws4
  176. bindsym $mod+5 workspace number $ws5
  177. bindsym $mod+6 workspace number $ws6
  178. bindsym $mod+7 workspace number $ws7
  179. bindsym $mod+8 workspace number $ws8
  180. bindsym $mod+9 workspace number $ws9
  181. bindsym $mod+0 workspace number $ws10
  182.  
  183. # move focused container to workspace
  184. bindsym $mod+Shift+1 move container to workspace number $ws1
  185. bindsym $mod+Shift+2 move container to workspace number $ws2
  186. bindsym $mod+Shift+3 move container to workspace number $ws3
  187. bindsym $mod+Shift+4 move container to workspace number $ws4
  188. bindsym $mod+Shift+5 move container to workspace number $ws5
  189. bindsym $mod+Shift+6 move container to workspace number $ws6
  190. bindsym $mod+Shift+7 move container to workspace number $ws7
  191. bindsym $mod+Shift+8 move container to workspace number $ws8
  192. bindsym $mod+Shift+9 move container to workspace number $ws9
  193. bindsym $mod+Shift+0 move container to workspace number $ws10
  194.  
  195. # reload the configuration file
  196. bindsym Control+Shift+c reload
  197. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  198. bindsym Control+Shift+r restart
  199. # quit i3 session
  200. bindsym Control+Shift+q exit
  201.  
  202. ##-- Resize / Move / Gaps ------------------------
  203.  
  204. # resize window (you can also use the mouse for that)
  205. mode "Resize" {
  206. # These bindings trigger as soon as you enter the resize mode
  207.  
  208. bindsym Left resize shrink width 10 px or 10 ppt
  209. bindsym Down resize grow height 10 px or 10 ppt
  210. bindsym Up resize shrink height 10 px or 10 ppt
  211. bindsym Right resize grow width 10 px or 10 ppt
  212.  
  213. # back to normal: Enter or Escape or $mod+r
  214. bindsym Return mode "default"
  215. bindsym Escape mode "default"
  216. bindsym $mod+r mode "default"
  217. }
  218. bindsym $mod+Shift+r mode "Resize"
  219.  
  220. mode "Move" {
  221. # These bindings trigger as soon as you enter the Move mode
  222.  
  223. bindsym Left move left 20px
  224. bindsym Down move down 20px
  225. bindsym Up move up 20px
  226. bindsym Right move right 20px
  227.  
  228. # back to normal: Enter or Escape or $mod+r
  229. bindsym Return mode "default"
  230. bindsym Escape mode "default"
  231. bindsym $mod+m mode "default"
  232. }
  233. bindsym $mod+Shift+m mode "Move"
  234.  
  235. set $mode_gaps Gaps: (o)uter, (i)nner
  236. set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
  237. set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
  238.  
  239. mode "$mode_gaps_outer" {
  240. bindsym plus gaps outer current plus 5
  241. bindsym minus gaps outer current minus 5
  242. bindsym 0 gaps outer current set 0
  243.  
  244. bindsym Shift+plus gaps outer all plus 5
  245. bindsym Shift+minus gaps outer all minus 5
  246. bindsym Shift+0 gaps outer all set 0
  247.  
  248. bindsym Return mode "$mode_gaps"
  249. bindsym Escape mode "default"
  250. }
  251.  
  252. mode "$mode_gaps_inner" {
  253. bindsym plus gaps inner current plus 5
  254. bindsym minus gaps inner current minus 5
  255. bindsym 0 gaps inner current set 0
  256.  
  257. bindsym Shift+plus gaps inner all plus 5
  258. bindsym Shift+minus gaps inner all minus 5
  259. bindsym Shift+0 gaps inner all set 0
  260.  
  261. bindsym Return mode "$mode_gaps"
  262. bindsym Escape mode "default"
  263. }
  264.  
  265. mode "$mode_gaps" {
  266. bindsym o mode "$mode_gaps_outer"
  267. bindsym i mode "$mode_gaps_inner"
  268. bindsym Return mode "$mode_gaps"
  269. bindsym Escape mode "default"
  270. }
  271.  
  272. bindsym $mod+Shift+g mode "$mode_gaps"
  273.  
  274. ##-- Workspace Rules ------------------------
  275. assign [class="Lxappearance|Nitrogen"] 6
  276. assign [class="Pavucontrol|Xfce4-power-manager-settings"] 6
  277.  
  278. ##-- Window Rules ------------------------
  279. for_window [window_role="pop-up"] floating enable
  280. for_window [window_role="task_dialog"] floating enable
  281. for_window [class="alacritty-float"] floating enable
  282. for_window [class="Pcmanfm|Onboard|Yad"] floating enable
  283. for_window [class="Lxappearance|Nitrogen"] floating enable
  284. for_window [class="Pavucontrol|Xfce4-power-manager-settings|Nm-connection-editor"] floating enable
  285. for_window [class="feh|Viewnior|Gpicview|Gimp|MPlayer"] floating enable
  286. for_window [class="Kvantum Manager|qt5ct"] floating enable
  287. for_window [class="VirtualBox Manager|qemu|Qemu-system-x86_64"] floating enable
  288.  
Add Comment
Please, Sign In to add comment