Last active
November 2, 2024 13:13
-
-
Save notch1p/b0f5ccadf04fd6f2dfde0135c1d83289 to your computer and use it in GitHub Desktop.
i3 config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This file has been auto-generated by i3-config-wizard(1). | |
| # It will not be overwritten, so edit it as you like. | |
| # | |
| # Should you change your keyboard layout some time, delete | |
| # this file and re-run i3-config-wizard(1). | |
| # | |
| # i3 config file (v4) | |
| # | |
| # Please see https://i3wm.org/docs/userguide.html for a complete reference! | |
| set $super Mod4 | |
| # Font for window titles. Will also be used by the bar unless a different font | |
| # is used in the bar {} block below. | |
| font pango:Sarasa UI CL 13 | |
| exec --no-startup-id dbus-update-activation-environment --all | |
| exec --no-startup-id /usr/libexec/gsd-xsettings | |
| exec --no-startup-id hsetroot -center ~/.wallpaper.png | |
| exec_always --no-startup-id ibus-daemon -d -r | |
| exec /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 & | |
| # This font is widely installed, provides lots of unicode glyphs, right-to-left | |
| # text rendering and scalability on retina/hidpi displays (thanks to pango). | |
| #font pango:DejaVu Sans Mono 8 | |
| # wallpaper | |
| # exec --no-startup-id hsetroot -center ~/.wallpaper.png | |
| # Start XDG autostart .desktop files using dex. See also | |
| # https://wiki.archlinux.org/index.php/XDG_Autostart | |
| exec --no-startup-id dex --autostart --environment i3 | |
| exec_always --no-startup-id xrdb -merge /home/notch1p/.Xresources | |
| exec_always --no-startup-id gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "[{'Gdk/WindowScalingFactor', <1.5>}, {'Xcursor/Size', <32000>}, {'Xcursor/size', <32000>}]" | |
| exec_always --no-startup-id gsettings set org.gnome.desktop.interface cursor-size 32 | |
| exec_always --no-startup-id xrandr --dpi 144 | |
| # The combination of xss-lock, nm-applet and pactl is a popular choice, so | |
| # they are included here as an example. Modify as you see fit. | |
| # xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the | |
| # screen before suspend. Use loginctl lock-session to lock your screen. | |
| exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork | |
| # NetworkManager is the most popular way to manage wireless networks on Linux, | |
| # and nm-applet is a desktop environment-independent system tray GUI for it. | |
| exec --no-startup-id nm-applet | |
| # Use pactl to adjust volume in PulseAudio. | |
| # set $refresh_i3status killall -SIGUSR1 i3status | |
| # bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status | |
| # bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status | |
| # bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status | |
| # bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status | |
| # Use Mouse+$super to drag floating windows to their wanted position | |
| floating_modifier $super | |
| # move tiling windows via drag & drop by left-clicking into the title bar, | |
| # or left-clicking anywhere into the window while holding the floating modifier. | |
| tiling_drag modifier titlebar | |
| # start a terminal | |
| # bindsym $super+Return exec hyper | |
| # | |
| bindsym $super+Control+Return exec alacritty | |
| # kill focused window | |
| bindsym Control+q kill | |
| # start dmenu (a program launcher) | |
| bindsym Control+space exec i3-dmenu-desktop --dmenu="dmenu -i -b \ | |
| -fn 'Sarasa Fixed CL:size=12' -nb '#141c21' -nf '#93a1a1' \ | |
| -sb '#d12f2c' -sf '#bfbaac'" | |
| # A more modern dmenu replacement is rofi: | |
| # bindcode $super+40 exec "rofi -modi drun,run -show drun" | |
| # bindsym Control+space exec --no-startup-id /home/notch1p/.config/rofi/launchers/type-4/launcher.sh | |
| # bindsym $super+x exec --no-startup-id powermenu_t2 | |
| # There also is i3-dmenu-desktop which only displays applications shipping a | |
| # .desktop file. It is a wrapper around dmenu, so you need that installed. | |
| # bindcode $super+40 exec --no-startup-id i3-dmenu-desktop | |
| # change focus | |
| bindsym $super+h focus left | |
| bindsym $super+j focus down | |
| bindsym $super+k focus up | |
| bindsym $super+l focus right | |
| # alternatively, you can use the cursor keys: | |
| # bindsym $super+Left focus left | |
| # bindsym $super+Down focus down | |
| # bindsym $super+Up focus up | |
| # bindsym $super+Right focus right | |
| # move focused window | |
| bindsym $super+Control+h move left | |
| bindsym $super+Control+j move down | |
| bindsym $super+Control+k move up | |
| bindsym $super+Control+l move right | |
| # alternatively, you can use the cursor keys: | |
| # bindsym $super+Shift+Left move left | |
| # bindsym $super+Shift+Down move down | |
| # bindsym $super+Shift+Up move up | |
| # bindsym $super+Shift+Right move right | |
| # split in horizontal orientation | |
| # bindsym $super+h split h | |
| # split in vertical orientation | |
| # bindsym $super+v split v | |
| # enter fullscreen mode for the focused container | |
| bindsym Control+m fullscreen toggle | |
| # change container layout (stacked, tabbed, toggle split) | |
| # bindsym $super+e layout toggle split | |
| # change focus between tiling / floating windows | |
| # bindsym $super+space focus mode_toggle | |
| # focus the parent container | |
| bindsym $super+a focus parent | |
| # focus the child container | |
| bindsym $super+d focus child | |
| # Define names for default workspaces for which we configure key bindings later on. | |
| # We use variables to avoid repeating the names in multiple places. | |
| set $ws1 "1" | |
| set $ws2 "2" | |
| set $ws3 "3" | |
| set $ws4 "4" | |
| set $ws5 "5" | |
| set $ws6 "6" | |
| set $ws7 "7" | |
| set $ws8 "8" | |
| set $ws9 "9" | |
| set $ws10 "10" | |
| # switch to workspace | |
| bindsym Shift+Control+1 workspace number $ws1 | |
| bindsym Shift+Control+2 workspace number $ws2 | |
| bindsym Shift+Control+3 workspace number $ws3 | |
| bindsym Shift+Contorl+4 workspace number $ws4 | |
| bindsym Shift+Contorl+5 workspace number $ws5 | |
| # move focused container to workspace | |
| bindsym $super+Control+1 move container to workspace number $ws1 | |
| bindsym $super+Control+2 move container to workspace number $ws2 | |
| bindsym $super+Control+3 move container to workspace number $ws3 | |
| bindsym $super+Control+4 move container to workspace number $ws4 | |
| bindsym $super+Control+5 move container to workspace number $ws5 | |
| bindsym Control+grave exec gnome-screenshot -i | |
| exec_always alttab \ | |
| -font 'xft:Sarasa Fixed CL-11' \ | |
| -fg \#cccccc \ | |
| -bg \#181818 \ | |
| -frame \#2dbb36 \ | |
| -t 600x32 \ | |
| -i 48x48 \ | |
| -d 1 \ | |
| -vertical \ | |
| set $mode_system Serivce: (r/R) reload/restart i3; (e) logout; (s) suspend; (^r) reboot; (S) poweroff | |
| mode "$mode_system" { | |
| # reload the configuration file | |
| bindsym r reload | |
| # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) | |
| bindsym Shift+r restart | |
| bindsym e exec --no-startup-id i3-msg exit, mode "default" | |
| bindsym s exec --no-startup-id $Locker && systemctl suspend, mode "default" | |
| bindsym Control+r exec --no-startup-id systemctl reboot, mode "default" | |
| bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default" | |
| # back to normal: Enter or Escape | |
| bindsym Return mode "default" | |
| bindsym Escape mode "default" | |
| } | |
| bindsym $super+Control+semicolon mode "$mode_system" | |
| set $mode_resize Resize: (hjkl) move; (s) stacking; (w) tabbed; (t/,/.) split/h/v; (f) floating/tiling; (u/d/l/r) resize/v/h | |
| # resize window (you can also use the mouse for that) | |
| mode "$mode_resize" { | |
| # These bindings trigger as soon as you enter the resize mode | |
| # Pressing left will shrink the window’s width. | |
| # Pressing right will grow the window’s width. | |
| # Pressing up will shrink the window’s height. | |
| # Pressing down will grow the window’s height. | |
| # bindsym j resize shrink width 10 px or 10 ppt | |
| # bindsym k resize grow height 10 px or 10 ppt | |
| # bindsym l resize shrink height 10 px or 10 ppt | |
| # bindsym semicolon resize grow width 10 px or 10 ppt | |
| bindsym h move left | |
| bindsym j move down | |
| bindsym k move up | |
| bindsym l move right | |
| bindsym s layout stacking | |
| bindsym w layout tabbed | |
| bindsym t layout toggle split | |
| bindsym comma split h | |
| bindsym period split v | |
| # toggle tiling / floating | |
| bindsym f floating toggle | |
| # same bindings, but for the arrow keys | |
| bindsym Left resize grow width 10 px or 10 ppt | |
| bindsym Down resize shrink height 10 px or 10 ppt | |
| bindsym Up resize grow height 10 px or 10 ppt | |
| bindsym Right resize shrink width 10 px or 10 ppt | |
| # back to normal: Enter or Escape or $super+r | |
| bindsym Return mode "default" | |
| bindsym Escape mode "default" | |
| # bindsym $super+r mode "default" | |
| } | |
| bindsym $super+Return mode "$mode_resize" | |
| # Start i3bar to display a workspace bar (plus the system information i3status | |
| # finds out, if available) | |
| # bar { | |
| # status_command i3status | |
| # position top | |
| # workspace_min_width 24 | |
| # padding 2px 8px 2px 8px | |
| # strip_workspace_numbers yes | |
| # | |
| # colors { | |
| # background #141c21 | |
| # statusline #141c21 | |
| # separator #141c21 | |
| # | |
| # # colour of border, background, and text | |
| # focused_workspace #141c21 #d12f2c #bfbaac | |
| # active_workspace #141c21 #141c21 #bfbaac | |
| # inactive_workspace #141c21 #141c21 #bfbaac | |
| # urgent_workspace #141c21 #b08500 #bfbaac | |
| # } | |
| # } | |
| bar { | |
| font pango:Victor Mono Bold 10 | |
| position top | |
| status_command /home/notch1p/.cargo/bin/i3status-rs | |
| colors { | |
| separator #666666 | |
| background #222222 | |
| statusline #dddddd | |
| focused_workspace #0088CC #0088CC #ffffff | |
| active_workspace #333333 #333333 #ffffff | |
| inactive_workspace #333333 #333333 #888888 | |
| urgent_workspace #2f343a #900000 #ffffff | |
| } | |
| } | |
| # colour of border, background, text, indicator, and child_border | |
| client.focused #d12f2c #263640 #93a1a1 #696ebf #2587cc1 | |
| client.focused_inactive #263640 #b08500 #93a1a1 #263640 #263640 | |
| client.unfocused #263640 #b08500 #93a1a1 #263640 #263640 | |
| client.urgent #263640 #b08500 #93a1a1 #263640 #263640 | |
| client.placeholder #263640 #b08500 #93a1a1 #263640 #263640 | |
| client.background #263640 | |
| # window rules, you can find the window class using xprop | |
| for_window [class=gwenview|Eog|Sxiv|feh|spectacle|mpv|vlc|ark|File-roller|Xarchiver|wechat|qq|QQ] floating enable | |
| for_window [class=gwenview|Eog|Sxiv|feh|spectacle|mpv|vlc|ark|File-roller|Xarchiver] focus | |
| for_window [class=".*"] border pixel 4 | |
| for_window [title="图片查看"] floating enable | |
| hide_edge_borders smart | |
| gaps inner 5 | |
| smart_gaps on | |
| focus_follows_mouse no | |
| # copyq | |
| bindsym Control+Shift+a exec --no-startup-id copyq menu | |
| for_window [instance="copyq"] floating enable, resize set 1500 1000, border pixel 3 | |
| exec copyq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment