i3wm Configuration Files
About
This is my personal i3wm configuration. The actual code itself is inside this one org-mode file that can be tangled from inside Emacs with the command org-babel-tangle-file
. I'm using Gnu Stow to create symlinks from the files tangled in this org file into my home directory since not all the files in this repository needs to be symlinked1.
The Rework
After playing with hyprland for a while, I realized that I still need to have an Xorg configuration for my desktop experience. And this i3 configuration has not been updated for a long time.
The thing is, the Xorg itself needs configuring, and the i3 configuration itself doesn't configure X. I've had a separate repository for Xorg configuration files, but it's a pain to update them just for small changes in the window manager.
My goal is to have a repository for i3 window manager, but also have the configuration for X, and also i3 supporting apps.
Required packages
I'm using archlinux as my main system for years, so I don't really know if the application listed here are also available on other distribution.
- Full Xorg package
- by installing the xorg package group, perhaps not all are required, but I rather have them from the start just in case.
- i3-wm
- Archlinux package for i3-wm. Also install the optional dependencies:
- i3lock-fancy-git
- i3lock script that takes a screenshot of the desktop, blurs the background and adds a lock icon and text.
- xidlehook
- xautolock rewrite in Rust, with a few extra features.
- i3status
- for the default status bar generator.
- perl-anyevent-i3
- for i3-save-tree.
- dunst
- a lightweight replacement for the notification-daemons provided by most desktop environments. Should be started using systemd, unless you only used it for i3.
- libnotify
- Library for sending desktop notifications.
- firefox
- I used to love chromium, but keeps falling back to firefox eventually.
- picom
- Lightweight compositor for X11.
Optional packages
- archlinux-wallpaper
- for initial wallpapers.
- feh
- a lightweight image viewer aimed mainly at users of command line interfaces. Unlike most graphical image viewers.
- dex
- Program to generate and execute DesktopEntry files of type Application. If used, try running
dex -d -v --autostart
for testing which applications get auto started in dry run. Note that this will auto start every.desktop
files in/etc/xdg/autostart/
. - x11-ssh-askpass
- Lightweight passphrase dialog for SSH.
- polkit-kde-agent
- Daemon providing a polkit authentication UI for KDE. It is suggested not to use polkit-gnome. I should start checking if that's still true.
- Blueman
- GTK+ Bluetooth Manager.
- Udiskie
- Removable disk automounter using udisks.
- Thunar
- Modern, fast and easy-to-use file manager for Xfce. Install all the optional dependencies if needed.
- Scrot
- Simple command-line screenshot utility for X.
- Wmctrl
- Control your EWMH compliant window manager from command line.
- Maim
- Utility to take a screenshot using imlib2.
- Tesseract
- An OCR program.
Themes, fonts, and other UI related packages
- ttf-jetbrains-mono-nerd
- Patched font JetBrains Mono from nerd fonts library
- otf-overpass-nerd
- Patched font Overpass from nerd fonts library.
- bibata-cursor-theme
- Material Based Cursor Theme.
- papirus-icon-theme
- Papirus icon theme.
- Breeze
- Artwork, styles and assets for the Breeze visual style for the Plasma Desktop.
- Breeze-GTK
- Breeze widget theme for GTK 2 and 3. Also works on GTK 4 (I think).
- Breeze-Icons
- Breeze icon theme.
- Unclutter
- A small program for hiding the mouse cursor, this is already the
unclutter-xfixes
package on archlinux. - Volumeicon
- Volume control for the system tray.
GTK
GTK, or the GIMP Toolkit, is a multi-platform toolkit for creating graphical user interfaces. Offering a complete set of widgets, GTK is suitable for projects ranging from small one-off tools to complete application suites. Most of these settings are taken from Arch wiki.
GTK 3
- Settings
[Settings] gtk-theme-name=Breeze-Dark gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR gtk-button-images=1 gtk-menu-images=1 gtk-enable-event-sounds=1 gtk-enable-input-feedback-sounds=1 gtk-xft-antialias=1 gtk-xft-hinting=1 gtk-xft-hintstyle=hintfull gtk-key-theme-name=Emacs gtk-font-name=JetBrainsMonoNL Nerd Font Mono 10 gtk-sound-theme-name=freedesktop gtk-icon-theme-name=Papirus gtk-cursor-theme-name=Bibata-Modern-Classic gtk-application-prefer-dark-theme=1 gtk-xft-rgba=rgb
GTK 4
- Settings
[Settings] gtk-theme-name=Breeze-Dark gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR gtk-button-images=1 gtk-menu-images=1 gtk-enable-event-sounds=1 gtk-enable-input-feedback-sounds=1 gtk-xft-antialias=1 gtk-xft-hinting=1 gtk-xft-hintstyle=hintfull gtk-key-theme-name=Emacs gtk-font-name=JetBrainsMonoNL Nerd Font Mono, 10 gtk-sound-theme-name=freedesktop gtk-icon-theme-name=Papirus gtk-cursor-theme-name=Bibata-Modern-Classic gtk-application-prefer-dark-theme=1
i3wm
The i3-wm package that I used is from the default repository in archlinux.
variables
Mostly these variables are set to avoid repetion.
- mod key
Mod4
is theSuper
key, orWin
key for the rest of the world.Mod1
isAlt
2. You don't have to set this variable, but by using variable, we can change the mod key without having to change each individual lines of keybindings.set $mod Mod4
- font
# font font pango:JetBrainsMonoNL Nerd Font Mono 10
- notify
I used dunst as a desktop notification, though there's many other packages that can replace it. I prefer dunst because it's easier to configure.
set $notify exec notify-send -t 1000
- refresh i3status
The preferred status bar for i3, I like the simplicity of i3status.
set $refresh_i3status killall -SIGUSR1 i3status
- navigation keys
I use vim keys obviously.
set $up k set $down j set $left h set $right l
- TODO workspaces
I tried to have a uniformed workspaces across all my window manager configurations. I should work on this.
set $ws1 "1: Term" set $ws2 "2: Code" set $ws3 "3: Web" set $ws4 "4: Mail" set $ws5 "5: File" set $ws6 "6: Office" set $ws7 "7: Others" set $ws8 "8: Media" set $ws9 "9: Remote" set $ws10 "10: Steam"
Set
=workspace_back_and_forth
Bound to$mod+TAB
, I really use this alot, this is mandatory in every window manager I use.workspace_auto_back_and_forth yes
- applications
set $terminal xterm set $browser firefox set $mail thunderbird set $guiemacs emacsclient -c -a emacs set $tuiemacs emacsclient -t -a emacs set $file thunar
- Xresouces
#### https://build.i3wm.org/docs/userguide.html#xresources set_from_resource $background_i3wm background #000000 set_from_resource $foreground_i3wm foreground #000000 set_from_resource $color00_i3wm color0 #000000 set_from_resource $color01_i3wm color1 #000000 set_from_resource $color02_i3wm color2 #000000 set_from_resource $color03_i3wm color3 #000000 set_from_resource $color04_i3wm color4 #000000 set_from_resource $color05_i3wm color5 #000000 set_from_resource $color06_i3wm color6 #000000 set_from_resource $color07_i3wm color7 #000000 set_from_resource $color08_i3wm color8 #000000 set_from_resource $color09_i3wm color9 #000000 set_from_resource $color10_i3wm color10 #000000 set_from_resource $color11_i3wm color11 #000000 set_from_resource $color12_i3wm color12 #000000 set_from_resource $color13_i3wm color13 #000000 set_from_resource $color14_i3wm color14 #000000 set_from_resource $color15_i3wm color15 #000000
- Colors
# Theme colors # class border backgr. text indic. child_border # My colors client.background $background_i3wm client.focused $foreground_i3wm $background_i3wm $foreground_i3wm $background_i3wm $background_i3wm client.unfocused $foreground_i3wm $background_i3wm $foreground_i3wm $background_i3wm $background_i3wm client.focused_inactive $foreground_i3wm $background_i3wm $foreground_i3wm $background_i3wm $background_i3wm client.urgent $foreground_i3wm $background_i3wm $foreground_i3wm $background_i3wm $background_i3wm client.placeholder $foreground_i3wm $background_i3wm $foreground_i3wm $background_i3wm $background_i3wm
- floating modifier
floating_modifier $mod
bar
bar { status_command i3status position bottom workspace_buttons yes mode dock colors { statusline $color04_i3wm background $background_i3wm separator $color03_i3wm # BORDER BACKGROUND TEXT focused_workspace $color03_i3wm $color00_i3wm $color02_i3wm inactive_workspace $color00_i3wm $color00_i3wm $color02_i3wm active_workspace $color00_i3wm $color00_i3wm $color01_i3wm urgent_workspace $color01_i3wm $background_i3wm $color00_i3wm binding_mode $color03_i3wm $background_i3wm $color00_i3wm } }
Also set keybinding for toggling bar. This is useful since I don't need the status bar all the time, and setting it to auto-hide it will show each time I hold the mod key, which also works inside a fullscreen virtual machine, making it easier to switch back to i3wm.
bindsym $mod+Control+m bar mode toggle
application autostart
# exec --no-startup-id ~/.local/bin/monitor-setup exec --no-startup-id xsetroot -cursor_name left_ptr exec --no-startup-id dbus-launch --exit-with-session picom -b --config "${XDG_CONFIG_HOME}"/picom/picom.conf & exec --no-startup-id /usr/lib/geoclue-2.0/demos/agent & exec --no-startup-id dbus-launch --exit-with-session unclutter & exec --no-startup-id dbus-launch nm-applet & exec --no-startup-id dbus-launch blueman-applet & exec --no-startup-id volumeicon & exec --no-startup-id flameshot & exec --no-startup-id dbus-launch --exit-with-session greenclip daemon>/dev/null & exec --no-startup-id $file --daemon & exec --no-startup-id ~/.local/bin/transfer-sleep-lock-i3lock-fancy & exec --no-startup-id ~/.fehbg #exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock-fancy -n -f Overpass-Nerd-Font-Reg -detectsleep
window rule
for_window [class=".*"] border pixel 0 # for_window [class="(?i)xclipboard"] , move scratchpad for_window [instance="(?i)pavucontrol"] floating enable for_window [window_role="pop-up"] floating enable for_window [instance="(?i)engrampa"] floating enable for_window [window_role="GtkFileChooserDialog"] floating enable for_window [title="(?i)alsamixer"] floating enable for_window [class="(?i)qtconfig-qt4"] floating enable for_window [title="(?i)nmtui"] floating enable for_window [window_role="buddy_list"] floating enable, resize set 360 680 for_window [window_role="conversation"] floating enable, resize set 480 680 for_window [class="(?i)blueman.*"] floating enable, resize set 512 256 for_window [class="evolution-alarm-notify"] floating enable for_window [class="Evolution-alarm-notify"] floating enable for_window [class="(?i)kooha"] floating enable for_window [class="^org.kde.polkit-kde-authentication-agent-1"] floating enable for_window [class="thunderbird" title="status"] floating enable for_window [class="thunderbird" title="(.*)Reminders"] floating enable for_window [class="thunderbird" title="Write.*"] floating enable resize set 680 680 for_window [class="thunderbird" title="Send.*"] floating enable for_window [class="Msgcompose.*"] floating enable resize set 680 680 for_window [class="QtPass"] floating enable for_window [class="(?i)zoom"] floating enable for_window [class="(?i)file-roller"] floating enable for_window [class="(?i)ncmpcpp"] floating enable for_window [class="(?i)khal"] floating enable for_window [class="(?i)htop"] floating enable for_window [class="(?i)nmtui"] floating enable for_window [class="(?i)vim"] floating enable for_window [class="(?i)org.kde.kdeconnect.app"] floating enable for_window [title="(?i)File Operation Progress"] floating enable for_window [class="(?i)showmethekey-gtk"] floating enable for_window [class="(?i)screenkey"] floating enable for_window [class="(?i)bitwarden"] floating enable for_window [class="(?i)authy.*"] floating enable for_window [class="(?i)transmission.*"] floating enable for_window [class="(?i)anydesk.*"] floating enable for_window [class="(?i)lxappearance"] floating enable for_window [class="virt-manager"] floating enable resize set 680 680 move position center for_window [class="(?i)steam.*"] floating enable resize set 680 680 move position center for_window [class=".*FileRoller"] floating enable resize set 680 680 move position center
This section sets the window rules for specific window classes, which can be determined using the xprop
command.
workspace assignment
Workspace specific assignment.
- workspace 1
The first workspace is reserved for terminals. But I'm not assigning apps into this workspace since I'd like to open terminals on other workspaces.
- workspace 2
assign [class="Emacs"] $ws2 assign [class="Leafpad"] $ws2 assign [class="L3afpad"] $ws2 assign [class="Gedit"] $ws2 assign [class="code-oss"] $ws2
Text editing is on workspace 2.
- workspace 3
assign [class="qutebrowser"] $ws3 assign [class="firefox"] $ws3 assign [class="google-chrome"] $ws3 assign [class="Nyxt"] $ws3 assign [class="pidgin"] $ws7
Web browser goes here.
- workspace 4
assign [class="Evolution"] $ws4 assign [class="thunderbird"] $ws4
For when I use GUI mail client.
- workspace 5
assign [class="Thunar"] $ws5
File manager.
- workspace 6
assign [title="Libreoffice"] $ws6 assign [title="com-sonicwall-NetExtender"] $ws6 assign [title="Bitwarden"] $ws6 assign [title="zoom"] $ws6
Office-related
- workspace 7
assign [class="Gucharmap"] $ws7 assign [class="org.gnome.Characters"] $ws7 assign [class="winbox.exe"] $ws7 assign [class="discord"] $ws7
This suppose to be my chat workspace.
- workspace 8
assign [class="Rhythmbox"] $ws8 assign [class="vlc"] $ws8 assign [class="mpv"] $ws8 assign [class="Cheese"] $ws8 assign [class="Spotify"] $ws8 assign [class="Picard"] $ws8
Multimedia related.
- workspace 9
assign [class="org.remmina.remmina"] $ws9 assign [class="Virt-manager"] $ws9 assign [class="Vncviewer"] $ws9
Remoting the remotes.
- workspace 0
assign [class="Steam"] $ws10 assign [title="Steam"] $ws10
Game!
Keybindings
- media keys
bindsym XF86AudioRaiseVolume exec --no-startup-id ~/.local/bin/dunst-volume -i 1 && $refresh_i3status bindsym XF86AudioLowerVolume exec --no-startup-id ~/.local/bin/dunst-volume -d 1 && $refresh_i3status bindsym XF86AudioMute exec --no-startup-id ~/.local/bin/dunst-volume -t && $refresh_i3status bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status bindsym XF86AudioPlay exec playerctl play-pause bindsym XF86AudioNext exec playerctl next bindsym XF86AudioPrev exec playerctl previous bindsym XF86MonBrightnessUp exec --no-startup-id ~/.local/bin/dunst-backlight +1% bindsym XF86MonBrightnessDown exec --no-startup-id ~/.local/bin/dunst-backlight 1%- bindsym Print exec flameshot gui
For keyboard with no media keys:
bindsym $mod+F9 exec --no-startup-id ~/.local/bin/dunst-volume -i 1 && $refresh_i3status bindsym $mod+F8 exec --no-startup-id ~/.local/bin/dunst-volume -d 1 && $refresh_i3status bindsym $mod+F7 exec --no-startup-id ~/.local/bin/dunst-volume -t && $refresh_i3status bindsym $mod+F11 exec playerctl play-pause bindsym $mod+F12 exec playerctl next bindsym $mod+F10 exec playerctl previous bindsym $mod+Shift+F3 exec --no-startup-id brightnessctl set +1% bindsym $mod+Shift+F2 exec --no-startup-id brightnessctl set 1%-
pamixer
package is needed for volume, even if you're using pipewire.brightnessctl
package for setting up brightness.playerctl
works on most MPRIS player.
- browser
bindsym XF86MyComputer exec $browser bindsym $mod+Mod1+f exec $browser
- mail
bindsym XF86Mail exec $mail bindsym $mod+Mod1+t exec $mail
- music
bindsym $mod+Mod1+m exec $terminal -class ncmpcpp -e ncmpcpp
- htop
bindsym $mod+Mod1+h exec $terminal -class htop -e htop
- nmtui
bindsym $mod+Mod1+w exec $terminal -class nmtui -e nmtui
- khal
bindsym $mod+Mod1+k exec $terminal -class khal -e khal interactive
- vim
bindsym $mod+Mod1+v exec $terminal -class vim -e vim
- dired
bindsym $mod+Mod1+e exec emacsclient -c -a emacs -e '(dired (getenv "HOME"))'
- rofi-pass
Rofi front end for pass. It stores passwords using git and encrypted with GnuPG. It also has an OTP extensions.
bindsym $mod+Mod1+p exec rofi-pass
- rofi-calc
bindsym $mod+Mod1+c exec rofi -show calc -modi calc -no-show-match -no-sort
- rofi-rbw
Similar to rofi-pass, but for bitwarden.
bindsym $mod+Mod1+b exec rofi-rbw
- text editor
bindsym $mod+Mod1+n exec $guiemacs bindsym $mod+Control+n exec $terminal -e $tuiemacs
- file manager
bindsym $mod+e exec $file
- terminal
bindsym $mod+Return exec $terminal
- terminal + screen
bindsym $mod+Shift+Return exec $terminal -e screen -m
- kill focused window
bindsym $mod+Shift+F4 kill bindsym Mod1+F4 kill
- rofi-menu
bindsym $mod+d exec --no-startup-id rofi -show drun -theme i3-apps
- rofi-greenclip
This package is available in the aur.
bindsym $mod+c exec --no-startup-id rofi -theme i3-apps -modi "clipboard:greenclip print" -show clipboard
- rofi window menu
bindsym $mod+shift+w exec rofi -theme i3-apps -show windowcd bindsym $mod+w exec rofi -theme i3-apps -show window
- tesseract
bindsym $mod+shift+t exec ~/.local/bin/ocr
The recommended full package to install is
ocrdesktop
according to archlinux wiki. I got this script from the internet which basically doing the same thing only with maim and the tesseract package. - screenkey
bindsym $mod+Mod1+s exec screenkey
- window management
- change focus
bindsym $mod+$left focus left bindsym $mod+$down focus down bindsym $mod+$up focus up bindsym $mod+$right focus right
Alternatively, with arrow keys:
bindsym $mod+Left focus left bindsym $mod+Down focus down bindsym $mod+Up focus up bindsym $mod+Right focus right
Adding ALT-TAB functionality just in case.
bindsym Mod1+Tab focus right bindsym Mod1+Shift+Tab focus left
- move focused window
bindsym $mod+Shift+$left move left bindsym $mod+Shift+$down move down bindsym $mod+Shift+$up move up bindsym $mod+Shift+$right move right
Also, with arrow keys:
bindsym $mod+Shift+Left move left bindsym $mod+Shift+Down move down bindsym $mod+Shift+Up move up bindsym $mod+Shift+Right move right
- split
horizontally
bindsym $mod+Control+h split h; exec $notify "Horizontal split"
vertically
bindsym $mod+Control+v split v exec $notify "Vertical split"
- fullscreen toggle
bindsym $mod+f fullscreen toggle; exec $notify "Fullscreen toggle"
- container layout
stacked
bindsym $mod+Control+s layout stacking; exec $notify "Stacking layout"
tabbed
bindsym $mod+Control+w layout tabbed; exec $notify "Tabbed layout"
split
bindsym $mod+Control+e layout toggle split; exec $notify "Split toggle"
- toggle tiling / floating
bindsym $mod+Shift+space floating toggle; exec $notify "Floating toggle"
- change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle; exec $notify "Window focus toggle"
- focus parent container
bindsym $mod+Control+a focus parent; exec $notify "Focus parentcontainer"
- focus child container
bindsym $mod+Control+d focus child; exec $notify "Focus child container"
- move to scratchpad
Move the current focused window into the scratchpad
bindsym $mod+Shift+minus move scratchpad; exec $notify "Moved to scratchpad"
- show scratchpad
Show the next scratchpad window or hide the focused scratchpad window. If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show; exec $notify "Show scratchpad" bindsym $mod+Shift+c [class="(?i)xclipboard"] scratchpad show
- change focus
- workspace management
bindsym $mod+1 workspace $ws1 bindsym $mod+2 workspace $ws2 bindsym $mod+3 workspace $ws3 bindsym $mod+4 workspace $ws4 bindsym $mod+5 workspace $ws5 bindsym $mod+6 workspace $ws6 bindsym $mod+7 workspace $ws7 bindsym $mod+8 workspace $ws8 bindsym $mod+9 workspace $ws9 bindsym $mod+0 workspace $ws10
- switch to workspace prev / next
bindsym $mod+bracketleft workspace prev bindsym $mod+bracketright workspace next
- move focused containerto workspace
bindsym $mod+Shift+1 move container to workspace $ws1 bindsym $mod+Shift+2 move container to workspace $ws2 bindsym $mod+Shift+3 move container to workspace $ws3 bindsym $mod+Shift+4 move container to workspace $ws4 bindsym $mod+Shift+5 move container to workspace $ws5 bindsym $mod+Shift+6 move container to workspace $ws6 bindsym $mod+Shift+7 move container to workspace $ws7 bindsym $mod+Shift+8 move container to workspace $ws8 bindsym $mod+Shift+9 move container to workspace $ws9 bindsym $mod+Shift+0 move container to workspace $ws10
- move using bracket keys
bindsym Control+Mod1+bracketleft move to workspace previous bindsym Control+Mod1+bracketright move to workspace next
- back and forth
bindsym $mod+Tab workspace back_and_forth bindsym $mod+Shift+Tab move container to workspace back_and_forth
- switch output focus
bindsym $mod+Control+1 focus output primary bindsym $mod+Control+2 focus output right
- moving to output
bindsym $mod+Control+Shift+1 move workspace to output primary bindsym $mod+Control+Shift+2 move workspace to output right
- switch to workspace prev / next
- Reload configuration
bindsym $mod+Shift+F11 reload
- Hot restart
bindsym $mod+Control+r restart
- exit i3
bindsym $mod+q exec ~/.local/bin/rofi-i3-logout
- picom transparency
bindsym $mod+F3 exec picom-trans -c +5 bindsym $mod+F2 exec picom-trans -c -5
A showcase of picom capability, changing transparency on the fly. I set this to
F2
andF3
since it's the media keys for brightness on my laptop. - dunst
bindsym $mod+Mod1+grave exec dunstctl history-pop bindsym $mod+Shift+grave exec dunstctl context bindsym $mod+Control+grave exec dunstctl close bindsym $mod+grave exec dunstctl action
Notice all keybindings is on
grave
key?context
- opens up the context menu.
history-pop
- Redisplay the most recently closed notification.
close
- Closes current notification.
- modes
- resize
# resize window (you can also use the mouse for that) 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 $left resize shrink width 10 px or 10 ppt bindsym $down resize grow height 10 px or 10 ppt bindsym $up resize shrink height 10 px or 10 ppt bindsym $right resize grow width 10 px or 10 ppt # same bindings, but for the arrow keys bindsym Left resize shrink width 10 px or 10 ppt bindsym Down resize grow height 10 px or 10 ppt bindsym Up resize shrink height 10 px or 10 ppt bindsym Right resize grow width 10 px or 10 ppt # back to normal: Enter or Escape or $mod+r bindsym Return mode "default" bindsym Escape mode "default" bindsym $mod+r mode "default" } bindsym $mod+r mode "resize"
- resize
i3status
I don't mess much with i3status, it's usually hidden most of the times.
general
general { colors = true interval = 5 output_format = i3bar }
order
order += "ipv6" order += "wireless _first_" order += "ethernet _first_" order += "battery 0" order += "memory" order += "tztime local"
wireless
wireless _first_ { format_up = ": (%quality at %essid, %bitrate / %frequency) %ip" format_down = ": down" }
ethernet
ethernet _first_ { format_up = ": %ip (%speed)" format_down = "" }
battery
battery 0 { format = "%status %percentage %remaining" format_down = "" status_chr = "" status_bat = "" status_unk = "" last_full_capacity = true }
memory
memory { format = " %used" threshold_degraded = "1G" format_degraded = " < %available" }
time
tztime local { format = " %Y-%m-%d %H:%M:%S" }
picom
A standalone compositor for Xorg.
Shadows
# Enabled client-side shadows on windows. Note desktop windows # (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, # unless explicitly requested using the wintypes option. # # Can be set per-window using rules. # # Default: false shadow = true; # The blur radius for shadows, in pixels. # # Default: 12 shadow-radius = 1; # The opacity of shadows. # # Range: 0.0 - 1.0 # Default: 0.75 shadow-opacity = .25 # The left offset for shadows, in pixels. # # Default: -15 shadow-offset-x = -1; # The top offset for shadows, in pixels. # # Default: -15 shadow-offset-y = -1; # Hex string color value of shadow. Formatted like "#RRGGBB", e.g. "#C0FFEE". # # Default: #000000 shadow-color = "#2E3440" # Crop shadow of a window fully on a particular monitor to that monitor. This is # currently implemented using the X RandR extension. # # Default: false crop-shadow-to-monitor = true
Fading
################################# # Fading # ################################# # Fade windows in/out when opening/closing and when opacity changes, # unless no-fading-openclose is used. Can be set per-window using rules. # # Default: false fading = true; # Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) fade-in-step = 0.05; # Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) fade-out-step = 0.05; # The time between steps in fade step, in milliseconds. (> 0, defaults to 10) # fade-delta = 10 # Do not fade on window open/close. no-fading-openclose = true # Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc. no-fading-destroyed-argb = true
Transparency
################################# # Transparency / Opacity # ################################# # Opacity of window titlebars and borders. # # Range: 0.1 - 1.0 # Default: 1.0 (disabled) frame-opacity = 0.9; # Use fixed inactive dim value, instead of adjusting according to window opacity. # # Default: false # inactive-dim-fixed = true
Corners
################################# # Corners # ################################# # Sets the radius of rounded window corners. When > 0, the compositor will # round the corners of windows. Does not interact well with # `transparent-clipping`. # # Default: 0 (disabled) corner-radius = 0
Blur
################################# # Blur # ################################# # Parameters for background blurring, see BLUR section in the man page for more information. # blur-method = # blur-size = 12 # # blur-deviation = false # # blur-strength = 5 # Blur background of semi-transparent / ARGB windows. # Can be set per-window using rules. # # Default: false # blur-background = false # Blur background of windows when the window frame is not opaque. # Implies: # blur-background # # Default: false # blur-background-frame = false # Use fixed blur strength rather than adjusting according to window opacity. # # Default: false # blur-background-fixed = false # Specify the blur convolution kernel, with the following format: # example: # blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; # Can also be a pre-defined kernel, see the man page. # # Default: "" blur-kern = "3x3box";
General Settings
################################# # General Settings # ################################# # Enable remote control via D-Bus. See the man page for more details. # # Default: false # dbus = true # Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. # daemon = false # Specify the backend to use: `xrender`, `glx`, or `egl`. # # Default: "xrender" backend = "xrender" # Use higher precision during rendering, and apply dither when presenting the # rendered screen. Reduces banding artifacts, but may cause performance # degradation. Only works with OpenGL. dithered-present = false; # Enable/disable VSync. # # Default: false #vsync = true; # Try to detect windows with rounded corners and don't consider them # shaped windows. The accuracy is not very high, unfortunately. # # Has nothing to do with `corner-radius`. # # Default: false detect-rounded-corners = true; # Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers # not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows. # # Default: false detect-client-opacity = true; # Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, # rather than listening to 'FocusIn'/'FocusOut' event. May be more accurate, # provided that the WM supports it. # # Default: false # use-ewmh-active-win = false # Unredirect all windows if a full-screen opaque window is detected, # to maximize performance for full-screen windows. Known to cause flickering # when redirecting/unredirecting windows. # # Default: false # unredir-if-possible = false # Delay before unredirecting the window, in milliseconds. # # Default: 0. # unredir-if-possible-delay = 0 # Use 'WM_TRANSIENT_FOR' to group windows, and consider windows # in the same group focused at the same time. # # Default: false detect-transient = true; # Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same # group focused at the same time. This usually means windows from the same application # will be considered focused or unfocused at the same time. # 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too. # # Default: false # detect-client-leader = false # Use of damage information for rendering. This cause the only the part of the # screen that has actually changed to be redrawn, instead of the whole screen # every time. Should improve performance. # # Default: false use-damage = true; # Use X Sync fence to wait for the completion of rendering of other windows, # before using their content to render the current screen. # # Required for explicit sync drivers, such as nvidia. # # Default: false # xrender-sync-fence = false # GLX backend: Use specified GLSL fragment shader for rendering window # contents. Read the man page for a detailed explanation of the interface. # # Can be set per-window using rules. # # window-shader-fg = "default" # Force all windows to be painted with blending. Useful if you # have a `window-shader-fg` that could turn opaque pixels transparent. # # Default: false # force-win-blend = false # Do not use EWMH to detect fullscreen windows. # Reverts to checking if a window is fullscreen based only on its size and coordinates. # # Default: false # no-ewmh-fullscreen = false # Dimming bright windows so their brightness doesn't exceed this set value. # Brightness of a window is estimated by averaging all pixels in the window, # so this could comes with a performance hit. # Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. # # Default: 1.0 (disabled) # max-brightness = 1.0 # Make transparent windows clip other windows like non-transparent windows do, # instead of blending on top of them. e.g. placing a transparent window on top # of another window will cut a "hole" in that window, and show the desktop background # underneath. # # Default: false # transparent-clipping = false # Set the log level. Possible values are: # "trace", "debug", "info", "warn", "error" # in increasing level of importance. Case insensitive. # If using the "TRACE" log level, it's better to log into a file # using *--log-file*, since it can generate a huge stream of logs. # # Default: "warn" log-level = "info"; # Set the log file. # If *--log-file* is never specified, logs will be written to stderr. # Otherwise, logs will to written to the given file, though some of the early # logs might still be written to the stderr. # When setting this option from the config file, it is recommended to use an absolute path. # # log-file = "/path/to/your/log/file" # Write process ID to a file. # write-pid-path = "/path/to/your/log/file"
Rules
# Rule-based per-window options. # # See WINDOW RULES section in the man page for how these work. rules: ({ match = "window_type = 'tooltip'"; fade = false; shadow = true; opacity = 0.97; full-shadow = false; }, { match = "window_type = 'dock' || " "window_type = 'desktop' || " "_GTK_FRAME_EXTENTS@"; blur-background = false; }, { match = "window_type != 'dock'"; # shader = "my_shader.frag"; }, { match = "window_type = 'dock' || " "window_type = 'desktop'"; corner-radius = 0; }, { match = "name = 'Notification' || " "class_g = 'Conky' || " "class_g ?= 'Notify-osd' || " "class_g = 'Cairo-clock' || " "_GTK_FRAME_EXTENTS@"; shadow = false; }, { match = "window_type = 'normal'"; full-shadow = false; }, { match = "window_type = 'dropdown_menu'"; shadow = false; focus = false; }, { match = "class_g = 'vlc' || " "class_g = 'mpv' "; opacity = 0.95; }, { match = "class_g = 'Emacs' || " "class_g = 'firefox' || " "class_g = 'Google-chrome' || " "class_g = 'Brave-browser'" opacity = 0.99; argb = true; }, { match = "class_g = 'steam'";} )
Includes
# `@include` directive can be used to include additional configuration files. # Relative paths are search either in the parent of this configuration file # (when the configuration is loaded through a symlink, the symlink will be # resolved first). Or in `$XDG_CONFIG_HOME/picom/include`. # #@include "extra.conf"
Scripts
ocr
This utilize the tesseract package. The script simply select an area in the desktop with maim, pipe it into tesseract, which also pipes it into xclip.
maim -u -s -b 5 -l -c 0.3,0.4,0.6,0.4 -d 0.1 | tesseract -l eng - - | xclip -selection clipboard notify-send -i ebook-reader "OCR" "Saved to clipboard"
Rofi
- i3-nord theme
I separate the main nord theme here so I can make changes to it without 'disturbing' other window manager settings.
/* -*-css-*- */ /** * Nordic rofi theme * Adapted by undiabler <undiabler@gmail.com> * * Nord Color palette imported from https://www.nordtheme.com/ * */ * { nord0: #2e3440; nord1: #3b4252; nord2: #434c5e; nord3: #4c566a; nord4: #d8dee9; nord5: #e5e9f0; nord6: #eceff4; nord7: #8fbcbb; nord8: #88c0d0; nord9: #81a1c1; nord10: #5e81ac; nord11: #bf616a; nord12: #d08770; nord13: #ebcb8b; nord14: #a3be8c; nord15: #b48ead; foreground: @nord9; backlight: #ccffeedd; background-color: transparent; highlight: underline bold #eceff4; transparent: rgba(46,52,64,0); } window { location: center; anchor: center; transparency: "screenshot"; padding: 10px; border: 0px; border-radius: 6px; background-color: @transparent; spacing: 0; children: [mainbox]; orientation: horizontal; } mainbox { spacing: 0; children: [ inputbar, message, listview ]; } message { color: @nord0; padding: 5; border-color: @foreground; border: 0px 2px 2px 2px; background-color: @nord7; } inputbar { color: @nord6; padding: 11px; background-color: @nord1; border: 1px; border-radius: 6px 6px 0px 0px; border-color: @nord10; } entry, prompt, case-indicator { text-font: inherit; text-color:inherit; } prompt { margin: 0px 1em 0em 0em ; } listview { padding: 8px; border-radius: 0px 0px 6px 6px; border-color: @nord10; border: 0px 1px 1px 1px; background-color: rgba(46,52,64,0.9); dynamic: false; } element { padding: 3px; vertical-align: 0.5; border-radius: 4px; background-color: transparent; color: @foreground; text-color: rgb(216, 222, 233); } element selected.normal { background-color: @nord7; text-color: #2e3440; } element-text, element-icon { background-color: inherit; text-color: inherit; } button { padding: 6px; color: @foreground; horizontal-align: 0.5; border: 2px 0px 2px 2px; border-radius: 4px 0px 0px 4px; border-color: @foreground; } button selected normal { border: 2px 0px 2px 2px; border-color: @foreground; }
- i3-apps theme
/* -*-css -*- */ @theme "i3-nord" window { location: southwest; anchor: center; width: 40%; x-offset: 19.5%; y-offset: -17.5%; /* padding-right: 25px; */ } listview { columns: 2; lines: 6; } /* inputbar { */ /* children: [textbox-prompt]; */ /* } */ /* textbox-prompt { */ /* str: "Apps"; */ /* text-color: inherit; */ /* } */
- i3-logout theme
/* -*-css -*- */ @theme "i3-nord" window { location: northeast; anchor: center; transparency: "screenshot"; width: 15%; padding: 10px; border: 0px; border-radius: 6px; x-offset: -7.5%; y-offset: 12.5%; spacing: 0; children: [mainbox]; } listview { columns: 1; lines: 4; }
i3-logout
question=$(echo " lock| logout| reboot| shutdown" | rofi -sep "|" \ -dmenu -i -p 'System: ' "" \ -hide-scrollbar \ -eh 1 \ -color-enabled true \ -theme "i3-logout") case $question in *lock) i3lock-fancy ;; *logout) i3-msg exit ;; *reboot) if [[ $(command -v systemctl) ]]; then systemctl reboot else shutdown -r now fi ;; *shutdown) if [[ $(command -v systemctl) ]]; then systemctl poweroff else poweroff fi ;; *) exit 0 # do nothing on wrong response ;; esac
transfer screen lock
A locker script for i3lock-fancy and xss-lock. Requires xidlehook
# get the primary display export PRIMARY_DISPLAY="$(xrandr | awk '/ primary/{print $1}')" # Run xidlehook xidlehook \ `# Don't lock when there's a fullscreen application` \ --not-when-fullscreen \ `# Don't lock when there's audio playing` \ --not-when-audio \ `# Dim the screen after 60 seconds, undim if user becomes active` \ --timer 60 \ 'xrandr --output "$PRIMARY_DISPLAY" --brightness .1' \ 'xrandr --output "$PRIMARY_DISPLAY" --brightness 1' \ `# Undim & lock after 10 more seconds` \ --timer 10 \ 'xrandr --output "$PRIMARY_DISPLAY" --brightness 1; i3lock-fancy -f Overpass-Nerd-Font-Reg -d ' \ '' \ `# Finally, suspend an hour after it locks` \ --timer 3600 \ 'systemctl suspend' \ ''