243 lines
8.5 KiB
Plaintext
243 lines
8.5 KiB
Plaintext
# i3 config file (v4)
|
|
#
|
|
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
|
|
#
|
|
# This config file uses keycodes (bindsym) and was written for the QWERTY
|
|
# layout.
|
|
#
|
|
# To get a config file with the same key positions, but for your current
|
|
# layout, use the i3-config-wizard
|
|
#
|
|
set $HOME /home/$USER
|
|
set $exe exec --no-startup-id
|
|
set $ROFI_THEMES_FOLDER $HOME/.config/rofi
|
|
font pango:Terminus 10px
|
|
|
|
# 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.
|
|
#$exe xss-lock --transfer-sleep-lock -- i3lock --nofork
|
|
bindsym Control+Mod1+l $exe LANG=C LC_ALL=C xlock
|
|
|
|
# Use pactl to adjust volume in PulseAudio.
|
|
set $refresh_i3status killall -SIGUSR1 i3status
|
|
bindsym XF86AudioRaiseVolume $exe pactl set-sink-volume @DEFAULT_SINK@ +1% && $refresh_i3status
|
|
bindsym XF86AudioLowerVolume $exe pactl set-sink-volume @DEFAULT_SINK@ -1% && $refresh_i3status
|
|
bindsym XF86AudioMute $exe pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
|
|
bindsym XF86AudioMicMute $exe pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
|
|
|
|
set $mod Mod4
|
|
|
|
# use these keys for focus, movement, and resize directions when reaching for
|
|
# the arrows is not convenient
|
|
set $up k
|
|
set $down j
|
|
set $left h
|
|
set $right l
|
|
|
|
# use Mouse+Mod1 to drag floating windows to their wanted position
|
|
floating_modifier Mod1
|
|
|
|
# alt-tab
|
|
bindsym Mod1+Tab $exe rofi -no-config -no-lazy-grab -modi window -show window -theme $ROFI_THEMES_FOLDER/launcher.rasi
|
|
|
|
bindsym $mod+Return exec xfce4-terminal
|
|
bindsym $mod+b exec firefox
|
|
bindsym $mod+c exec google-chrome
|
|
bindsym $mod+Shift+q kill
|
|
bindsym $mod+Shift+n exec nmcli -g SSID device wifi | rofi -dmenu -i -p "Wifi network" -no-custom -theme $ROFI_THEMES_FOLDER/launcher.rasi
|
|
|
|
# start rofi dmenu (a program launcher)
|
|
bindsym $mod+d $exe rofi -show drun -theme $ROFI_THEMES_FOLDER/launcher_side.rasi
|
|
|
|
#polybar restart
|
|
bindsym $mod+Mod1+r $exe $HOME/scripts/polybarlaunch --hack && dunstify "reload polybar"
|
|
|
|
|
|
# change focus
|
|
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 $mod+Left focus left
|
|
bindsym $mod+Down focus down
|
|
bindsym $mod+Up focus up
|
|
bindsym $mod+Right focus right
|
|
|
|
# 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
|
|
|
|
# alternatively, you can use the cursor 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
|
|
|
|
#bindsym $mod+Shift+h split h
|
|
bindsym $mod+v split v
|
|
bindsym $mod+f fullscreen toggle
|
|
|
|
# change container layout (stacked, tabbed, toggle split)
|
|
bindsym $mod+s layout stacking
|
|
bindsym $mod+w layout tabbed
|
|
bindsym $mod+e layout toggle split
|
|
|
|
# toggle tiling / floating
|
|
bindsym $mod+Shift+space floating toggle
|
|
|
|
# change focus between tiling / floating windows
|
|
bindsym $mod+space focus mode_toggle
|
|
|
|
# focus the parent container
|
|
bindsym $mod+p focus parent
|
|
|
|
bindsym $mod+Shift+minus move scratchpad
|
|
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.
|
|
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 $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 $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
|
|
|
|
# cycle workspaces
|
|
bindsym $mod+Control+Prior workspace next
|
|
bindsym $mod+Control+Next workspace prev
|
|
|
|
# reload the configuration file
|
|
bindsym $mod+Shift+c reload
|
|
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
|
bindsym $mod+Shift+r restart
|
|
# exit i3 (logs you out of your X session)
|
|
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" {
|
|
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
|
|
|
|
bindsym Shift+$left resize shrink width 1 px or 1 ppt
|
|
bindsym Shift+$down resize grow height 1 px or 1 ppt
|
|
bindsym Shift+$up resize shrink height 1 px or 1 ppt
|
|
bindsym Shift+$right resize grow width 1 px or 1 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"
|
|
|
|
# First time config
|
|
#exec i3-config-wizard
|
|
|
|
# screen brightness
|
|
|
|
#bindsym XF86MonBrightnessUp exec light -A 3
|
|
#bindsym XF86MonBrightnessDown exec light -U 3
|
|
|
|
# opensuse leap 15.4 and intel card working:
|
|
bindsym XF86MonBrightnessDown exec brightnessctl s 100-
|
|
bindsym XF86MonBrightnessUp exec brightnessctl s +100
|
|
|
|
#Assign workspaces, always put virtualbox on Workspace 8
|
|
#assign [class="^VirtualBox$"] 8
|
|
|
|
##############
|
|
# screen layouts
|
|
##############
|
|
bindsym $mod+Control+d $exe $HOME/scripts/select-screenlayout.sh
|
|
|
|
##############
|
|
# autostart programs
|
|
##############
|
|
$exe compton -b --config $HOME/.config/picom/picom.conf
|
|
#$exe feh --randomize --bg-fill $HOME/Sync/Wallpapers/*
|
|
$exe $HOME/scripts/setwall.sh
|
|
$exe $HOME/.config/polybar/launch.sh --hack &
|
|
# $exe flatpak run com.github.hluk.copyq &
|
|
$exe nm-applet &
|
|
# password prompt - tested on opensuse
|
|
$exe /usr/lib64/libexec/polkit-kde-authentication-agent-1 &
|
|
$exe dunst &
|
|
$exe xfce4-power-manager &
|
|
|
|
# Gaps if no i3-GAPS, comment this out!
|
|
gaps inner 7
|
|
gaps outer 7
|
|
|
|
#https://www.youtube.com/watch?v=HIiJ9GNtwAM
|
|
bindsym $mod+Shift+d gaps inner all set 0; gaps outer all set 0
|
|
bindsym $mod+Shift+g gaps inner all set 7; gaps outer all set 7
|
|
|
|
|
|
#i3 specific for window tweaks
|
|
for_window [title="Volume Control"] floating enable; border none
|
|
for_window [title="Remmina Remote Desktop Client"] floating enable; border none
|
|
for_window [title="Microsoft Teams Notification"] floating enable; border none
|
|
for_window [class="^.*"] border normal 1
|
|
for_window [class="^.*Chromium"] border pixel 1
|
|
for_window [title="^.*Google Chrome"] border pixel 1
|
|
for_window [title="^.*Mozilla Firefox"] border pixel 1
|
|
for_window [title="- IntelliJ IDEA"] border pixel 0
|
|
for_window [title="^.*CopyQ"] floating enable; border none
|
|
|
|
set_from_resource $bg_act i3wm.color1 #333333
|
|
set_from_resource $bg_inact i3wm.color0 #333333
|
|
set_from_resource $fg_txt i3wm.color0 #333333
|
|
set_from_resource $fg_inact_txt i3wm.color1 #333333
|
|
set_from_resource $background i3wm.color9 #333333
|
|
|
|
# color for window border i3 windows
|
|
# class border backgr. text indicator child_border
|
|
client.focused #333333 $bg_act $fg_txt #2e9ef4 #285577
|
|
client.focused_inactive #333333 $bg_inact $fg_inact_txt #484e50 #5f676a
|
|
client.unfocused #333333 #222222 #888888 #292d2e #222222
|
|
client.urgent #2f343a #900000 #ffffff #900000 #900000
|
|
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
|
|
client.background $background
|