My Minimal i3 Setup with Tokyo Night Colors 🎨

I recently set up the i3 WM and wanted to share my setup, which features the Tokyo Night color scheme, clean gaps, and a few key tweaks.

Dependencies

First things first, you’ll need to install a few packages in dom0 using qubes-dom0-update:

sudo qubes-dom0-update feh rofi brightnessctl picom fonts-jetbrains-mono

These tools handle the background image, application launcher, brightness control, window effects (thanks to picom), and font styling.

Keybindings

Here are the keybindings I’ve found most useful:

  • Launch Terminal: Mod+Return
  • Launch Console: Mod+Shift+Return
  • Launch Rofi: Mod+d
  • Launch App Menu: Mod+Shift+d
  • Kill Window: Mod+q
  • Fullscreen: Mod+f
  • Move Window: Mod+Shift+j/k/l/; (move left/down/up/right)
  • Focus Window: Mod+j/k/l/; (focus left/down/up/right)
  • Resize Window: Mod+r (then use j/k/l/; to resize)
  • Split Layout: Mod+h (horizontal), Mod+v (vertical)
  • Toggle Layout: Mod+e (split/toggle)
  • Switch Workspaces: Mod+1 to Mod+9, Mod+0 for workspace 10
  • Move Window to Workspace: Mod+Shift+1 to Mod+Shift+0 (move to workspace 1-10)
  • Next/Previous Workspace: Mod+Tab / Mod+Shift+Tab
  • Toggle Floating: Mod+Shift+Space
  • Focus Parent: Mod+a
  • Toggle Floating Mode: Mod+Space

Audio Controls:

  • Raise Volume: XF86AudioRaiseVolume
  • Lower Volume: XF86AudioLowerVolume
  • Mute Audio: XF86AudioMute
  • Mute Microphone: XF86AudioMicMute

Brightness Controls:

  • Increase Brightness: XF86MonBrightnessUp
  • Decrease Brightness: XF86MonBrightnessDown

Picom:

Picom adds those sweet shadows, transparency, and rounded corners that make everything look sleek. I’ve configured it to keep AppVM windows solid (no transparency) and give terminals a bit of opacity for a nicer effect.

Autostart

These applications automatically launch when i3 starts:

exec --no-startup-id feh --bg-fill /path/to/your/image.png
exec --no-startup-id qubes-i3-xdg-autostart
exec --no-startup-id dunst
exec --no-startup-id picom --config ~/.config/picom/picom.conf

Final Thoughts

This setup is simple, functional, and looks great with the Tokyo Night theme. I’m always looking for ways to improve my workflow, so I’d love to hear your tweaks and ideas! Feel free to share your own configurations and suggestions. Let’s make this even better together!

Configuration Files:

  • i3: Your i3 configuration file should be located at ~/.config/i3/config.
  • Picom: Place your picom.conf file in ~/.config/picom/picom.conf.

Background Image:

To change your desktop background, you’ll need to modify the path in the feh command. Replace /path/to/your/image.png with the actual path to your desired image file.

i3config:

# ------ Dependencies ------
#feh | rofi | brightnessctl | jetbrains-mono-fonts | picom
#apps always via sudo qubes-dom0-update
#change background at autostart section

# -------- Base --------
set $mod Mod4
set $terminal qubes-i3-sensible-terminal
set $console qubes-i3-sensible-terminal console
set $lock i3lock --nofork -c 141414

font pango:JetBrains Mono Bold 12
include config.d/*.conf

# -------- Tokyo Night Colors --------
set $bg        #1a1b26
set $bg_dark   #16161e
set $fg        #c0caf5
set $blue      #7aa2f7
set $purple    #bb9af7
set $red       #f7768e

# -------- Qubes Domain Colors + Tokyo Background --------
client.background       $bg

client.focused          dom0    $blue     $bg     $purple
client.focused_inactive dom0    $bg_dark  $fg     $bg_dark
client.unfocused        dom0    $bg_dark  $fg     $bg_dark
client.urgent           dom0    $red      $bg     $red

client.focused          red     $red      $bg     $red
client.focused          orange  #ff9e64   $bg     #ff9e64
client.focused          yellow  #e0af68   $bg     #e0af68
client.focused          green   #9ece6a   $bg     #9ece6a
client.focused          blue    $blue     $bg     $blue
client.focused          purple  $purple   $bg     $purple
client.focused          gray    #a9b1d6   $bg     #a9b1d6
client.focused          black   #565f89   $bg     #565f89

# -------- Gaps --------
gaps inner 6
gaps outer 2

# -------- Autostart --------
exec --no-startup-id feh --bg-fill /path/to/your/image.png
exec --no-startup-id qubes-i3-xdg-autostart
exec --no-startup-id dunst
exec --no-startup-id xss-lock --transfer-sleep-lock -- $lock
exec --no-startup-id picom --config ~/.config/picom/picom.conf

# -------- Audio --------
set $audio_raise pactl set-sink-volume @DEFAULT_SINK@ +10%
set $audio_lower pactl set-sink-volume @DEFAULT_SINK@ -10%
set $audio_mute pactl set-sink-mute @DEFAULT_SINK@ toggle
set $audio_mic_mute pactl set-source-mute @DEFAULT_SOURCE@ toggle

bindsym XF86AudioRaiseVolume exec --no-startup-id $audio_raise
bindsym XF86AudioLowerVolume exec --no-startup-id $audio_lower
bindsym XF86AudioMute exec --no-startup-id $audio_mute
bindsym XF86AudioMicMute exec --no-startup-id $audio_mic_mute

# -------- Brightness (no extra programs) --------
bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +10%
bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 10%-

# -------- Floating Modifier --------
floating_modifier $mod

# -------- Launcher --------
bindsym $mod+d exec rofi -show drun -show-icons
bindsym $mod+Shift+d exec --no-startup-id qubes-app-menu

# -------- Terminal --------
bindsym $mod+Return exec $terminal
bindsym $mod+Shift+Return exec $console

# -------- Kill Window --------
bindsym $mod+q kill

# -------- Focus --------
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right

bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# -------- Move --------
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right

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 --------
bindsym $mod+h split h
bindsym $mod+v split v

# -------- Layout --------
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split

# -------- Fullscreen --------
bindsym $mod+f fullscreen toggle

# -------- Floating Toggle --------
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle

# -------- Parent Focus --------
bindsym $mod+a focus parent

# -------- Scratchpad --------
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show

# -------- Workspaces --------
workspace_auto_back_and_forth yes

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"

bindsym $mod+Tab workspace next
bindsym $mod+Shift+Tab workspace prev

bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10

bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10

# -------- Reload / Restart / Exit --------
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Exit i3?' -B 'Yes' 'i3-msg exit'"

# -------- Resize Mode --------
mode "resize" {
    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 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

    bindsym Escape mode "default"
    bindsym Return mode "default"
    bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"

# -------- Bar --------
bar {
    status_command qubes-i3status
    colors {
        background $bg_dark
        statusline $fg
        focused_workspace  $blue $blue $bg
        active_workspace   $bg_dark $bg_dark $fg
        inactive_workspace $bg_dark $bg_dark $fg
        urgent_workspace   $red $red $bg
    }
}

# -------- Window Rules --------
for_window [title="Tor Browser"] floating enable
for_window [instance="zenity"] floating enable

picom.conf:

# ~/.config/picom/picom.conf

# Backend rendering method
backend = "glx";

# Fading
fading = false;
fade-delta = 0;

# Shadows
shadow = true;
shadow-radius = 7;
shadow-offset-x = -7;
shadow-offset-y = -7;
shadow-opacity = 0.3;

# Window rounding
corner-radius = 10;

# Opacity
inactive-opacity = 1.0;  # All inactive windows fully opaque
active-opacity = 1.0;    # Active windows fully opaque

# Opacity rules: only terminals are slightly transparent
opacity-rule = [
  "90:class_g = 'Xfce4-terminal'",
  "90:class_g = 'URxvt'",
  "90:class_g = 'Alacritty'"
];

# Exclude Qubes AppVM windows from transparency (prevents black corners)
# Ensures AppVM windows look normal
wintypes:
{
  tooltip = { shadow = false; opacity = 0.9; };
  dock    = { shadow = false; opacity = 0.9; };
};

8 Likes

What a beautiful setup! Thanks! :slight_smile: