2023-06-01 09:58:28 +02:00
### BITTE DIESE DATEI NUR MIT FOLGENDEM BEFEHL BEARBEITEN ###
# chezmoi edit .config/sway/config
2023-01-30 14:28:59 +01:00
set $ mod Mod1
2023-05-09 15:17:29 +02:00
# https://man.archlinux.org/man/sway.5.en
# https://wiki.archlinux.org/title/Sway
2023-05-09 15:34:08 +02:00
# https://i3wm.org/docs/userguide.html
2023-05-09 15:17:29 +02:00
# https://github.com/swaywm/sway/wiki
# https://github.com/swayos/swayos.github.io/blob/main/home/.config/sway/config
2023-01-30 14:28:59 +01:00
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
2023-05-09 15:17:29 +02:00
#font pango : monospace 12
font pango:Terminus (TTF) Bold 12
2023-01-30 14:28:59 +01:00
set $ bg -color #2f343f
set $ inactive -bg-color #2f343f
set $ text -color #f 3 f4f5
set $ inactive -text-color #676E7D
set $ urgent -bg-color #E 53935
# window colors
# border background text indicat>
client.focused $ bg -color $ bg -color $ text -color #00ff00
client.unfocused $ inactive -bg-color $ inactive -bg-color $ inactive -text-color #00ff00
client.focused_inactive $ inactive -bg-color $ inactive -bg-color $ inactive -text-color #00ff00
client.urgent $ urgent -bg-color $ urgent -bg-color $ text -color #00ff00
# Use Mouse+ $ mod to drag floating windows to their wanted position
floating_modifier $ mod
# start a terminal
bindsym $ mod +Return exec wezterm
# kill focused window
bindsym $ mod +Shift+q kill
# Menu
bindsym $ mod +d exec fuzzel
2023-06-05 17:36:34 +02:00
bindsym $ mod +Shift+d exec j4-dmenu-desktop --dmenu="~/.config/sway/bemenu-run.sh -l 30" --term="wezterm" --no-generic
bindsym $ mod +y exec clipman pick --tool=CUSTOM --tool-args="fuzzel -d"
bindsym $ mod +Shift+y exec ~/.config/fuzzel/fuzzel-pass.sh
2023-01-30 14:28:59 +01:00
# change focus
bindsym $ mod +j focus left
bindsym $ mod +k focus down
bindsym $ mod +l focus up
bindsym $ mod +odiaeresis 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+j move left
bindsym $ mod +Shift+k move down
bindsym $ mod +Shift+l move up
bindsym $ mod +Shift+odiaeresis 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
# split in horizontal orientation
bindsym $ mod +h split h
# split in vertical orientation
bindsym $ mod +v split v
# enter fullscreen mode for the focused container
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 +a focus parent
bindsym --no-repeat $ mod +1 workspace number 1; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +2 workspace number 2; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +3 workspace number 3; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +4 workspace number 4; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +5 workspace number 5; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +6 workspace number 6; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +7 workspace number 7; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +8 workspace number 8; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +9 workspace number 9; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +0 workspace number 10; exec "echo 1 > /tmp/sov"
2023-05-09 15:17:29 +02:00
bindsym --no-repeat $ mod +Ctrl+1 workspace number 11; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +Ctrl+2 workspace number 12; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +Ctrl+3 workspace number 13; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +Ctrl+4 workspace number 14; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +Ctrl+5 workspace number 15; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +Ctrl+6 workspace number 16; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +Ctrl+7 workspace number 17; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +Ctrl+8 workspace number 18; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +Ctrl+9 workspace number 19; exec "echo 1 > /tmp/sov"
bindsym --no-repeat $ mod +Ctrl+0 workspace number 20; exec "echo 1 > /tmp/sov"
2023-01-30 14:28:59 +01:00
bindsym --release $ mod +1 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +2 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +3 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +4 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +5 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +6 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +7 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +8 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +9 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +0 exec "echo 0 > /tmp/sov"
2023-05-09 15:17:29 +02:00
bindsym --release $ mod +Ctrl+1 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +Ctrl+2 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +Ctrl+3 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +Ctrl+4 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +Ctrl+5 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +Ctrl+6 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +Ctrl+7 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +Ctrl+8 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +Ctrl+9 exec "echo 0 > /tmp/sov"
bindsym --release $ mod +Ctrl+0 exec "echo 0 > /tmp/sov"
2023-01-30 14:28:59 +01:00
bindsym $ mod +Shift+1 move container to workspace number 1
bindsym $ mod +Shift+2 move container to workspace number 2
bindsym $ mod +Shift+3 move container to workspace number 3
bindsym $ mod +Shift+4 move container to workspace number 4
bindsym $ mod +Shift+5 move container to workspace number 5
bindsym $ mod +Shift+6 move container to workspace number 6
bindsym $ mod +Shift+7 move container to workspace number 7
bindsym $ mod +Shift+8 move container to workspace number 8
bindsym $ mod +Shift+9 move container to workspace number 9
bindsym $ mod +Shift+0 move container to workspace number 10
# 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 reload
2023-05-09 15:17:29 +02:00
bindsym $ mod +r mode "resize"
2023-01-30 14:28:59 +01:00
mode "resize" {
2023-05-09 15:17:29 +02:00
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
2023-01-30 14:28:59 +01:00
bindsym Return mode "default"
bindsym Escape mode "default"
}
input * {
dwt enabled
tap enabled
natural_scroll disabled
middle_emulation enabled
2023-05-02 14:37:43 +02:00
2023-05-09 15:17:29 +02:00
# Flat (deactivated) or adaptative (activated)
2023-05-02 14:37:43 +02:00
accel_profile adaptive
# Between -1.0 and 1.0
pointer_accel 0.4
2023-01-30 14:28:59 +01:00
repeat_rate 100
repeat_delay 250
xkb_layout de
xkb_variant nodeadkeys
xkb_options grp:alt_space_toggle
}
2023-05-30 11:46:05 +02:00
bar {
swaybar_command waybar
}
2023-01-30 14:28:59 +01:00
seat seat0 xcursor_theme capitaine-cursors 16
# display resoulution
2023-06-01 09:41:34 +02:00
# machine-specific configuration
{{- if eq .chezmoi.hostname "SpectreOS" }}
2023-01-30 14:28:59 +01:00
output eDP-1 pos 0 0 res 1920x1080
2023-06-01 09:41:34 +02:00
{{- end }}
{{- if eq .chezmoi.hostname "SpectreOS-deck" }}
output eDP-1 mode 800x1200 transform 90
2023-06-08 00:10:42 +02:00
input 10248:4117:FTS3528:00_2808:1015 map_to_output eDP-1
2023-06-05 18:10:17 +02:00
exec opensdd
2023-06-01 09:41:34 +02:00
{{- end }}
2023-01-30 14:28:59 +01:00
2023-05-09 15:17:29 +02:00
set $ gnome -schema org.gnome.desktop.interface
2023-05-02 14:37:43 +02:00
exec_always {
2023-05-09 15:17:29 +02:00
gsettings set $ gnome -schema cursor-theme capitaine-cursors
gsettings set $ gnome -schema gtk-theme Arc-Dark
gsettings set $ gnome -schema icon-theme Papirus-Dark
gsettings set $ gnome -schema font-name 'Cantarell 12'
2023-05-02 14:37:43 +02:00
gsettings set org.gnome.desktop.wm.preferences theme "Arc-Dark"
2023-06-05 15:24:36 +02:00
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
2023-05-02 14:37:43 +02:00
}
2023-01-30 14:28:59 +01:00
# background
output "*" background ~/desktop-bilder/background.jpg fill
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
# Benutzerdefiniert
# Fenster zu einem Scratchpad
bindsym $ mod +Shift+minus move scratchpad
# Zeige das scratcpad window
bindsym $ mod +minus scratchpad show
# Starte Programme über Tastaurkombination
2023-05-31 17:33:20 +02:00
# Press $ mod +o followed by either c to launch chromium,
2023-01-30 14:28:59 +01:00
# Escape or Return to the default mode, respectively.
2023-05-31 17:33:20 +02:00
set $ mode_launcher Launch: [c]hromium [t]hunderbird [p]avucontrol [w]displays file[m]anager
2023-01-30 14:28:59 +01:00
bindsym $ mod +o mode " $ mode_launcher "
mode " $ mode_launcher " {
2023-06-01 15:49:04 +02:00
bindsym c exec chromium, mode "default"
2023-05-02 15:04:19 +02:00
bindsym t exec thunderbird, mode "default"
bindsym p exec pavucontrol-qt, mode "default"
bindsym w exec wdisplays, mode "default"
bindsym m exec pcmanfm-qt, mode "default"
2023-01-30 14:28:59 +01:00
bindsym Escape mode "default"
bindsym Return mode "default"
}
2023-06-01 15:49:04 +02:00
bindsym $ mod +b exec chromium
2023-01-30 14:28:59 +01:00
bindsym $ mod +t exec pcmanfm-qt
bindsym $ mod +shift+t exec thunderbird
bindsym $ mod +n exec wezterm start nmtui
# Einstellungen für spezielle Programme (exact match instead of substring)
2023-05-04 12:23:58 +02:00
# Remmina (swaymsg -t get_tree)
2023-01-30 14:28:59 +01:00
for_window [app_id="foot"] border pixel 1
for_window [app_id="iwgtk"] floating enable
for_window [app_id="blueman-manager"] floating enable
for_window [app_id="blueman-manager"] resize set 1000 600
for_window [app_id="org.gnome.Nautilus"] floating enable
for_window [app_id="gnome-system-monitor"] floating enable; resize shrink down 100px; resize shrink up 100px
for_window [app_id="wdisplays"] floating enable
for_window [app_id="wdisplays"] resize set 1000 600
2023-05-09 15:17:29 +02:00
for_window [app_id="pavucontrol"] floating enable
for_window [app_id="pavucontrol"] resize set 1000 600
2023-05-04 12:23:58 +02:00
for_window [app_id="pavucontrol-qt"] floating enable
for_window [app_id="pavucontrol-qt"] resize set 1000 600
2023-05-09 15:17:29 +02:00
for_window [app_id="pcmanfm"] floating enable
for_window [app_id="pcmanfm"] resize set 1000 600
for_window [app_id="pcmanfm-qt"] floating enable
for_window [app_id="pcmanfm-qt"] resize set 1000 600
2023-05-09 15:34:08 +02:00
for_window [app_id="lxqt-archiver"] floating enable
for_window [app_id="lxqt-archiver"] resize set 1000 600
2023-05-10 09:18:42 +02:00
for_window [app_id="lxqt-policykit-agent"] floating enable
for_window [app_id="lxqt-policykit-agent"] resize set 1000 600
2023-01-30 14:28:59 +01:00
for_window [app_id="imv"] floating enable
for_window [app_id="pamac-manager"] floating enable
2023-05-09 15:17:29 +02:00
for_window [app_id="org.remmina.Remmina"] floating enable
for_window [app_id="org.remmina.Remmina"] resize set 1000 600
2023-05-22 10:39:01 +02:00
for_window [app_id="nm-applet"] floating enable
for_window [app_id="nm-applet"] resize set 1000 600
for_window [app_id="nm-connection-editor"] floating enable
for_window [app_id="nm-connection-editor"] resize set 1000 600
2023-01-30 14:28:59 +01:00
bindsym XF86MonBrightnessDown exec brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > /tmp/wob
bindsym XF86MonBrightnessUp exec brightnessctl set +5% | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > /tmp/wob
2023-05-09 15:17:29 +02:00
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% && pamixer --get-volume > /tmp/wob
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% && pamixer --get-volume > /tmp/wob
bindsym $ mod +XF86AudioPlay exec "echo 1 > /tmp/vmp"
bindsym $ mod +XF86AudioNext exec "echo 2 > /tmp/vmp"
bindsym $ mod +XF86AudioPrev exec "echo 3 > /tmp/vmp"
2023-01-30 14:28:59 +01:00
2023-05-09 15:17:29 +02:00
bindsym XF86AudioPlay exec playerctl play-pause
2023-01-30 14:28:59 +01:00
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
2023-05-09 15:17:29 +02:00
bindsym XF86Search exec fuzzel
2023-01-30 14:28:59 +01:00
# monitor-picture
# 1. Capture a Selection
bindsym Print exec grim -g "$(slurp)" $(xdg-user-dir PICTURES)/$(date +'%Y-%m-%d-%H%M%S_grim.png')
# 2. Capture the actually Display
2023-05-02 15:04:19 +02:00
bindsym Shift+Print exec grim $(xdg-user-dir PICTURES)/$(date +'%Y-%m-%d-%H%M%S_grim.png')
2023-01-30 14:28:59 +01:00
bindsym $ mod +p exec wlogout -p layer-shell
2023-05-02 15:16:47 +02:00
bindsym --no-repeat $ mod +Shift+p exec "echo 2 > /tmp/wcp"
2023-01-30 14:28:59 +01:00
2023-05-09 15:17:29 +02:00
# swaylock
bindsym $ mod +shift+x exec swaylock -c 000000
# exit sway (logs you out of your Wayland session)
bindsym $ mod +Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
2023-01-30 14:28:59 +01:00
# Power control script - a useful replacement for the normal i3 exiting keybind.
# https://wiki.archlinux.org/index.php/i3 #Shutdown .2 C_reboot .2 C_lock_screen
set $ mode_system System (1) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (d) shutdown
mode " $ mode_system " {
2023-05-09 15:17:29 +02:00
bindsym 1 exec ~/.config/sway/swayexit lock, mode "default"
bindsym e exec ~/.config/sway/swayexit logout, mode "default"
bindsym s exec ~/.config/sway/swayexit suspend, mode "default"
bindsym h exec ~/.config/sway/swayexit hibernate, mode "default"
bindsym r exec ~/.config/sway/swayexit reboot, mode "default"
bindsym d exec ~/.config/sway/swayexit shutdown, mode "default"
2023-01-30 14:28:59 +01:00
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $ mod +x mode " $ mode_system "
## Manual management of external displays
# Set the shortcuts and what they do
set $ mode_display Ext Screen (v) eDP ON, (h) HDMI ON, (x) eDP OFF, (y) HDMI OFF
mode " $ mode_display " {
2023-05-09 15:17:29 +02:00
bindsym v exec output eDP-1 enable && output eDP-1 pos 1920 0 res 1920x1080, mode "default"
bindsym h exec output HDMI-A-1 enable && output HDMI-A-1 pos 1920 0 res 1920x1080, mode "default"
bindsym x exec output eDP-1 disable, mode "default"
bindsym y exec output HDMI-A-1 disable, mode "default"
2023-01-30 14:28:59 +01:00
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
# For use a Virtual VNC Connection with wayvnc
#swaymsg create_output
# springen von Workspace zu workspace mit oder ohne container
workspace_auto_back_and_forth yes
bindsym $ mod +z workspace back_and_forth
bindsym $ mod +Shift+z move container to workspace back_and_forth; workspace back_and_forth
# Networkmanager
2023-05-09 15:17:29 +02:00
exec nm-applet
2023-01-30 14:28:59 +01:00
# Bluetooth
2023-05-09 15:17:29 +02:00
exec blueman-applet
2023-01-30 14:28:59 +01:00
# Start mako-notifyd Service
2023-05-09 15:17:29 +02:00
exec "mako -c .config/mako/config"
2023-01-30 14:28:59 +01:00
2023-05-09 15:17:29 +02:00
# authentication manager https://wiki.archlinux.org/title/Polkit
exec /usr/bin/lxqt-policykit-agent
2023-01-30 14:28:59 +01:00
2023-05-02 16:19:03 +02:00
# Clipboard Manager
exec wl-paste -t text --watch clipman store
2023-05-31 13:29:46 +02:00
# wvkbd - On-screen keyboard for wlroots that sucks less
exec wvkbd-mobintl --hidden --fn 'DejaVuSansMono Nerd Font 14' -l 'simple,special,emoji,arabic' -L 240
2023-01-30 14:28:59 +01:00
exec swayidle -w \
timeout 300 'swaylock -f' \
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f'
exec rm -f /tmp/wob && mkfifo /tmp/wob && tail -f /tmp/wob | wob
2023-05-02 15:16:47 +02:00
exec rm -f /tmp/sov && mkfifo /tmp/sov && tail -f /tmp/sov | sov -t 200
exec rm -f /tmp/wcp && mkfifo /tmp/wcp && tail -f /tmp/wcp | wcp -f 300x190 -m 20 -a rt
2023-01-30 14:28:59 +01:00
2023-05-09 15:17:29 +02:00
default_border none
default_floating_border normal
2023-01-30 14:28:59 +01:00
# Smart Gaps
smart_gaps on
# Smart Borders
smart_borders on
2023-05-09 15:17:29 +02:00
gaps inner 5
gaps outer 0
gaps top -5
2023-01-30 14:28:59 +01:00
#xwayland disable
include /etc/sway/config.d/*
exec notify-send "loaded" "Welcome to sway."