SHARE
TWEET

i3-config

a guest Jan 26th, 2020 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #  _ _____                    __ _
  2. # (_)___ /    ___ ___  _ __  / _(_) __ _
  3. # | | |_ \   / __/ _ \| '_ \| |_| |/ _` |
  4. # | |___) | | (_| (_) | | | |  _| | (_| |
  5. # |_|____/   \___\___/|_| |_|_| |_|\__, |
  6. #                                  |___/
  7.  
  8. # This file has been auto-generated by i3-config-wizard(1).
  9. # It will not be overwritten, so edit it as you like.
  10. # Should you change your keyboard layout some time, delete
  11. # this file and re-run i3-config-wizard(1).
  12.  
  13. # i3 config file (v4)
  14. # Please see http://i3wm.org/docs/userguide.html for a complete reference!
  15.  
  16. # Font for window titles. Will also be used by the bar unless a different font
  17. # is used in the bar {} block below.
  18. # This font is widely installed, provides lots of unicode glyphs, right-to-left
  19. # text rendering and scalability on retina/hidpi displays (thanks to pango).
  20. # font pango:Font Awesome 5 Free,System San Francisco Display 10
  21. font pango:System San Francisco Display 10
  22.  
  23. # Modifier key: Mod4 == Super(Win)
  24. set $mod Mod4
  25.  
  26. # ==================================================
  27.  
  28. # GENERAL SETTINGS:
  29.  
  30. # Prevent mouse from stealing focus.
  31. focus_follows_mouse no
  32.  
  33. # This prevens moving of mouse when focusing on other output.
  34. mouse_warping none
  35.  
  36. # The middle button over a titlebar kills the window.
  37. bindsym --release button2 kill
  38.  
  39. # The middle button and a modifer over any part of the window kills the window.
  40. bindsym --whole-window $mod+button2 kill
  41.  
  42. # The right button toggles floating.
  43. bindsym button3 floating toggle
  44. bindsym $mod+button3 floating toggle
  45.  
  46. # The side mouse buttons move the window around.
  47. bindsym button9 move left
  48. bindsym button8 move right
  49.  
  50. # Move current workspace between monitors.
  51. bindsym $mod+Shift+semicolon move workspace to output left
  52.  
  53. # Move focus to other monitor.
  54. bindsym $mod+m focus output left
  55.  
  56. # Focus of previous workspace.
  57. # If you pressed $mod+5 to switch to ws5, press it again to go to where you were before.
  58. workspace_auto_back_and_forth yes
  59.  
  60. # Create new workspace on current output.
  61. # Open the workspace following the highest on the focused output.
  62. bindsym $mod+Shift+n exec --no-startup-id python ~/.config/i3/new_workspace.py
  63. # Open the lowest free workspace on the focused output.
  64. bindsym $mod+n exec --no-startup-id python ~/.config/i3/new_workspace.py --fill-holes
  65.  
  66. # Swap currently focused container with (next) largest one.
  67. bindsym $mod+p exec --no-startup-id python3 ~/.config/i3/swapper.py
  68.  
  69. # Use Mouse+$mod to drag floating windows.
  70. floating_modifier $mod
  71.  
  72. # Start a terminal
  73. bindsym $mod+slash split vertical ; exec gnome-terminal --window-with-profile='normal-dark'
  74. bindsym $mod+apostrophe split horizontal ; exec gnome-terminal --window-with-profile='normal-dark'
  75.  
  76. # Kill focused window.
  77. bindsym $mod+Shift+q kill
  78.  
  79. # Change focus.
  80. bindsym $mod+h focus left
  81. bindsym $mod+j focus down
  82. bindsym $mod+k focus up
  83. bindsym $mod+l focus right
  84.  
  85. # Move focused window.
  86. bindsym $mod+Shift+h move left
  87. bindsym $mod+Shift+j move down
  88. bindsym $mod+Shift+k move up
  89. bindsym $mod+Shift+l move right
  90.  
  91. # Split in horizontal orientation.
  92. bindsym $mod+g split h
  93.  
  94. # Split in vertical orientation.
  95. bindsym $mod+v split v
  96.  
  97. # Enter fullscreen mode for the focused container.
  98. bindsym $mod+f fullscreen
  99.  
  100. # Change container layout (tabbed, toggle split).
  101.  
  102. bindsym $mod+w layout tabbed
  103.  
  104. bindsym $mod+e layout toggle split
  105.  
  106. # Toggle tiling / floating.
  107. bindsym $mod+Shift+space floating toggle
  108.  
  109. # Change focus between tiling / floating windows.
  110. bindsym $mod+space focus mode_toggle
  111.  
  112. # Focus the parent container.
  113. bindsym $mod+a focus parent
  114. bindsym $mod+Shift+a focus child
  115. bindsym $mod+x focus child
  116.  
  117. # Reload the configuration file.
  118. bindsym $mod+Shift+r restart
  119.  
  120. # Exit i3 (logs you out of your X session).
  121. 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'"
  122.  
  123. # ==================================================
  124.  
  125. # WORKSPACES
  126.  
  127. # Names of Workspaces.
  128. set $1  1
  129. set $2  2
  130. set $3  3
  131. set $4  4
  132. set $5  5
  133. set $6  6
  134. set $7  7
  135. set $8  8
  136. set $9  9
  137. set $10 10
  138.  
  139. # Switch to workspace.
  140. bindsym $mod+1 workspace $1
  141. bindsym $mod+2 workspace $2
  142. bindsym $mod+3 workspace $3
  143. bindsym $mod+4 workspace $4
  144. bindsym $mod+5 workspace $5
  145. bindsym $mod+6 workspace $6
  146. bindsym $mod+7 workspace $7
  147. bindsym $mod+8 workspace $8
  148. bindsym $mod+9 workspace $9
  149. bindsym $mod+0 workspace $10
  150.  
  151. # With dual monitors primary are odd, non-primary are even numbered.
  152. workspace $1 output primary
  153. workspace $3 output primary
  154. workspace $5 output primary
  155. workspace $7 output primary
  156. workspace $9 output primary
  157. workspace $2 output eDP-1 VGA-1
  158. workspace $4 output eDP-1 VGA-1
  159. workspace $6 output eDP-1 VGA-1
  160. workspace $8 output eDP-1 VGA-1
  161. workspace $10 output eDP-1 VGA-1
  162.  
  163. # Switch to neighboring workspace.
  164. bindsym $mod+i workspace prev_on_output
  165. bindsym $mod+o workspace next_on_output
  166. bindsym $mod+Shift+i move container to workspace prev_on_output
  167. bindsym $mod+Shift+o move container to workspace next_on_output
  168.  
  169. # Move focused container to workspace
  170. bindsym $mod+Shift+1 move container to workspace $1
  171. bindsym $mod+Shift+2 move container to workspace $2
  172. bindsym $mod+Shift+3 move container to workspace $3
  173. bindsym $mod+Shift+4 move container to workspace $4
  174. bindsym $mod+Shift+5 move container to workspace $5
  175. bindsym $mod+Shift+6 move container to workspace $6
  176. bindsym $mod+Shift+7 move container to workspace $7
  177. bindsym $mod+Shift+8 move container to workspace $8
  178. bindsym $mod+Shift+9 move container to workspace $9
  179. bindsym $mod+Shift+0 move container to workspace $10
  180.  
  181. # ==================================================
  182.  
  183. # GAPS:
  184.  
  185. set $gaps_inner 10
  186. set $gaps_outer 0
  187.  
  188. gaps inner $gaps_inner
  189. gaps outer $gaps_outer
  190.  
  191. # Only enable gaps when there is more than one container.
  192. # smart_gaps off
  193.  
  194. # Activate smart borders: don't show any unless multiple containers.
  195. smart_borders on
  196.  
  197. # ==================================================
  198.  
  199. # MODES: RESIZE and MOUSEMOVE
  200.  
  201. # Resize window (you can also use the mouse for that).
  202. mode "resize" {
  203.         # These bindings trigger as soon as you enter the resize mode.
  204.         bindsym h resize shrink width 5 px or 5 ppt
  205.         bindsym k resize grow height 5 px or 5 ppt
  206.         bindsym j resize shrink height 5 px or 5 ppt
  207.         bindsym l resize grow width 5 px or 5 ppt
  208.  
  209.         # Back to normal: Enter or Escape
  210.         bindsym Return mode "default"
  211.         bindsym Escape mode "default"
  212.         bindsym q mode "default"
  213.         bindsym f mode "default"
  214.  
  215.         # Inner gaps: I for Inner
  216.         bindsym Shift+i gaps inner current minus 5
  217.         bindsym i gaps inner current plus 5
  218.         bindsym Control+Shift+i gaps inner all minus 5
  219.         bindsym Control+i gaps inner all plus 5
  220.  
  221.         # Outer gaps: O for Outer
  222.         bindsym Shift+o gaps outer current minus 5
  223.         bindsym o gaps outer current plus 5
  224.         bindsym Control+Shift+o gaps outer all minus 5
  225.         bindsym Control+o gaps outer all plus 5
  226.  
  227.         # Return gaps to default: D for Default
  228.         bindsym d gaps inner current set $gaps_inner; gaps outer current set $gaps_outer
  229.         bindsym Control+d gaps inner all set $gaps_inner; gaps outer all set $gaps_outer
  230.  
  231.         # Set gaps to 0: stretch windows: S for Stretch
  232.         bindsym s gaps inner current set 0; gaps outer current set 0
  233.         bindsym Control+s gaps inner all set 0; gaps outer all set 0
  234.  
  235.         # Toggle i3-read-mode
  236.         bindsym r exec i3-read-mode-toggle; mode "default"
  237. }
  238. bindsym $mod+r mode "resize"
  239.  
  240. # Move cursor with keyboard.
  241. mode "mousemove" {
  242.         # Move cursor with h, j, k, l.
  243.         # Move it a little slower with Shift + h, j, k, l.
  244.  
  245.         bindsym h exec xdotool mousemove_relative -- -15 0
  246.         bindsym j exec xdotool mousemove_relative -- 0 15
  247.         bindsym k exec xdotool mousemove_relative -- 0 -15
  248.         bindsym l exec xdotool mousemove_relative -- 15 0
  249.  
  250.         bindsym Shift+h exec xdotool mousemove_relative -- -5 0
  251.         bindsym Shift+j exec xdotool mousemove_relative -- 0 5
  252.         bindsym Shift+k exec xdotool mousemove_relative -- 0 -5
  253.         bindsym Shift+l exec xdotool mousemove_relative -- 5 0
  254.  
  255.         bindsym Control+h exec xdotool mousemove_relative -- -45 0
  256.         bindsym Control+j exec xdotool mousemove_relative -- 0 45
  257.         bindsym Control+k exec xdotool mousemove_relative -- 0 -45
  258.         bindsym Control+l exec xdotool mousemove_relative -- 45 0
  259.  
  260.         bindsym i exec xdotool click 1 # left click
  261.         bindsym o exec xdotool click 3 # right click
  262.  
  263.         # Back to normal: Enter or Escape
  264.         bindsym Return mode "default"
  265.         bindsym Escape mode "default"
  266.         bindsym q mode "default"
  267. }
  268. bindsym $mod+Shift+m mode "mousemove"
  269.  
  270. # ==================================================
  271.  
  272. # BORDERS and GENERAL LOOKS
  273.  
  274. # 2px wide border with titlebar at the top.
  275. # default_border normal
  276. default_border pixel 2
  277.  
  278. # pixel 2 is same thickness as normal but without titlebars - this is cleaner but less readable.
  279. default_floating_border none
  280.  
  281. # ==================================================
  282.  
  283. # COLOR CONFIG - gruvbox
  284.  
  285. # Please see https://github.com/morhetz/gruvbox for reference
  286. set $black  #000000
  287. set $white  #FFFFFF
  288. set $bg     #282828
  289. set $gray   #928374
  290. set $bg4    #7C6F64
  291. set $red    #FB4934
  292. set $fg2    #D5C4A1
  293. set $orange #D79921
  294.  
  295. #                       border   backgr. text    child_border
  296. client.unfocused        $bg      $bg     $gray   $bg4
  297. client.focused_inactive $bg      $bg     $gray   $bg4
  298. # client.focused          $black   $black  $gray   $bg4
  299. client.focused          $gray    $gray   $bg     $fs2
  300. client.urgent           $red     $red    $black  $bg4
  301.  
  302. # ==================================================
  303.  
  304. # STATUS BAR:
  305.  
  306. bar {
  307.     tray_output primary
  308.     position bottom
  309.     workspace_buttons yes
  310.     status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf
  311.     colors {
  312.         # separator is pipe character in i3blocks, background is background and statusline is default text color.
  313.         separator  $black
  314.         background $black
  315.         statusline $fg2
  316.  
  317.         #                   border  backgr. text
  318.         focused_workspace   $fg2    $fg2    $black
  319.         active_workspace    $bg     $bg     $fg2
  320.         inactive_workspace  $black  $black  $fg2
  321.         urgent_workspace    $red    $red    $black
  322.     }
  323. }
  324.  
  325. # ==================================================
  326.  
  327. # WINDOW BEHAVIOR:
  328.  
  329. # Fullsceen windows - if window is titeled 'fullscreen' it's fullscreened.
  330. for_window [title="fullscreen"] fullscreen
  331. for_window [title="fullscreen"] border pixel 0
  332. for_window [title="Floating"] floating enable
  333. for_window [title=".*vimclip.*"] floating enable; resize set 720 510; move position center
  334. for_window [title="fehqr"] floating enable
  335. for_window [title="fehscrot"] floating enable
  336. for_window [floating] border none
  337. for_window [instance=blueman-manager] floating enable; resize set 720 510
  338. for_window [instance=blueman-manager] border pixel 0
  339.  
  340. # Dropdowns and Scratchpads:
  341.  
  342. # Terminal
  343. for_window [title="dropdown-terminal"] floating enable
  344. for_window [title="dropdown-terminal"] border pixel 0
  345. for_window [title="dropdown-terminal"] sticky enable
  346. for_window [title="dropdown-terminal"] resize set 720 510
  347. for_window [title="dropdown-terminal"] move scratchpad
  348. bindsym $mod+u [instance="gnome-terminal-server" floating] scratchpad show; move position center
  349.  
  350. # Pavucontrol
  351. for_window [instance=pavucontrol] floating enable
  352. for_window [instance=pavucontrol] move scratchpad
  353. for_window [instance=pavucontrol] resize set 720 510
  354. for_window [instance=pavucontrol] border pixel 0
  355. bindsym $mod+minus [instance=pavucontrol] scratchpad show; move position center
  356.  
  357. # Dropdown Calculator
  358. for_window [class=Calculator] floating enable
  359. for_window [class=Calculator] move scratchpad
  360. for_window [class=Calculator] resize set 720 510
  361. for_window [class=Calculator] border pixel 0
  362. bindsym $mod+y [class=Calculator] scratchpad show; move position center
  363.  
  364. # Signal messenger
  365. for_window [instance=signal] floating enable
  366. for_window [instance=signal] move scratchpad
  367. for_window [instance=signal] resize set 1000 600
  368. for_window [instance=signal] border pixel 0
  369. bindsym $mod+t [instance=signal] scratchpad show; move position center
  370.  
  371. # Caprine - Facebook messenger
  372. for_window [instance=caprine] floating enable
  373. for_window [instance=caprine] move scratchpad
  374. for_window [instance=caprine] resize set 1000 600
  375. for_window [instance=caprine] border pixel 0
  376. bindsym $mod+Shift+apostrophe [instance=caprine] scratchpad show; move position center
  377.  
  378. # KEYBOARD BINDS HAVE BEEN MIGRATED TO ~/.config/sxhkd/sxhkdrc
  379. # REFER TO THAT FILE FOR CUSTOMIZATION.
  380. # PROGRAMS ARE ALWAYS OPENED WITH sxhkd!
  381.  
  382. # Firefox - has some problems when launched with sxhkd
  383. bindsym $mod+c exec firefox
  384.  
  385. # ==================================================
  386.  
  387. # AUTO-EXECS
  388.  
  389. exec --no-startup-id gnome-terminal --title 'dropdown-terminal' --window-with-profile='dropdown-dark'
  390. exec --no-startup-id gnome-calculator --class=Calculator
  391. exec --no-startup-id pavucontrol
  392. exec --no-startup-id blueman-applet
  393. exec --no-startup-id nm-applet
  394. exec --no-startup-id autorandr --change --force
  395.  
  396. # exec --no-startup-id signal-desktop
  397. # exec --no-startup-id caprine
  398.  
  399. # Notification settings
  400. exec_always killall dunst; dunst
  401.  
  402. # Enable other keybinds
  403. exec_always killall sxhkd; sxhkd
  404.  
  405. # Set gnome-terminal theme
  406. exec_always cat ~/.config/gnome-terminal/gnome-terminal.conf | dconf load /org/gnome/terminal/legacy/profiles:/
  407.  
  408. # Set system theme.
  409. exec_always xrdb ~/.Xresources
  410.  
  411. # Swap Control and Caps_Lock.
  412. exec xmodmap ~/.config/i3/swap-control-and-caps
  413.  
  414. # Compton.
  415. exec_always --no-startup-id  killall compton; compton --config ~/.config/compton/compton.conf
  416.  
  417. # Automatically lock after 5 min of inactivity. IMPORTANT!
  418. exec_always --no-startup-id killall xautolock; xautolock -locker "/usr/bin/i3lock -i ~/Pictures/Wallpapers/rms-memes/2.png -t" -time 5 -detectsleep -notify 30 -notifier "notify-send -t 29000 -- 'LOCKING IN 30 SECONDS'"
  419.  
  420. # Wallpaper.
  421. exec_always feh --bg-fill /home/maks/.config/wallpaper/dark
  422.  
  423. # Emacs.
  424. exec emacs --daemon
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top