Advertisement
colpac64

i3 config

Mar 31st, 2022
1,152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # This file has been auto-generated by i3-config-wizard(1).
  2. # It will not be overwritten, so edit it as you like.
  3. #
  4. # Should you change your keyboard layout some time, delete
  5. # this file and re-run i3-config-wizard(1).
  6. #
  7.  
  8. # i3 config file (v4)
  9. #
  10. # Please see http://i3wm.org/docs/userguide.html for a complete reference!
  11.  
  12. set $mod Mod4
  13. set $editor vim
  14.  
  15. set $ws1  "1: "
  16. set $ws2  "2: "
  17. set $ws3  "3: "
  18. set $ws4  "4: "
  19. set $ws5  "5: "
  20. set $ws6  "6: "
  21. set $ws7  "7: "
  22. set $ws8  "8: "
  23. set $ws9  "9: "
  24. set $ws10 "10: "
  25.  
  26. set $default_gaps_inner 10
  27. set $default_gaps_outer 0
  28. gaps inner 10
  29. gaps outer 0
  30.  
  31. hide_edge_borders both
  32. new_window none
  33. smart_borders on
  34.  
  35. set $mode_gaps gaps
  36. set $mode_gaps_outer outer gaps
  37. set $mode_gaps_inner inner gaps
  38.  
  39. bindsym $mod+Shift+g mode "$mode_gaps"
  40. mode "$mode_gaps" {
  41.     bindsym o      mode "$mode_gaps_outer"
  42.     bindsym i      mode "$mode_gaps_inner"
  43.  
  44.     bindsym 0      mode "default", exec --no-startup-id i3-msg "gaps inner current set 0" && i3-msg "gaps outer current set 0"
  45.     bindsym d      mode "default", exec --no-startup-id i3-msg "gaps inner current set $default_gaps_inner" && i3-msg "gaps outer current set $default_gaps_outer"
  46.  
  47.     bindsym Return mode "default"
  48.     bindsym Escape mode "default"
  49. }
  50.  
  51. mode "$mode_gaps_inner" {
  52.     bindsym plus  gaps inner current plus 5
  53.     bindsym minus gaps inner current minus 5
  54.     bindsym 0     mode "default", gaps inner current set 0
  55.     bindsym d     mode "default", gaps inner current set $default_gaps_inner
  56.  
  57.     bindsym Shift+plus  gaps inner all plus 5
  58.     bindsym Shift+minus gaps inner all minus 5
  59.     bindsym Shift+0     mode "default", gaps inner all set 0
  60.     bindsym Shift+d     mode "default", gaps inner all set $default_gaps_inner
  61.  
  62.     bindsym Return mode "default"
  63.     bindsym Escape mode "default"
  64. }
  65.  
  66. mode "$mode_gaps_outer" {
  67.     bindsym plus  gaps outer current plus 5
  68.     bindsym minus gaps outer current minus 5
  69.     bindsym 0     mode "default", gaps outer current set 0
  70.     bindsym d     mode "default", gaps outer current set $default_gaps_outer
  71.  
  72.     bindsym Shift+plus  gaps outer all plus 5
  73.     bindsym Shift+minus gaps outer all minus 5
  74.     bindsym Shift+0     mode "default", gaps outer all set 0
  75.     bindsym Shift+d     mode "default", gaps outer all set $default_gaps_outer
  76.  
  77.     bindsym Return mode "default"
  78.     bindsym Escape mode "default"
  79. }
  80.  
  81. # Font for window titles. Will also be used by the bar unless a different font
  82. # is used in the bar {} block below.
  83. #font pango:monospace 8
  84.  
  85. # This font is widely installed, provides lots of unicode glyphs, right-to-left
  86. # text rendering and scalability on retina/hidpi displays (thanks to pango).
  87. #font pango:DejaVu Sans Mono 8
  88. ####################################
  89. #  Window Appearances
  90. ###############################
  91.  
  92. ## Keep borders of windows at a certain size.
  93. for_window [class="^.*"] border pixel 3
  94.  
  95. ## Set window font
  96. font pango:Liberation Mono 10
  97.  
  98. #######################################
  99. #  Gaps Options
  100. #######################################
  101.  
  102.  
  103.  
  104. # Before i3 v4.8, we used to recommend this one as the default:
  105. # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
  106. # The font above is very space-efficient, that is, it looks good, sharp and
  107. # clear in small sizes. However, its unicode glyph coverage is limited, the old
  108. # X core fonts rendering does not support right-to-left and this being a bitmap
  109. # font, it doesn’t scale on retina/hidpi displays.
  110.  
  111. # Use Mouse+$mod to drag floating windows to their wanted position
  112. floating_modifier $mod
  113.  
  114. # start a terminal
  115. bindsym $mod+Return exec kitty
  116.  
  117. # kill focused window
  118. bindsym $mod+Shift+q kill
  119.  
  120. # start dmenu (a program launcher)
  121. #bindsym $mod+d exec dmenu_run
  122.  
  123. # rofi binds
  124. bindsym $mod+d exec rofi -show drun
  125. bindsym $mod+Shift+d exec rofi -show run
  126.  
  127. # There also is the (new) i3-dmenu-desktop which only displays applications
  128. # shipping a .desktop file. It is a wrapper around dmenu, so you need that
  129. # installed.
  130. # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
  131.  
  132. # change focus
  133. bindsym $mod+j focus left
  134. bindsym $mod+k focus down
  135. bindsym $mod+l focus up
  136. bindsym $mod+semicolon focus right
  137.  
  138. # alternatively, you can use the cursor keys:
  139. bindsym $mod+Left focus left
  140. bindsym $mod+Down focus down
  141. bindsym $mod+Up focus up
  142. bindsym $mod+Right focus right
  143.  
  144. # move focused window
  145. bindsym $mod+Shift+j move left
  146. bindsym $mod+Shift+k move down
  147. bindsym $mod+Shift+l move up
  148. bindsym $mod+Shift+colon move right
  149.  
  150. # alternatively, you can use the cursor keys:
  151. bindsym $mod+Shift+Left move left
  152. bindsym $mod+Shift+Down move down
  153. bindsym $mod+Shift+Up move up
  154. bindsym $mod+Shift+Right move right
  155.  
  156. # split in horizontal orientation
  157. bindsym $mod+h split h
  158.  
  159. # split in vertical orientation
  160. bindsym $mod+v split v
  161.  
  162. # enter fullscreen mode for the focused container
  163. bindsym $mod+f fullscreen toggle
  164.  
  165. # change container layout (stacked, tabbed, toggle split)
  166. bindsym $mod+s layout stacking
  167. bindsym $mod+w layout tabbed
  168. bindsym $mod+e layout toggle split
  169.  
  170. # toggle tiling / floating
  171. bindsym $mod+Shift+space floating toggle
  172.  
  173. # change focus between tiling / floating windows
  174. bindsym $mod+space focus mode_toggle
  175.  
  176. # focus the parent container
  177. bindsym $mod+a focus parent
  178.  
  179. # focus the child container
  180. #bindsym $mod+d focus child
  181.  
  182. # switch to workspace
  183. bindsym $mod+1 workspace 1
  184. bindsym $mod+2 workspace 2
  185. bindsym $mod+3 workspace 3
  186. bindsym $mod+4 workspace 4
  187. bindsym $mod+5 workspace 5
  188. bindsym $mod+6 workspace 6
  189. bindsym $mod+7 workspace 7
  190. bindsym $mod+8 workspace 8
  191. bindsym $mod+9 workspace 9
  192. bindsym $mod+0 workspace 10
  193.  
  194. # move focused container to workspace
  195. bindsym $mod+Shift+1 move container to workspace 1
  196. bindsym $mod+Shift+2 move container to workspace 2
  197. bindsym $mod+Shift+3 move container to workspace 3
  198. bindsym $mod+Shift+4 move container to workspace 4
  199. bindsym $mod+Shift+5 move container to workspace 5
  200. bindsym $mod+Shift+6 move container to workspace 6
  201. bindsym $mod+Shift+7 move container to workspace 7
  202. bindsym $mod+Shift+8 move container to workspace 8
  203. bindsym $mod+Shift+9 move container to workspace 9
  204. bindsym $mod+Shift+0 move container to workspace 10
  205.  
  206. # reload the configuration file
  207. bindsym $mod+Shift+c reload
  208. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  209. bindsym $mod+Shift+r restart
  210. # exit i3 (logs you out of your X session)
  211. 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'"
  212.  
  213. # resize window (you can also use the mouse for that)
  214. mode "resize" {
  215.        # These bindings trigger as soon as you enter the resize mode
  216.  
  217.         # Pressing left will shrink the window’s width.
  218.        # Pressing right will grow the window’s width.
  219.        # Pressing up will shrink the window’s height.
  220.        # Pressing down will grow the window’s height.
  221.         bindsym j resize shrink width 10 px or 10 ppt
  222.         bindsym k resize grow height 10 px or 10 ppt
  223.         bindsym l resize shrink height 10 px or 10 ppt
  224.         bindsym semicolon resize grow width 10 px or 10 ppt
  225.  
  226.         # same bindings, but for the arrow keys
  227.         bindsym Left resize shrink width 10 px or 10 ppt
  228.         bindsym Down resize grow height 10 px or 10 ppt
  229.         bindsym Up resize shrink height 10 px or 10 ppt
  230.         bindsym Right resize grow width 10 px or 10 ppt
  231.  
  232.         # back to normal: Enter or Escape
  233.         bindsym Return mode "default"
  234.         bindsym Escape mode "default"
  235. }
  236.  
  237. bindsym $mod+r mode "resize"
  238.  
  239. ################################
  240. #  Colors
  241. #################################
  242.  
  243. client.focused #de84ce #de84ce #ffffff
  244. client.unfocused #007fd4 #333333 #D9D9D9
  245. client.focused_inactive #4d4d4d #4d4d4d #D9D9D9
  246. client.urgent #51c4d4 #ecedee #51c4d4
  247.  
  248. # Start i3bar to display a workspace bar (plus the system information i3status
  249. # finds out, if available)
  250. #bar {
  251. #       status_command i3blocks
  252. #       i3bar_command i3bar -t
  253. #   position top
  254. #   font pango:Liberation Mono, Icons 8
  255. #       strip_workspace_numbers yes
  256. #       separator_symbol "|"
  257. #       height 34
  258. #   colors {
  259. #       background #333333
  260. #       statusline #cadedd
  261. #       separator #d62e30
  262. #
  263. #       focused_workspace  #007fd4 #007fd4 #ffffff
  264. #           active_workspace   #007fd4 #007fd4 #ffffff
  265. #           inactive_workspace #4d4d4d #4d4d4d #ffffff
  266. #           urgent_workspace   #ff7443 #4d4d4d #ffffff
  267. #   }
  268. #}
  269. # Set background image with feh
  270. exec --no-startup-id feh --bg-scale ~/bg-fiona.jpg
  271.  
  272. ###########
  273. # POLYBAR #
  274. ###########
  275.  
  276. exec_always --no-startup-id killall polybar; polybar white
  277. #exec_always --no-startup-id polybar window
  278.  
  279. #gnome themes
  280. #exec --no-startup-id gnome-settings-daemon
  281.  
  282. #cursor
  283. exec --no-startup-id xrdb ~/.Xresources
  284.  
  285. #wifi applet
  286. #exec --no-startup-id nm-applet
  287. # redshift
  288. exec --no-startup-id redshift &
  289. # compton
  290. #exec --no-startup-id compton --config ~/.config/compton.conf -b
  291. exec --no-startup-id picom
  292.  
  293. # key bindings
  294. bindsym $mod+Next exec pamixer --increase 5
  295. bindsym $mod+Prior exec pamixer --decrease 5
  296.  
  297. # Multi-screen screenshots with scrot
  298. bindsym --release $mod+Print exec scrot 'screenshot_%Y%m%d_%H%M%S.png' -e 'mkdir -p ~/Pictures/screenshots && mv $f ~/Pictures/screenshots' # All screens
  299. # OSX-like area selection screenshots
  300. bindsym --release $mod+Shift+Print exec scrot -s 'screenshot_%Y%m%d_%H%M%S.png' -e 'mkdir -p ~/Pictures/screenshots && mv $f ~/Pictures/screenshots' # Area selection
  301. # scrot with timer
  302. bindsym --release $mod+Alt+Print exec scrot -d 5 'screenshot_%Y%m%d_%H%M%S.png' -e 'mkdir -p ~/Pictures/screenshots && mv $f ~/Pictures/screenshots' # All screens timed
  303.  
  304. bindsym $mod+Shift+x exec betterlockscreen -l
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement