mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-08-09 12:44:32 +02:00
i3: simplify a bit config
Using variables for workspaces seem pointless. I suppose this is done in default config in case you want to customize the names?
This commit is contained in:
parent
88695ec847
commit
79ca480eeb
1 changed files with 29 additions and 41 deletions
70
config
70
config
|
@ -10,7 +10,7 @@ set $mediaplayer spotify
|
||||||
|
|
||||||
font pango:Iosevka Aile 9
|
font pango:Iosevka Aile 9
|
||||||
|
|
||||||
# Style and colors
|
# style and colors
|
||||||
default_border pixel 3
|
default_border pixel 3
|
||||||
default_floating_border pixel 3
|
default_floating_border pixel 3
|
||||||
# class border backgr. text indicator child_border
|
# class border backgr. text indicator child_border
|
||||||
|
@ -21,7 +21,7 @@ client.urgent #2f343a #d00000 #ffffff #d00000 #d00000
|
||||||
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
|
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
|
||||||
client.background #ffffff
|
client.background #ffffff
|
||||||
|
|
||||||
# Audio
|
# audio
|
||||||
bindsym XF86AudioRaiseVolume exec --no-startup-id exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
bindsym XF86AudioRaiseVolume exec --no-startup-id exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||||
bindsym XF86AudioLowerVolume exec --no-startup-id exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
bindsym XF86AudioLowerVolume exec --no-startup-id exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||||
bindsym XF86AudioMute exec --no-startup-id exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
bindsym XF86AudioMute exec --no-startup-id exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||||
|
@ -33,13 +33,13 @@ bindsym XF86AudioNext exec --no-startup-id exec playerctl -p $mediaplayer
|
||||||
bindsym XF86AudioPrev exec --no-startup-id exec playerctl -p $mediaplayer previous
|
bindsym XF86AudioPrev exec --no-startup-id exec playerctl -p $mediaplayer previous
|
||||||
bindsym $mod+s exec --no-startup-id exec ~/.config/i3/bin/rofi-mediaplayer $mediaplayer
|
bindsym $mod+s exec --no-startup-id exec ~/.config/i3/bin/rofi-mediaplayer $mediaplayer
|
||||||
|
|
||||||
# Brightness
|
# brightness
|
||||||
bindsym XF86MonBrightnessUp exec --no-startup-id exec brightnessctl set +5%
|
bindsym XF86MonBrightnessUp exec --no-startup-id exec brightnessctl set +5%
|
||||||
bindsym XF86MonBrightnessDown exec --no-startup-id exec brightnessctl set 5%-
|
bindsym XF86MonBrightnessDown exec --no-startup-id exec brightnessctl set 5%-
|
||||||
|
|
||||||
# use Mouse+$mod to drag floating windows to their wanted position
|
# use Mouse+$mod to drag floating windows to their wanted position
|
||||||
floating_modifier $mod
|
floating_modifier $mod
|
||||||
floating_minimum_size 55 30
|
floating_minimum_size 55 x 30
|
||||||
|
|
||||||
# start a terminal
|
# start a terminal
|
||||||
bindsym $mod+Return exec exec $term
|
bindsym $mod+Return exec exec $term
|
||||||
|
@ -88,49 +88,36 @@ bindsym $mod+space focus mode_toggle
|
||||||
# focus the parent container
|
# focus the parent container
|
||||||
bindsym $mod+a focus parent
|
bindsym $mod+a focus parent
|
||||||
|
|
||||||
# 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"
|
|
||||||
|
|
||||||
# default workspace layout: tabbed
|
# default workspace layout: tabbed
|
||||||
workspace_layout tabbed
|
workspace_layout tabbed
|
||||||
|
|
||||||
# switch to workspace
|
# switch to workspace
|
||||||
bindsym $mod+1 workspace number $ws1
|
bindsym $mod+1 workspace number 1
|
||||||
bindsym $mod+2 workspace number $ws2
|
bindsym $mod+2 workspace number 2
|
||||||
bindsym $mod+3 workspace number $ws3
|
bindsym $mod+3 workspace number 3
|
||||||
bindsym $mod+4 workspace number $ws4
|
bindsym $mod+4 workspace number 4
|
||||||
bindsym $mod+5 workspace number $ws5
|
bindsym $mod+5 workspace number 5
|
||||||
bindsym $mod+6 workspace number $ws6
|
bindsym $mod+6 workspace number 6
|
||||||
bindsym $mod+7 workspace number $ws7
|
bindsym $mod+7 workspace number 7
|
||||||
bindsym $mod+8 workspace number $ws8
|
bindsym $mod+8 workspace number 8
|
||||||
bindsym $mod+9 workspace number $ws9
|
bindsym $mod+9 workspace number 9
|
||||||
bindsym $mod+0 workspace number $ws10
|
bindsym $mod+0 workspace number 10
|
||||||
bindsym $mod+Tab nop "previous-workspace"
|
bindsym $mod+Tab nop "previous-workspace"
|
||||||
bindsym $mod+Ctrl+o focus output right
|
bindsym $mod+Ctrl+o focus output right
|
||||||
bindsym $mod+n nop "new-workspace"
|
bindsym $mod+n nop "new-workspace"
|
||||||
focus_wrapping no
|
focus_wrapping no
|
||||||
|
|
||||||
# move focused container to workspace
|
# move focused container to workspace
|
||||||
bindsym $mod+Shift+1 move container to workspace number $ws1
|
bindsym $mod+Shift+1 move container to workspace number 1
|
||||||
bindsym $mod+Shift+2 move container to workspace number $ws2
|
bindsym $mod+Shift+2 move container to workspace number 2
|
||||||
bindsym $mod+Shift+3 move container to workspace number $ws3
|
bindsym $mod+Shift+3 move container to workspace number 3
|
||||||
bindsym $mod+Shift+4 move container to workspace number $ws4
|
bindsym $mod+Shift+4 move container to workspace number 4
|
||||||
bindsym $mod+Shift+5 move container to workspace number $ws5
|
bindsym $mod+Shift+5 move container to workspace number 5
|
||||||
bindsym $mod+Shift+6 move container to workspace number $ws6
|
bindsym $mod+Shift+6 move container to workspace number 6
|
||||||
bindsym $mod+Shift+7 move container to workspace number $ws7
|
bindsym $mod+Shift+7 move container to workspace number 7
|
||||||
bindsym $mod+Shift+8 move container to workspace number $ws8
|
bindsym $mod+Shift+8 move container to workspace number 8
|
||||||
bindsym $mod+Shift+9 move container to workspace number $ws9
|
bindsym $mod+Shift+9 move container to workspace number 9
|
||||||
bindsym $mod+Shift+0 move container to workspace number $ws10
|
bindsym $mod+Shift+0 move container to workspace number 10
|
||||||
bindsym $mod+Shift+o move workspace to output right
|
bindsym $mod+Shift+o move workspace to output right
|
||||||
bindsym $mod+Shift+n nop "move-to-new-workspace"
|
bindsym $mod+Shift+n nop "move-to-new-workspace"
|
||||||
|
|
||||||
|
@ -138,20 +125,21 @@ bindsym $mod+Shift+n nop "move-to-new-workspace"
|
||||||
bindsym $mod+Shift+c exec --no-startup-id exec systemctl --user reload --no-block i3.service
|
bindsym $mod+Shift+c exec --no-startup-id exec systemctl --user reload --no-block i3.service
|
||||||
bindsym $mod+Shift+r restart
|
bindsym $mod+Shift+r restart
|
||||||
|
|
||||||
# Lock screen and print screen
|
# lock screen
|
||||||
bindsym XF86ScreenSaver exec --no-startup-id exec xset s activate
|
bindsym XF86ScreenSaver exec --no-startup-id exec xset s activate
|
||||||
bindsym $mod+Delete exec --no-startup-id exec xset s activate
|
bindsym $mod+Delete exec --no-startup-id exec xset s activate
|
||||||
|
# print screen
|
||||||
bindsym Print exec --no-startup-id exec ~/.config/i3/bin/screenshot window
|
bindsym Print exec --no-startup-id exec ~/.config/i3/bin/screenshot window
|
||||||
bindsym $mod+Print exec --no-startup-id exec ~/.config/i3/bin/screenshot desktop
|
bindsym $mod+Print exec --no-startup-id exec ~/.config/i3/bin/screenshot desktop
|
||||||
|
|
||||||
# Quake window
|
# Quake window
|
||||||
bindsym $mod+grave nop "quake-console:$term:QuakeConsoleNeedsUniqueName:0.3"
|
bindsym $mod+grave nop "quake-console:$term:QuakeConsoleNeedsUniqueName:0.3"
|
||||||
|
|
||||||
# Get info about container/workspace
|
# get info about container/workspace
|
||||||
bindsym $mod+i nop "container-info"
|
bindsym $mod+i nop "container-info"
|
||||||
bindsym $mod+Shift+i nop "workspace-info"
|
bindsym $mod+Shift+i nop "workspace-info"
|
||||||
|
|
||||||
# Random rules
|
# random rules
|
||||||
no_focus [window_type="splash"]
|
no_focus [window_type="splash"]
|
||||||
for_window [tiling] border pixel 3
|
for_window [tiling] border pixel 3
|
||||||
for_window [class="Nm-connection-editor"] floating enable
|
for_window [class="Nm-connection-editor"] floating enable
|
||||||
|
@ -161,7 +149,7 @@ for_window [title="Firefox — Sharing Indicator"] border pixel 1, sticky enable
|
||||||
for_window [class="Pavucontrol"] floating enable
|
for_window [class="Pavucontrol"] floating enable
|
||||||
no_focus [title="Firefox — Sharing Indicator"]
|
no_focus [title="Firefox — Sharing Indicator"]
|
||||||
|
|
||||||
# Start stuff
|
# start stuff
|
||||||
exec_always --no-startup-id exec systemctl --user start --no-block i3-session.target
|
exec_always --no-startup-id exec systemctl --user start --no-block i3-session.target
|
||||||
exec --no-startup-id exec i3-msg "\
|
exec --no-startup-id exec i3-msg "\
|
||||||
workspace number 1; append_layout ~/.config/i3/ws-emacs.json; exec exec emacs; exec exec $term; exec exec $term; \
|
workspace number 1; append_layout ~/.config/i3/ws-emacs.json; exec exec emacs; exec exec $term; exec exec $term; \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue