Advertisement
Wrigs

i3 config

May 19th, 2024
545
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 11.37 KB | None | 0 0
  1. ################################################################################
  2. #
  3. #   __  __    __
  4. #   \ \/ / /\ \ \
  5. #    \ \ \/  \/ /
  6. # /\_/ /\  /\  /
  7. # \___/  \/  \/  
  8. #
  9. # This file has been auto-generated by i3-config-wizard(1).
  10. # It will not be overwritten, so edit it as you like.
  11. #
  12. # Should you change your keyboard layout some time, delete
  13. # this file and re-run i3-config-wizard(1).
  14. #
  15. # See http://i3wm.org/docs/userguide.html for a complete reference!
  16. #
  17. ################################################################################
  18.  
  19. # This file has been auto-generated by i3-config-wizard(1).
  20. # It will not be overwritten, so edit it as you like.
  21. #
  22. # Should you change your keyboard layout some time, delete
  23. # this file and re-run i3-config-wizard(1).
  24. #
  25.  
  26. # i3 config file (v4)
  27. #
  28. # Please see https://i3wm.org/docs/userguide.html for a complete reference!
  29.  
  30. set $mod Mod4
  31.  
  32. # Font for window titles. Will also be used by the bar unless a different font
  33. # is used in the bar {} block below.
  34. # font pango:monospace 10
  35. font pango:System-ui Regular 10
  36.  
  37. # This font is widely installed, provides lots of unicode glyphs, right-to-left
  38. # text rendering and scalability on retina/hidpi displays (thanks to pango).
  39. #font pango:DejaVu Sans Mono 8
  40.  
  41. # Start XDG autostart .desktop files using dex. See also
  42. # https://wiki.archlinux.org/index.php/XDG_Autostart
  43. exec --no-startup-id dex --autostart --environment i3
  44.  
  45. # The combination of xss-lock, nm-applet and pactl is a popular choice, so
  46. # they are included here as an example. Modify as you see fit.
  47.  
  48. # xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
  49. # screen before suspend. Use loginctl lock-session to lock your screen.
  50. exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
  51.  
  52. # NetworkManager is the most popular way to manage wireless networks on Linux,
  53. # and nm-applet is a desktop environment-independent system tray GUI for it.
  54. exec --no-startup-id nm-applet
  55.  
  56. # Use pactl to adjust volume in PulseAudio.
  57. set $refresh_i3status killall -SIGUSR1 i3status
  58. bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
  59. bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
  60. bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
  61. bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
  62.  
  63. # Use Mouse+$mod to drag floating windows to their wanted position
  64. floating_modifier $mod
  65.  
  66. # move tiling windows via drag & drop by left-clicking into the title bar,
  67. # or left-clicking anywhere into the window while holding the floating modifier.
  68. tiling_drag modifier titlebar
  69.  
  70. # start a terminal
  71. bindsym $mod+Return exec i3-sensible-terminal
  72.  
  73. # kill focused window
  74. bindsym $mod+Shift+q kill
  75.  
  76. # start dmenu (a program launcher)
  77. bindsym $mod+d exec --no-startup-id dmenu_run
  78. # A more modern dmenu replacement is rofi:
  79. # bindcode $mod+40 exec "rofi -modi drun,run -show drun"
  80. # There also is i3-dmenu-desktop which only displays applications shipping a
  81. # .desktop file. It is a wrapper around dmenu, so you need that installed.
  82. # bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
  83.  
  84.  
  85. # start j4-desktop-menu
  86. bindsym $mod+Shift+m exec --no-startup-id j4-dmenu-desktop
  87. # start rofi (a program launcher)
  88. bindsym $mod+m exec --no-startup-id "rofi -show drun -show-icons -display-drun prompt"
  89.  
  90. # change focus
  91. bindsym $mod+j focus left
  92. bindsym $mod+k focus down
  93. bindsym $mod+l focus up
  94. bindsym $mod+semicolon focus right
  95.  
  96. # alternatively, you can use the cursor keys:
  97. bindsym $mod+Left focus left
  98. bindsym $mod+Down focus down
  99. bindsym $mod+Up focus up
  100. bindsym $mod+Right focus right
  101.  
  102. # move focused window
  103. bindsym $mod+Shift+j move left
  104. bindsym $mod+Shift+k move down
  105. bindsym $mod+Shift+l move up
  106. bindsym $mod+Shift+semicolon move right
  107.  
  108. # alternatively, you can use the cursor keys:
  109. bindsym $mod+Shift+Left move left
  110. bindsym $mod+Shift+Down move down
  111. bindsym $mod+Shift+Up move up
  112. bindsym $mod+Shift+Right move right
  113.  
  114. # split in horizontal orientation
  115. bindsym $mod+h split h
  116.  
  117. # split in vertical orientation
  118. bindsym $mod+v split v
  119.  
  120. # enter fullscreen mode for the focused container
  121. bindsym $mod+f fullscreen toggle
  122.  
  123. # change container layout (stacked, tabbed, toggle split)
  124. bindsym $mod+s layout stacking
  125. bindsym $mod+w layout tabbed
  126. bindsym $mod+e layout toggle split
  127.  
  128. # toggle tiling / floating
  129. bindsym $mod+Shift+space floating toggle
  130.  
  131. # change focus between tiling / floating windows
  132. bindsym $mod+space focus mode_toggle
  133.  
  134. # focus the parent container
  135. bindsym $mod+a focus parent
  136.  
  137. # focus the child container
  138. #bindsym $mod+d focus child
  139.  
  140. ################################################################################
  141. ##  Workspaces
  142. ################################################################################
  143.  
  144. # Define names for default workspaces for which we configure key bindings later on.
  145. # We use variables to avoid repeating the names in multiple places.
  146. set $ws1 "1"
  147. set $ws2 "2"
  148. set $ws3 "3"
  149. set $ws4 "4"
  150. set $ws5 "5"
  151. set $ws6 "6"
  152. set $ws7 "7"
  153. set $ws8 "8"
  154. set $ws9 "9"
  155. set $ws10 "10"
  156.  
  157. # switch to workspace
  158. bindsym $mod+1 workspace number $ws1
  159. bindsym $mod+2 workspace number $ws2
  160. bindsym $mod+3 workspace number $ws3
  161. bindsym $mod+4 workspace number $ws4
  162. bindsym $mod+5 workspace number $ws5
  163. bindsym $mod+6 workspace number $ws6
  164. bindsym $mod+7 workspace number $ws7
  165. bindsym $mod+8 workspace number $ws8
  166. bindsym $mod+9 workspace number $ws9
  167. bindsym $mod+0 workspace number $ws10
  168.  
  169. # move focused container to workspace
  170. bindsym $mod+Shift+1 move container to workspace number $ws1
  171. bindsym $mod+Shift+2 move container to workspace number $ws2
  172. bindsym $mod+Shift+3 move container to workspace number $ws3
  173. bindsym $mod+Shift+4 move container to workspace number $ws4
  174. bindsym $mod+Shift+5 move container to workspace number $ws5
  175. bindsym $mod+Shift+6 move container to workspace number $ws6
  176. bindsym $mod+Shift+7 move container to workspace number $ws7
  177. bindsym $mod+Shift+8 move container to workspace number $ws8
  178. bindsym $mod+Shift+9 move container to workspace number $ws9
  179. bindsym $mod+Shift+0 move container to workspace number $ws10
  180.  
  181. # reload the configuration file
  182. bindsym $mod+Shift+c reload
  183. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  184. bindsym $mod+Shift+r restart
  185. # exit i3 (logs you out of your X session)
  186. 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'"
  187.  
  188. # resize window (you can also use the mouse for that)
  189. mode "resize" {
  190.         # These bindings trigger as soon as you enter the resize mode
  191.  
  192.         # Pressing left will shrink the window’s width.
  193.         # Pressing right will grow the window’s width.
  194.         # Pressing up will shrink the window’s height.
  195.         # Pressing down will grow the window’s height.
  196.         bindsym j resize shrink width 10 px or 10 ppt
  197.         bindsym k resize grow height 10 px or 10 ppt
  198.         bindsym l resize shrink height 10 px or 10 ppt
  199.         bindsym semicolon resize grow width 10 px or 10 ppt
  200.  
  201.         # same bindings, but for the arrow keys
  202.         bindsym Left resize shrink width 10 px or 10 ppt
  203.         bindsym Down resize grow height 10 px or 10 ppt
  204.         bindsym Up resize shrink height 10 px or 10 ppt
  205.         bindsym Right resize grow width 10 px or 10 ppt
  206.  
  207.         # back to normal: Enter or Escape or $mod+r
  208.         bindsym Return mode "default"
  209.         bindsym Escape mode "default"
  210.         bindsym $mod+r mode "default"
  211. }
  212.  
  213. bindsym $mod+r mode "resize"
  214.  
  215. # Start i3bar to display a workspace bar (plus the system information i3status
  216. # finds out, if available)
  217. bar {
  218.         status_command i3status
  219.         position top
  220.         font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
  221.         font pango:System-ui Regular 11
  222. }
  223.  
  224.  
  225. ################################################################################
  226. ##  Floating or Tiled
  227. ################################################################################
  228.  
  229. #floating enabled from some programs - find with xprop
  230.  
  231. for_window [class="Bleachbit"] floating disable
  232. for_window [class="Blueberry.py"] floating enable
  233. for_window [class="Brasero"] floating disable
  234. for_window [class="Galculator"] floating enable
  235. for_window [class="Gnome-Calculator"] floating enable
  236. for_window [class="Gnome-disks"] floating disable
  237. for_window [class="^Gnome-font-viewer$"] floating enable
  238. for_window [class="^Gpick$"] floating enable
  239. for_window [class="Hexchat"] floating disable
  240. for_window [class="Imagewriter"] floating enable
  241. for_window [class="Font-manager"] floating enable
  242. # for_window [class="qt5ct|Lxappearance] floating enable
  243. for_window [class="Nitrogen"] floating disable
  244. for_window [class="Pavucontrol"] floating disable
  245. for_window [class="Peek"] floating enable
  246. # for_window [class="^Skype$"] floating enable
  247. for_window [class="^Spotify$"] floating disable
  248. for_window [class="System-config-printer.py"] floating enable
  249. for_window [class="Unetbootin.elf"] floating enable
  250. for_window [class="Usb-creator-gtk"] floating enable
  251. for_window [class="^Vlc$"] floating disable
  252. for_window [class="Wine"] floating disable
  253. for_window [class="Xfburn"] floating disable
  254. for_window [class="Xfce4-appfinder"] floating enable
  255. for_window [class="Xfce4-settings-manager"] floating disable
  256. for_window [class="Xfce4-taskmanager"] floating enable
  257. for_window [class="KeePassXC"] floating enable
  258.  
  259.  
  260. #for_window [instance="gimp"] floating disable
  261. #for_window [instance="script-fu"] border normal
  262. # for_window [instance="variety"] floating disable
  263.  
  264.  
  265. for_window [title="Copying"] floating enable
  266. for_window [title="Deleting"] floating enable
  267. for_window [title="Moving"] floating enable
  268. for_window [title="^Terminator Preferences$"] floating enable
  269.  
  270.  
  271. #for_window [window_role="^gimp-toolbox-color-dialog$"] floating enable
  272. for_window [window_role="pop-up"] floating enable
  273. for_window [window_role="^Preferences$"] floating enable
  274. for_window [window_role="setup"] floating enable
  275.  
  276.  
  277.  
  278. ################################################################################
  279. ##  Give Focus to Applications
  280. ################################################################################
  281.  
  282. for_window [class="Alactritty"] focus
  283. for_window [class="Gnome-terminal"] focus
  284. for_window [class="Termite"] focus
  285. for_window [class="Terminator"] focus
  286. for_window [class="Tilix"] focus
  287. for_window [class="Urxvt"] focus
  288.  
  289.  
  290. ################################################################################
  291. ##  Settings for I3 gaps
  292. ################################################################################
  293.  
  294. # https://i3wm.org/docs/userguide.html#gaps
  295. # delete or uncomment the following lines if you do not have it or do not
  296. # want it
  297.  
  298.  
  299. for_window [class="^.*"] border pixel 2
  300.  
  301. # Inner gaps for all windows: space between two adjacent windows (or split containers).
  302. gaps inner 6
  303.  
  304. # Outer gaps for all windows: space along the screen edges.
  305. gaps outer 6
  306.  
  307. ################################################################################
  308. ##  AutoStart Apps
  309. ################################################################################
  310. exec_always --no-startup-id nitrogen --restore
  311.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement