diff --git a/dot_config/sway/executable_config.tmpl b/dot_config/sway/executable_config.tmpl index 1cbf68d..2bd3ffb 100644 --- a/dot_config/sway/executable_config.tmpl +++ b/dot_config/sway/executable_config.tmpl @@ -9,193 +9,9 @@ set $mod Mod1 # https://github.com/swaywm/sway/wiki # https://github.com/swayos/swayos.github.io/blob/main/home/.config/sway/config -# 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 12 -#font pango:Terminus (TTF) Bold 12 -font pango:"Hack Nerd Font" 9 - -set $bg-color #2f343f -set $inactive-bg-color #2f343f -set $text-color #f3f4f5 -set $inactive-text-color #676E7D -set $urgent-bg-color #E53935 - -# 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 - -# Start Offline Speech -bindsym $mod+Shift+s exec ~/.config/nerd-dictation/run-dictation.sh - -# kill focused window -bindsym $mod+Shift+q kill - -# Menu -bindsym $mod+d exec fuzzel -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 - -# Notification Menu -bindsym $mod+Shift+n exec swaync-client -t -sw - -# 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 - -# Allow switching between workspaces with left and right swipes -bindgesture swipe:right workspace next -bindgesture swipe:left workspace prev - -# Allow container movements by pinching them -bindgesture pinch:inward+up move up -bindgesture pinch:inward+down move down -bindgesture pinch:inward+left move left -bindgesture pinch:inward+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" - -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" - -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" - -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" - -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 - -bindsym $mod+r mode "resize" - -mode "resize" { - bindsym Left resize shrink width 10px - bindsym Down resize grow height 10px - bindsym Up resize shrink height 10px - bindsym Right resize grow width 10px - bindsym Return mode "default" - bindsym Escape mode "default" -} - -input * { - dwt enabled - tap enabled - natural_scroll disabled - middle_emulation enabled - - # Flat (deactivated) or adaptative (activated) - accel_profile adaptive - - # Between -1.0 and 1.0 - pointer_accel 0.4 - - repeat_rate 100 - repeat_delay 250 - xkb_layout de - xkb_variant nodeadkeys - xkb_options grp:alt_space_toggle -} - bar { swaybar_command waybar } @@ -218,7 +34,6 @@ default_floating_border normal hide_edge_borders none titlebar_border_thickness 0 - # # Below is SwayFX extensions # @@ -244,188 +59,17 @@ input 10248:4117:FTS3528:00_2808:1015 map_to_output eDP-1 exec opensdd {{- end }} -set $gnome-schema org.gnome.desktop.interface -exec_always { - 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' - gsettings set org.gnome.desktop.wm.preferences theme "Arc-Dark" - gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' - gsettings set org.gnome.desktop.default-applications.terminal exec wezterm - gsettings set org.gnome.desktop.default-applications.terminal exec-arg start -} - # 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 - -# Press $mod+o followed by either b to launch firefox, -# Escape or Return to the default mode, respectively. -set $mode_launcher Launch: [b]rowser [p]avucontrol [w]displays [f]ilemanager -bindsym $mod+o mode "$mode_launcher" - -mode "$mode_launcher" { - bindsym b exec firefox, mode "default" - bindsym p exec pavucontrol-qt, mode "default" - bindsym w exec wdisplays, mode "default" - bindsym f exec pcmanfm-qt, mode "default" - - bindsym Escape mode "default" - bindsym Return mode "default" -} - -bindsym $mod+b exec firefox -bindsym $mod+t exec pcmanfm-qt -bindsym $mod+n exec wezterm start nmtui - -# Einstellungen für spezielle Programme (exact match instead of substring) -# Remmina (swaymsg -t get_tree) - -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 -for_window [app_id="pavucontrol"] floating enable -for_window [app_id="pavucontrol"] resize set 1000 600 -for_window [app_id="pavucontrol-qt"] floating enable -for_window [app_id="pavucontrol-qt"] resize set 1000 600 -#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 -for_window [app_id="lxqt-archiver"] floating enable -for_window [app_id="lxqt-archiver"] resize set 1000 600 -for_window [app_id="lxqt-policykit-agent"] floating enable -for_window [app_id="lxqt-policykit-agent"] resize set 1000 600 -for_window [app_id="imv"] floating enable -for_window [app_id="pamac-manager"] floating enable -for_window [app_id="org.remmina.Remmina"] floating enable -for_window [app_id="org.remmina.Remmina"] resize set 1000 600 -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 - -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 - -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" - -bindsym XF86AudioPlay exec playerctl play-pause -bindsym XF86AudioNext exec playerctl next -bindsym XF86AudioPrev exec playerctl previous -bindsym XF86Search exec fuzzel - -# 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 -bindsym Shift+Print exec grim $(xdg-user-dir PICTURES)/$(date +'%Y-%m-%d-%H%M%S_grim.png') - -bindsym $mod+p exec wlogout -p layer-shell -bindsym --no-repeat $mod+Shift+p exec "echo 2 > /tmp/wcp" - -# 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' - -# Power control script - a useful replacement for the normal i3 exiting keybind. -# https://wiki.archlinux.org/index.php/i3#Shutdown.2C_reboot.2C_lock_screen -set $mode_system System (1) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (d) shutdown -mode "$mode_system" { - 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" - # 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) DP ON, (x) eDP OFF, (y) DP OFF -mode "$mode_display" { - bindsym v exec swaymsg output eDP-1 enable && swaymsg output eDP-1 pos 1920 280 res 1920x1080, mode "default" - bindsym h exec swaymsg output DP-1 enable && swaymsg output DP-1 pos 0 0 res 1920x1080, mode "default" - bindsym x exec swaymsg output eDP-1 disable, mode "default" - bindsym y exec swaymsg output DP-1 disable, mode "default" - - # back to normal: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+m mode "$mode_display" - -# 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 -exec nm-applet - -# Bluetooth -exec blueman-applet - -# Start mako-notifyd Service -#exec "mako -c .config/mako/config" - -# Start swaync notify Service -exec swaync - -# authentication manager https://wiki.archlinux.org/title/Polkit -exec /usr/bin/lxqt-policykit-agent - -# Clipboard Manager -exec wl-paste -t text --watch clipman store - -# Using ydotool for nerd-dictation -exec ydotoold - -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 -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 - #xwayland disable include /etc/sway/config.d/* +include ~/.config/sway/modules/* exec notify-send "loaded" "Welcome to sway." diff --git a/dot_config/sway/modules/binds b/dot_config/sway/modules/binds new file mode 100644 index 0000000..a71f763 --- /dev/null +++ b/dot_config/sway/modules/binds @@ -0,0 +1,231 @@ +# start a terminal +bindsym $mod+Return exec wezterm + +# Start Offline Speech +bindsym $mod+Shift+s exec ~/.config/nerd-dictation/run-dictation.sh + +# kill focused window +bindsym $mod+Shift+q kill + +# Menu +bindsym $mod+d exec fuzzel +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 + +# Notification Menu +bindsym $mod+Shift+n exec swaync-client -t -sw + +# 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 + +# Allow switching between workspaces with left and right swipes +bindgesture swipe:right workspace next +bindgesture swipe:left workspace prev + +# Allow container movements by pinching them +bindgesture pinch:inward+up move up +bindgesture pinch:inward+down move down +bindgesture pinch:inward+left move left +bindgesture pinch:inward+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" + +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" + +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" + +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" + +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 + +mode "resize" { + bindsym Left resize shrink width 10px + bindsym Down resize grow height 10px + bindsym Up resize shrink height 10px + bindsym Right resize grow width 10px + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $mod+r mode "resize" + +# Fenster zu einem Scratchpad +bindsym $mod+Shift+minus move scratchpad +# Zeige das scratcpad window +bindsym $mod+minus scratchpad show + +# Starte Programme über Tastaurkombination + +# Press $mod+o followed by either b to launch firefox, +# Escape or Return to the default mode, respectively. +set $mode_launcher Launch: [b]rowser [p]avucontrol [w]displays [f]ilemanager +bindsym $mod+o mode "$mode_launcher" + +mode "$mode_launcher" { + bindsym b exec firefox, mode "default" + bindsym p exec pavucontrol-qt, mode "default" + bindsym w exec wdisplays, mode "default" + bindsym f exec pcmanfm-qt, mode "default" + + bindsym Escape mode "default" + bindsym Return mode "default" +} + +bindsym $mod+b exec firefox +bindsym $mod+t exec pcmanfm-qt +bindsym $mod+n exec wezterm start nmtui + +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 + +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 + +bindsym XF86AudioPlay exec playerctl play-pause +bindsym XF86AudioNext exec playerctl next +bindsym XF86AudioPrev exec playerctl previous +bindsym XF86Search exec fuzzel + +# 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 +bindsym Shift+Print exec grim $(xdg-user-dir PICTURES)/$(date +'%Y-%m-%d-%H%M%S_grim.png') + +bindsym $mod+p exec wlogout -p layer-shell +bindsym --no-repeat $mod+Shift+p exec "echo 2 > /tmp/wcp" + +# swaylock +bindsym $mod+shift+x exec swaylock -c 000000 + +# Power control script - a useful replacement for the normal i3 exiting keybind. +# https://wiki.archlinux.org/index.php/i3#Shutdown.2C_reboot.2C_lock_screen +set $mode_system System (1) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (d) shutdown +mode "$mode_system" { + 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" + # 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) DP ON, (x) eDP OFF, (y) DP OFF +mode "$mode_display" { + bindsym v exec swaymsg output eDP-1 enable && swaymsg output eDP-1 pos 1920 280 res 1920x1080, mode "default" + bindsym h exec swaymsg output DP-1 enable && swaymsg output DP-1 pos 0 0 res 1920x1080, mode "default" + bindsym x exec swaymsg output eDP-1 disable, mode "default" + bindsym y exec swaymsg output DP-1 disable, mode "default" + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $mod+m mode "$mode_display" + diff --git a/dot_config/sway/modules/exec b/dot_config/sway/modules/exec new file mode 100644 index 0000000..a22b8dd --- /dev/null +++ b/dot_config/sway/modules/exec @@ -0,0 +1,29 @@ +# Networkmanager +exec nm-applet + +# Bluetooth +exec blueman-applet + +# Start mako-notifyd Service +#exec "mako -c .config/mako/config" + +# Start swaync notify Service +exec swaync + +# authentication manager https://wiki.archlinux.org/title/Polkit +exec /usr/bin/lxqt-policykit-agent + +# Clipboard Manager +exec wl-paste -t text --watch clipman store + +# Using ydotool for nerd-dictation +exec ydotoold + +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 +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 diff --git a/dot_config/sway/modules/input b/dot_config/sway/modules/input new file mode 100644 index 0000000..6baa054 --- /dev/null +++ b/dot_config/sway/modules/input @@ -0,0 +1,18 @@ +input * { + dwt enabled + tap enabled + natural_scroll disabled + middle_emulation enabled + + # Flat (deactivated) or adaptative (activated) + accel_profile adaptive + + # Between -1.0 and 1.0 + pointer_accel 0.4 + + repeat_rate 100 + repeat_delay 250 + xkb_layout de + xkb_variant nodeadkeys + xkb_options grp:alt_space_toggle +} diff --git a/dot_config/sway/modules/theme b/dot_config/sway/modules/theme new file mode 100644 index 0000000..83dcb56 --- /dev/null +++ b/dot_config/sway/modules/theme @@ -0,0 +1,26 @@ +font pango:"Hack Nerd Font" 9 + +set $bg-color #2f343f +set $inactive-bg-color #2f343f +set $text-color #f3f4f5 +set $inactive-text-color #676E7D +set $urgent-bg-color #E53935 + +# 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 + +set $gnome-schema org.gnome.desktop.interface +exec_always { + 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' + gsettings set org.gnome.desktop.wm.preferences theme "Arc-Dark" + gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' + gsettings set org.gnome.desktop.default-applications.terminal exec wezterm + gsettings set org.gnome.desktop.default-applications.terminal exec-arg start +} diff --git a/dot_config/sway/modules/win-rules b/dot_config/sway/modules/win-rules new file mode 100644 index 0000000..b2f2462 --- /dev/null +++ b/dot_config/sway/modules/win-rules @@ -0,0 +1,122 @@ +hide_edge_borders vertical +mouse_warping none +default_border pixel 1 +default_floating_border pixel 1 +#set the variables +set { + $ii inhibit_idle focus + $game inhibit_idle focus; floating enable; border none; fullscreen enable; shadows disable + $popup floating enable; border pixel 1; sticky enable; shadows enable + $float floating enable; border pixel 1; shadows enable + $video inhibit_idle fullscreen; border none; max_render_time off + $important inhibit_idle open; floating enable; border pixel 1 + $max inhibit_idle visible; floating enable; sticky enable; border pixel 1 +} +for_window { +#ii - inhibit_idle focus + [class="Cemu"] $ii + [instance="cemu"] $ii + [app_id="cemu"] $ii + [app_id="rpcs3"] $ii + [app_id="yuzu"] $ii + [class="yuzu"] $ii + [app_id="snes9x-gtk"] $ii + +#game - inhibit_idle focus; floating enable; border none; fullscreen enable + [instance="origin.exe"] $game + [instance="gamescope"] $game + [class="dolphin-emu" title="Dolphin (.*) \| (.*) \| (.*) \| (.*)"] $game + [class="sm64ex"] $game + [class="gamescope"] $game + [class="steam_app.*"] $game + [instance="steam_app.*"] $game + [class="LLBlaze.x86_64"] $game + [app_id="clonehero"] $game + [app_id="CombatMaster.x86_64"] $game; saturation set 2 + +#popup - floating enable; sticky enable + [app_id="firefox" title="^Picture-in-Picture$"] $popup + [app_id="stoken-gui"] $popup + [app_id="org.twosheds.iwgtk"] $popup + [app_id="iwgtk"] $popup + [app_id="ksysguard"] $popup + [app_id="galculator"] $popup + [title="(?:Open|Save) (?:File|Folder|As)" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $popup + [title="^(File|Folder)\s*Already Exists\s*—\s*" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $popup + [title="Confirm to replace files" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $popup + [app_id="pavucontrol"] $popup + [app_id="qtalarm"] $popup + [app_id="deluge" title="Add Torrents*"] $popup + +#float - floating enable; border pixel 1 + [app_id="org.telegram.desktop"] $float; blur off; shadows disable; inhibit_idle open + [app_id="com.github.weclaw1.ImageRoll"] $float + [app_id="teams-for-linux"] $float + [app_id="viewnior"] $float + [instance="viewnior"] $float + [instance="yakyak"] $float + [class="Microsoft Teams - Preview"] $float + [class="teams-for-linux"] $float + [class="Microsoft Teams - Insiders"] $float + [app_id="Alacritty_floating"] $float + [title="^Information\s*—\s*Dolphin" app_id="dolphin"] $float + [title="^Loading archive" app_id="org.kde.ark"] $float + [instance="crx_nckgahadagoaajjgafhacjanaoiihapd"] $float + [title="Preferences" app_id="pcmanfm-qt"] $float + [title="File Properties" app_id="pcmanfm-qt"] $float + [app_id="anki"] $float + [window_role="pop-up,task_dialog,About"] $float; shadows enable + [window_type="dialog"] $float; shadows enable + [window_type="utility"] $float; shadows enable + [window_type="toolbar"] $float; shadows enable + [window_type="splash"] $float; shadows enable + [window_type="menu"] $float; shadows enable + [window_type="dropdown_menu"] $float; shadows enable + [window_type="popup_menu"] $float; shadows enable + [window_type="tooltip"] $float; shadows enable + [window_type="notification"] $float; shadows enable + +#video - inhibit_idle fullscreen; border none; max_render_time off + [instance="chromium"] $video + [app_id="mpv"] $video + [app_id="vlc"] $video + [class="firefox"] $video + [app_id="firefox"] $video + [class="Nightly"] $video + +#important - inhibit_idle open; floating enable; border pixel 1 + [title="Move files" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $important + [title="^(Copying|Moving)\s*—\s*Dolphin" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $important + [title="^Extracting\s" app_id="(dolphin|org.kde.ark)"] $important + [title="Copy Files" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $important + [title="Delete Files" app_id="dolphin|org.kde.ark|pcmanfm|pcmanfm-qt"] $important + [title="Removable medium is inserted" app_id="pcmanfm|pcmanfm-qt"] $important + [title="Compressing (.*) — Ark" app_id="org.kde.ark"] $important; resize set width 18 ppt + +#max - inhibit_idle visible; floating enable; sticky enable; border pixel 1 + [title="MAX - Chromium" instance="chromium"] $max + [title="MAX - Chromium" app_id="chromium"] $max + [title="MAX - Chromium" app_id="chromium" urgent=recent] $max; focus; move position center + [title="https:\/\/max.niceincontact.com\/index.html - Chromium" instance="chromium"] $max + [title="https:\/\/max.niceincontact.com\/index.html - Chromium" app_id="chromium"] $max + [title="https:\/\/max.niceincontact.com\/index.html - Chromium" app_id="chromium" urgent="latest"] $max; focus; move position center + +#misc + [class="steam"] floating enable; max_render_time off; blur disabled + [app_id="org.telegram.desktop" title="Telegram"] floating disable; inhibit_idle none + [urgent=latest] focus + [floating] shadows enable + [app_id="alacritty"] saturation set 2; blur enable + [app_id="firefox" title="Firefox — Sharing Indicator"] floating enable; kill + [title="Wine System Tray"] floating enable; kill + [app_id="blueman-manager"] floating enable + [app_id="wdisplays"] floating enable + [app_id="pavucontrol"] floating enable + [app_id="pavucontrol-qt"] floating enable + [app_id="lxqt-archiver"] floating enable + [app_id="lxqt-policykit-agent"] floating enable + [app_id="pamac-manager"] floating enable + [app_id="nm-applet"] floating enable + [app_id="nm-connection-editor"] floating enable +} + diff --git a/dot_vimrc.tmpl b/dot_vimrc.tmpl index fab71b2..5ad94bc 100644 --- a/dot_vimrc.tmpl +++ b/dot_vimrc.tmpl @@ -38,7 +38,7 @@ set rtp+=/opt/homebrew/opt/fzf syntax on " Add numbers to each line on the left-hand side. -set number +"set number " Highlight cursor line underneath the cursor horizontally. set cursorline