Advertisement
Wrigs

i3 Config

Apr 14th, 2024 (edited)
728
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 13.32 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. # Modified by Jeff Wrigley
  16. # See http://i3wm.org/docs/userguide.html for a complete reference!
  17. #
  18. ################################################################################
  19.  
  20. # This file has been auto-generated by i3-config-wizard(1).
  21. # It will not be overwritten, so edit it as you like.
  22. #
  23. # Should you change your keyboard layout some time, delete
  24. # this file and re-run i3-config-wizard(1).
  25. #
  26.  
  27. # i3 config file (v4)
  28. #
  29. # Please see https://i3wm.org/docs/userguide.html for a complete reference!
  30.  
  31. set $mod Mod4
  32.  
  33. # Font for window titles. Will also be used by the bar unless a different font
  34. # is used in the bar {} block below.
  35. font pango:System San Francisco Display 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 10
  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 Mouse+$mod to drag floating windows to their wanted position
  57. floating_modifier $mod
  58.  
  59. # start a terminal
  60. bindsym $mod+Return exec i3-sensible-terminal
  61.  
  62. # kill focused window
  63. bindsym $mod+Shift+q kill
  64.  
  65. # start dmenu (a program launcher)
  66. # bindsym $mod+d exec --no-startup-id dmenu_run
  67. # A more modern dmenu replacement is rofi:
  68. # bindcode $mod+40 exec "rofi -modi drun,run -show drun"
  69. # There also is i3-dmenu-desktop which only displays applications shipping a
  70. # .desktop file. It is a wrapper around dmenu, so you need that installed.
  71. # bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
  72.  
  73. # start rofi (a program launcher)
  74. bindsym $mod+d exec --no-startup-id rofi -show drun -show-icons -display-drun prompt
  75.  
  76. # change focus
  77. bindsym $mod+j focus left
  78. bindsym $mod+k focus down
  79. bindsym $mod+l focus up
  80. bindsym $mod+semicolon focus right
  81.  
  82. # alternatively, you can use the cursor keys:
  83. bindsym $mod+Left focus left
  84. bindsym $mod+Down focus down
  85. bindsym $mod+Up focus up
  86. bindsym $mod+Right focus right
  87.  
  88. # move focused window
  89. bindsym $mod+Shift+j move left
  90. bindsym $mod+Shift+k move down
  91. bindsym $mod+Shift+l move up
  92. bindsym $mod+Shift+semicolon move right
  93.  
  94. # alternatively, you can use the cursor keys:
  95. bindsym $mod+Shift+Left move left
  96. bindsym $mod+Shift+Down move down
  97. bindsym $mod+Shift+Up move up
  98. bindsym $mod+Shift+Right move right
  99.  
  100. # split in horizontal orientation
  101. bindsym $mod+h split h
  102.  
  103. # split in vertical orientation
  104. bindsym $mod+v split v
  105.  
  106. # enter fullscreen mode for the focused container
  107. bindsym $mod+f fullscreen toggle
  108.  
  109. # change container layout (stacked, tabbed, toggle split)
  110. bindsym $mod+s layout stacking
  111. bindsym $mod+w layout tabbed
  112. bindsym $mod+e layout toggle split
  113.  
  114. # toggle tiling / floating
  115. bindsym $mod+Shift+space floating toggle
  116.  
  117. # change focus between tiling / floating windows
  118. bindsym $mod+space focus mode_toggle
  119.  
  120. # focus the parent container
  121. bindsym $mod+a focus parent
  122.  
  123. # focus the child container
  124. #bindsym $mod+d focus child
  125.  
  126.  
  127. ################################################################################
  128. ##  Workspaces
  129. ################################################################################
  130.  
  131. # Define names for default workspaces for which we configure key bindings later on.
  132. # We use variables to avoid repeating the names in multiple places.
  133. set $ws1 "1"
  134. set $ws2 "2"
  135. set $ws3 "3"
  136. set $ws4 "4"
  137. set $ws5 "5"
  138. set $ws6 "6"
  139. set $ws7 "7"
  140. set $ws8 "8"
  141. set $ws9 "9"
  142. set $ws10 "10"
  143.  
  144. # switch to workspace
  145. bindsym $mod+1 workspace number $ws1
  146. bindsym $mod+2 workspace number $ws2
  147. bindsym $mod+3 workspace number $ws3
  148. bindsym $mod+4 workspace number $ws4
  149. bindsym $mod+5 workspace number $ws5
  150. bindsym $mod+6 workspace number $ws6
  151. bindsym $mod+7 workspace number $ws7
  152. bindsym $mod+8 workspace number $ws8
  153. bindsym $mod+9 workspace number $ws9
  154. bindsym $mod+0 workspace number $ws10
  155.  
  156. # move focused container to workspace
  157. bindsym $mod+Shift+1 move container to workspace number $ws1
  158. bindsym $mod+Shift+2 move container to workspace number $ws2
  159. bindsym $mod+Shift+3 move container to workspace number $ws3
  160. bindsym $mod+Shift+4 move container to workspace number $ws4
  161. bindsym $mod+Shift+5 move container to workspace number $ws5
  162. bindsym $mod+Shift+6 move container to workspace number $ws6
  163. bindsym $mod+Shift+7 move container to workspace number $ws7
  164. bindsym $mod+Shift+8 move container to workspace number $ws8
  165. bindsym $mod+Shift+9 move container to workspace number $ws9
  166. bindsym $mod+Shift+0 move container to workspace number $ws10
  167.  
  168. # reload the configuration file
  169. bindsym $mod+Shift+c reload
  170. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  171. bindsym $mod+Shift+r restart
  172. # exit i3 (logs you out of your X session)
  173. 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'"
  174.  
  175. # resize window (you can also use the mouse for that)
  176. mode "resize" {
  177.         # These bindings trigger as soon as you enter the resize mode
  178.  
  179.         # Pressing left will shrink the window’s width.
  180.         # Pressing right will grow the window’s width.
  181.         # Pressing up will shrink the window’s height.
  182.         # Pressing down will grow the window’s height.
  183.         bindsym j resize shrink width 10 px or 10 ppt
  184.         bindsym k resize grow height 10 px or 10 ppt
  185.         bindsym l resize shrink height 10 px or 10 ppt
  186.         bindsym semicolon resize grow width 10 px or 10 ppt
  187.  
  188.         # same bindings, but for the arrow keys
  189.         bindsym Left resize shrink width 10 px or 10 ppt
  190.         bindsym Down resize grow height 10 px or 10 ppt
  191.         bindsym Up resize shrink height 10 px or 10 ppt
  192.         bindsym Right resize grow width 10 px or 10 ppt
  193.  
  194.         # back to normal: Enter or Escape or $mod+r
  195.         bindsym Return mode "default"
  196.         bindsym Escape mode "default"
  197.         bindsym $mod+r mode "default"
  198. }
  199.  
  200. bindsym $mod+r mode "resize"
  201.  
  202. # Start i3bar to display a workspace bar (plus the system information i3status
  203. # finds out, if available)
  204. bar {
  205.         status_command i3status
  206.         position top
  207.         font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
  208.         font pango:System San Francisco Display 11
  209. }
  210.  
  211. ################################################################################
  212. ##  Floating or Tiled
  213. ################################################################################
  214.  
  215. #floating enabled from some programs - find with xprop
  216.  
  217. # for_window [class="Arcolinux-welcome-app.py"] floating enable
  218. # for_window [class="Arcolinux-tweak-tool.py"] floating enable
  219. # for_window [class="Arcolinux-calamares-tool.py"] floating enable
  220. for_window [class="Bleachbit"] floating disable
  221. for_window [class="Blueberry.py"] floating enable
  222. for_window [class="Brasero"] floating disable
  223. for_window [class="Galculator"] floating enable
  224. for_window [class="Gnome-disks"] floating disable
  225. for_window [class="^Gnome-font-viewer$"] floating enable
  226. for_window [class="^Gpick$"] floating enable
  227. for_window [class="Hexchat"] floating disable
  228. for_window [class="Imagewriter"] floating enable
  229. for_window [class="Font-manager"] floating enable
  230. # for_window [class="qt5ct|Lxappearance] floating enable
  231. for_window [class="Nitrogen"] floating disable
  232. for_window [class="Pavucontrol"] floating disable
  233. for_window [class="Peek"] floating enable
  234. # for_window [class="^Skype$"] floating enable
  235. for_window [class="^Spotify$"] floating disable
  236. for_window [class="System-config-printer.py"] floating enable
  237. for_window [class="Unetbootin.elf"] floating enable
  238. for_window [class="Usb-creator-gtk"] floating enable
  239. for_window [class="^Vlc$"] floating disable
  240. for_window [class="Wine"] floating disable
  241. for_window [class="Xfburn"] floating disable
  242. for_window [class="Xfce4-appfinder"] floating enable
  243. for_window [class="Xfce4-settings-manager"] floating disable
  244. for_window [class="Xfce4-taskmanager"] floating enable
  245. for_window [class="KeePassXC"] floating enable
  246.  
  247.  
  248. #for_window [instance="gimp"] floating disable
  249. #for_window [instance="script-fu"] border normal
  250. # for_window [instance="variety"] floating disable
  251.  
  252.  
  253. for_window [title="Copying"] floating enable
  254. for_window [title="Deleting"] floating enable
  255. for_window [title="Moving"] floating enable
  256. for_window [title="^Terminator Preferences$"] floating enable
  257.  
  258.  
  259. #for_window [window_role="^gimp-toolbox-color-dialog$"] floating enable
  260. for_window [window_role="pop-up"] floating enable
  261. for_window [window_role="^Preferences$"] floating enable
  262. for_window [window_role="setup"] floating enable
  263.  
  264.  
  265.  
  266. ################################################################################
  267. ##  Give Focus to Applications
  268. ################################################################################
  269.  
  270. for_window [class="Alactritty"] focus
  271. for_window [class="Gnome-terminal"] focus
  272. for_window [class="Termite"] focus
  273. for_window [class="Terminator"] focus
  274. for_window [class="Tilix"] focus
  275. for_window [class="Urxvt"] focus
  276.  
  277.  
  278. ################################################################################
  279. ## PulseAudio controls
  280. ################################################################################
  281.  
  282. bindsym $mod+F10 exec pactl set-sink-mute @DEFAULT_SINK@ toggle # Mute
  283. bindsym $mod+F11 exec pactl set-sink-volume @DEFAULT_SINK@ -5%  # Up
  284. bindsym $mod+F12 exec pactl set-sink-volume @DEFAULT_SINK@ +5%  # Down
  285.  
  286. # Use pactl to adjust volume in PulseAudio.
  287. set $refresh_i3status killall -SIGUSR1 i3status
  288. bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
  289. bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
  290. bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
  291. bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
  292.  
  293.  
  294. ################################################################################
  295. ##  Settings for I3 gaps
  296. ################################################################################
  297.  
  298. # https://i3wm.org/docs/userguide.html#gaps
  299. # delete or uncomment the following lines if you do not have it or do not
  300. # want it
  301.  
  302.  
  303. for_window [class="^.*"] border pixel 2
  304.  
  305. # Inner gaps for all windows: space between two adjacent windows (or split containers).
  306. gaps inner 6
  307.  
  308. # Outer gaps for all windows: space along the screen edges.
  309. gaps outer 6
  310.  
  311. # Inner and outer gaps for all windows on a specific workspace.
  312. # <ws> can be a workspace number or name.
  313. # workspace <ws> gaps inner <gap_size>[px]
  314. # workspace <ws> gaps outer|horizontal|vertical|top|left|bottom|right <gap_size>[px]
  315.  
  316. # Enabling “Smart Gaps” means no gaps will be shown when there is
  317. # precisely one window or split container on the workspace.
  318. #
  319. # inverse_outer only enables outer gaps when there is exactly one
  320. # window or split container on the workspace.
  321. # smart_gaps on|off|inverse_outer
  322.  
  323.  
  324. ################################################################################
  325. ##  AutoStart Apps
  326. ################################################################################
  327. exec_always --no-startup-id nitrogen --restore
  328.  
  329.  
  330. # TRAY APPLICATIONS
  331.  
  332. # applications that are not installed will not start
  333. # you may see a wheel - hashtag out things you do not want
  334.  
  335. # Authentication dialog
  336. # exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
  337.  
  338. # Updater
  339. # exec --no-startup-id pamac-tray
  340.  
  341. # bluetooth
  342. # exec --no-startup-id blueberry-tray
  343.  
  344. # network
  345. exec --no-startup-id nm-applet
  346.  
  347. # num lock activated
  348. exec_always --no-startup-id numlockx on
  349.  
  350. # dropbox
  351. #exec --no-startup-id dropbox start
  352.  
  353. # insync
  354. # exec --no-startup-id insync start
  355.  
  356. # Volume
  357. #exec --no-startup-id pasystray
  358. exec --no-startup-id volumeicon
  359.  
  360. # Variety
  361. # exec --no-startup-id variety
  362.  
  363. # clipman
  364. # exec --no-startup-id xfce4-clipman
  365.  
  366. # Conky
  367. exec --no-startup-id conky -c ~/.config/i3/system-overview
  368.  
  369. # feh sets wallpaper
  370. # exec --no-startup-id feh --bg-fill /usr/share/backgrounds/arcolinux/arco-wallpaper.jpg &
  371. exec --no-startup=id feh --bg-scale ~/Pictures/Wallpapers/wp2445832-autism-wallpapers.jpg
  372.  
  373. # Polybar
  374. #exec_always --no-startup-id ~/.config/polybar/launch.sh &
  375.  
  376. # PulseAudio
  377. exec --no-startup-id pulseaudio
  378. exec --no-startup-id pa-applet
  379.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement