Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions i3-settings-qubes.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ BuildRequires: make
Requires: i3
Requires: xautolock
Requires: i3lock
Requires: perl-Data-Dumper
Requires: perl-File-Temp
Requires: perl-Getopt-Long
Requires: perl-Data-Dumper
Requires: perl-File-Temp
Requires: perl-Getopt-Long
Requires: perl-open
Recommends: j4-dmenu-desktop
Recommends: dmenu
Recommends: dunst


Expand Down
243 changes: 168 additions & 75 deletions i3.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,42 @@
# layout, use the i3-config-wizard
#

# Please see https://i3wm.org/docs/userguide.html for a complete reference!

set $mod Mod1

include config.d/*.conf

## VARS BEGIN ##
set $font pango:monospace 8

set $lock i3lock --nofork -c 141414

# Optional: Use amixer as pactl over amplifies volume above 100%.
#set $audio_raise amixer -q sset Master 10%+ unmute
#set $audio_lower amixer -q sset Master 10%- unmute
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

set $terminal qubes-i3-sensible-terminal
set $console qubes-i3-sensible-terminal console

# start dmenu (a program launcher)
# j4-dmenu-desktop is not upstreamed but it is much faster.
set $dmenu_common_args --dmenu="dmenu -l 25 -i -nb \#d2d2d2 -nf \#333333 -sb \#63a0ff -sf \#f5f5f5"
#set $dmenu i3-dmenu-desktop
set $dmenu j4-dmenu-desktop
set $dmenu_extra_args --no-generic --term=qubes-i3-sensible-terminal

#set $desktop_autostart dex-autostart --autostart --environment=i3 --term=qubes-i3-sensible-terminal
set $desktop_autostart qubes-i3-xdg-autostart
## VARS END ##

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 8
font $font

# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
Expand All @@ -22,16 +55,68 @@ font pango:monospace 8

# 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

# Use pactl to adjust volume in PulseAudio.
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
# Optional: Use amixer as pactl over amplifies volume above 100%.
#bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -q sset Master 10%+ unmute
#bindsym XF86AudioLowerVolume exec --no-startup-id amixer -q sset Master 10%- unmute
exec --no-startup-id xss-lock --transfer-sleep-lock -- $lock
bindsym $mod+Shift+o exec $lock

# Adjust volume.
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

client.background dom0 #c4c4c4
client.focused dom0 #f7f7f7 #f5f5f5 #000000 #0a0a0a
client.focused_inactive dom0 #f7f7f7 #dcdcdc #191919 #232323
client.unfocused dom0 #f7f7f7 #c4c4c4 #323232 #3b3b3b
client.urgent dom0 #bd2727 #e79e27 #333333 #27bdbd

client.background red #841b1b
client.focused red #d06767 #bd2727 #ffffff #27bdbd
client.focused_inactive red #d06767 #971f1f #e5e5e5 #1f9797
client.unfocused red #d06767 #841b1b #cccccc #1b8484
client.urgent red #bd2727 #e79e27 #333333 #27bdbd

client.background orange #a16e1b
client.focused orange #eebb67 #e79e27 #000000 #2770e7
client.focused_inactive orange #eebb67 #b87e1f #191919 #1f59b8
client.unfocused orange #eebb67 #a16e1b #323232 #1b4ea1
client.urgent orange #bd2727 #e79e27 #333333 #27bdbd

client.background yellow #a1a023
client.focused yellow #eeec6f #e7e532 #000000 #3234e7
client.focused_inactive yellow #eeec6f #b8b728 #191919 #2829b8
client.unfocused yellow #eeec6f #a1a023 #323232 #2324a1
client.urgent yellow #bd2727 #e79e27 #333333 #27bdbd

client.background green #3e972c
client.focused green #8be379 #5ad840 #000000 #be40d8
client.focused_inactive green #8be379 #48ac33 #191919 #9833ac
client.unfocused green #8be379 #3e972c #323232 #852c97
client.urgent green #bd2727 #e79e27 #333333 #27bdbd

client.background gray #636368
client.focused gray #afafb4 #8e8e95 #ffffff #95958e
client.focused_inactive gray #afafb4 #717177 #e5e5e5 #777771
client.unfocused gray #afafb4 #636368 #cccccc #686863
client.urgent gray #bd2727 #e79e27 #333333 #27bdbd

client.background blue #275197
client.focused blue #739de3 #3874d8 #ffffff #d89c38
client.focused_inactive blue #739de3 #2c5cac #e5e5e5 #ac7c2c
client.unfocused blue #739de3 #275197 #cccccc #976d27
client.urgent blue #bd2727 #e79e27 #333333 #27bdbd

client.background purple #6f276f
client.focused purple #bb73bb #9f389f #ffffff #389f38
client.focused_inactive purple #bb73bb #7f2c7f #e5e5e5 #2c7f2c
client.unfocused purple #bb73bb #6f276f #cccccc #276f27
client.urgent purple #bd2727 #e79e27 #333333 #27bdbd

client.background black #141414
client.focused black #5b5b5b #333333 #ffffff #cccccc
client.focused_inactive black #5b5b5b #1e1e1e #e5e5e5 #e1e1e1
client.unfocused black #5b5b5b #141414 #cccccc #ebebeb
client.urgent black #bd2727 #e79e27 #333333 #27bdbd

# use these keys for focus, movement, and resize directions when reaching for
# the arrows is not convenient
Expand All @@ -40,78 +125,77 @@ set $down k
set $left j
set $right semicolon

# use Mouse+Mod1 to drag floating windows to their wanted position
floating_modifier Mod1
# use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# start a terminal in the domain of the currently active window
bindsym Mod1+Return exec qubes-i3-sensible-terminal
bindsym $mod+Return exec $terminal
bindsym $mod+Shift+Return exec $console

# kill focused window
bindsym Mod1+Shift+q kill
bindsym $mod+Shift+q kill

# start dmenu (a program launcher)
#bindsym Mod1+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
bindsym Mod1+d exec --no-startup-id LANG=C i3-dmenu-desktop --dmenu="dmenu -nb #d2d2d2 -nf #333333 -sb #63a0ff -sf #f5f5f5"
bindsym $mod+d exec --no-startup-id LANG=C $dmenu $dmenu_common_args $dmenu_extra_args
# add a key for standard qubes menu too
bindsym $mod+Shift+d exec --no-startup-id qubes-app-menu

# change focus
bindsym Mod1+$left focus left
bindsym Mod1+$down focus down
bindsym Mod1+$up focus up
bindsym Mod1+$right focus right
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right

# alternatively, you can use the cursor keys:
bindsym Mod1+Left focus left
bindsym Mod1+Down focus down
bindsym Mod1+Up focus up
bindsym Mod1+Right focus right
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# move focused window
bindsym Mod1+Shift+$left move left
bindsym Mod1+Shift+$down move down
bindsym Mod1+Shift+$up move up
bindsym Mod1+Shift+$right 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

# alternatively, you can use the cursor keys:
bindsym Mod1+Shift+Left move left
bindsym Mod1+Shift+Down move down
bindsym Mod1+Shift+Up move up
bindsym Mod1+Shift+Right 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 in horizontal orientation
bindsym Mod1+h split h
bindsym $mod+h split h

# split in vertical orientation
bindsym Mod1+v split v
bindsym $mod+v split v

# enter fullscreen mode for the focused container
bindsym Mod1+f fullscreen toggle
bindsym $mod+f fullscreen toggle

# change container layout (stacked, tabbed, toggle split)
bindsym Mod1+s layout stacking
bindsym Mod1+w layout tabbed
bindsym Mod1+e layout toggle split
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split

# toggle tiling / floating
bindsym Mod1+Shift+space floating toggle
bindsym $mod+Shift+t floating toggle

# change focus between tiling / floating windows
bindsym Mod1+space focus mode_toggle
bindsym $mod+t focus mode_toggle

# focus the parent container
bindsym Mod1+a focus parent
bindsym $mod+a focus parent

# focus the child container
#bindsym Mod1+d focus child
#bindsym $mod+d focus child

# move the currently focused window to the scratchpad
bindsym Mod1+Shift+minus move scratchpad
bindsym $mod+Shift+minus move scratchpad

# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym Mod1+minus scratchpad show
bindsym $mod+minus scratchpad show

# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
Expand All @@ -127,35 +211,38 @@ set $ws9 "9"
set $ws10 "10"

# switch to workspace
bindsym Mod1+1 workspace number $ws1
bindsym Mod1+2 workspace number $ws2
bindsym Mod1+3 workspace number $ws3
bindsym Mod1+4 workspace number $ws4
bindsym Mod1+5 workspace number $ws5
bindsym Mod1+6 workspace number $ws6
bindsym Mod1+7 workspace number $ws7
bindsym Mod1+8 workspace number $ws8
bindsym Mod1+9 workspace number $ws9
bindsym Mod1+0 workspace number $ws10
workspace_auto_back_and_forth yes
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

# move focused container to workspace
bindsym Mod1+Shift+1 move container to workspace number $ws1
bindsym Mod1+Shift+2 move container to workspace number $ws2
bindsym Mod1+Shift+3 move container to workspace number $ws3
bindsym Mod1+Shift+4 move container to workspace number $ws4
bindsym Mod1+Shift+5 move container to workspace number $ws5
bindsym Mod1+Shift+6 move container to workspace number $ws6
bindsym Mod1+Shift+7 move container to workspace number $ws7
bindsym Mod1+Shift+8 move container to workspace number $ws8
bindsym Mod1+Shift+9 move container to workspace number $ws9
bindsym Mod1+Shift+0 move container to 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 the configuration file
bindsym Mod1+Shift+c reload
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym Mod1+Shift+r restart
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym Mod1+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'"
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'"

# resize window (you can also use the mouse for that)
mode "resize" {
Expand All @@ -176,13 +263,13 @@ mode "resize" {
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 Mod1+r
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym Mod1+r mode "default"
bindsym $mod+r mode "default"
}

bindsym Mod1+r mode "resize"
bindsym $mod+r mode "resize"

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
Expand All @@ -203,10 +290,14 @@ bar {

# Avoids screen size fingerprinting
for_window [title="Tor Browser"] floating enable
for_window [instance="zenity"] floating enable

# Make sure all xdg autostart entries are started, this is (among other things)
# necessary to make sure transient vm's come up
exec --no-startup-id qubes-i3-xdg-autostart
exec --no-startup-id $desktop_autostart

# Start dunst explicitly, bus activation can't work if there are multiple providers
exec --no-startup-id dunst

#######################################################################
# automatically start i3-config-wizard to offer the user to create a
Expand All @@ -219,3 +310,5 @@ exec --no-startup-id qubes-i3-xdg-autostart
# Please remove the following exec line:
#######################################################################
exec i3-config-wizard

# vim: ft=i3config
Loading