# ------------------------------------------------------------------------------ # Variables # ------------------------------------------------------------------------------ set $mod Mod4 set $mod2 Mod1 set $color_bg_focused #2F343F set $color_bg_unfocused #383C4A set $color_fg_unfocused #D3DAE3 set $color_fg_focused #FFFFFF set $color_indicator #4DADD4 set $color_warn #F27835 set $color_error #FC4138 set $font_family Roboto set $font_size 14 set $gtk_font_size 11 set $font $font_family $font_size set $background $HOME/.local/share/backgrounds/mountain.jpg # ------------------------------------------------------------------------------ # Device specific include # ------------------------------------------------------------------------------ # This needs to set the following variables and additionally can override any of the above variables: # $primary_monitor_identifier - Identifier of the primary monitor # $primary_monitor_resolution - Resolution for the primary monitor # $primary_monitor_scale - Scale factor for thr primary monitor # $secondary_monitor_identifier - Identifier of the primary monitor # $secondary_monitor_x_offset - X offset for the secondary monitor include config.local # ------------------------------------------------------------------------------ # Inputs # ------------------------------------------------------------------------------ input * { xkb_layout "de,de,us" xkb_variant "nodeadkeys,," xkb_options grp:shifts_toggle } input 9011:26214:ydotoold_virtual_device { xkb_layout "us" xkb_variant "" } input 9456:311:Metadot_-_Das_Keyboard_Das_Keyboard_Model_S xkb_model "pc105" input 1386:212:Wacom_Bamboo_Pen_Pen map_to_output $secondary_monitor_identifier # ------------------------------------------------------------------------------ # Outputs # ------------------------------------------------------------------------------ output $primary_monitor_identifier pos 0 0 res $primary_monitor_resolution scale $primary_monitor_scale output $secondary_monitor_identifier pos $secondary_monitor_x_offset $secondary_monitor_y_offset res $secondary_monitor_resolution scale $secondary_monitor_scale output $tertiary_monitor_identifier pos $tertiary_monitor_x_offset $tertiary_monitor_y_offset res $tertiary_monitor_resolution scale $tertiary_monitor_scale transform 90 output $primary_monitor_identifier bg $primary_monitor_background fill output $secondary_monitor_identifier bg $secondary_monitor_background fill output $tertiary_monitor_identifier bg $tertiary_monitor_background fill bindswitch --reload --locked lid:on output $internal_monitor_identifier disable bindswitch --reload --locked lid:off output $internal_monitor_identifier enable # ------------------------------------------------------------------------------ # Font # ------------------------------------------------------------------------------ font pango:$font # ------------------------------------------------------------------------------ # Launcher # ------------------------------------------------------------------------------ bindsym $mod+d exec rofi -show drun bindsym $mod+x exec rofi -show run bindsym $mod+o exec rofi-pass bindsym $mod+p exec rofi-ykman type # ------------------------------------------------------------------------------ # Window management # ------------------------------------------------------------------------------ # terminate the active window bindsym $mod+Shift+q kill # floating modifier floating_modifier $mod # change focus bindsym $mod+j focus left bindsym $mod+k focus down bindsym $mod+l focus up bindsym $mod+odiaeresis 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 $mod+Shift+j move left bindsym $mod+Shift+k move down bindsym $mod+Shift+l move up bindsym $mod+Shift+odiaeresis 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 $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 # focus the child container bindsym $mod+y focus child # resize window (you can also use the mouse for that) mode resize { # These bindings trigger as soon as you enter the resize mode # Pressing left will shrink the window’s width. # Pressing right will grow the window’s width. # Pressing up will shrink the window’s height. # Pressing down will grow the window’s height. bindsym j resize shrink width 10 px or 10 ppt bindsym k resize grow height 10 px or 10 ppt bindsym l resize shrink height 10 px or 10 ppt bindsym odiaeresis 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 # back to normal: Enter or Escape bindsym Return mode default bindsym Escape mode default bindsym $mod+r mode default } bindsym $mod+r mode resize # ------------------------------------------------------------------------------ # Workspaces # ------------------------------------------------------------------------------ set $workspace1 "1:" set $workspace2 "2:" set $workspace3 "3:" set $workspace4 "4:" set $workspace5 "5:" set $workspace6 "6:" set $workspace7 "7:…" set $workspace8 "8" set $workspace9 "9" set $workspace10 "10" # switch to workspace bindsym $mod+1 workspace $workspace1 bindsym $mod+2 workspace $workspace2 bindsym $mod+3 workspace $workspace3 bindsym $mod+4 workspace $workspace4 bindsym $mod+5 workspace $workspace5 bindsym $mod+6 workspace $workspace6 bindsym $mod+7 workspace $workspace7 bindsym $mod+8 workspace $workspace8 bindsym $mod+9 workspace $workspace9 bindsym $mod+0 workspace $workspace10 # move focused container to workspace bindsym $mod+Shift+1 move container to workspace $workspace1 bindsym $mod+Shift+2 move container to workspace $workspace2 bindsym $mod+Shift+3 move container to workspace $workspace3 bindsym $mod+Shift+4 move container to workspace $workspace4 bindsym $mod+Shift+5 move container to workspace $workspace5 bindsym $mod+Shift+6 move container to workspace $workspace6 bindsym $mod+Shift+7 move container to workspace $workspace7 bindsym $mod+Shift+8 move container to workspace $workspace8 bindsym $mod+Shift+9 move container to workspace $workspace9 bindsym $mod+Shift+0 move container to workspace $workspace10 # move current workspace to output bindsym $mod+$mod2+Right move workspace to output right bindsym $mod+$mod2+Left move workspace to output left # ------------------------------------------------------------------------------ # sway management # ------------------------------------------------------------------------------ # reload the configuration file bindsym $mod+Shift+c reload # exit sway (logs you out of your Wayland session) bindsym $mod+Shift+e exec "swaynag -f 'pango:$font' -t warning -m 'sway beenden?' -b 'Ja' 'swaymsg exit'" # ------------------------------------------------------------------------------ # Program shortcuts # ------------------------------------------------------------------------------ bindsym $mod+Return exec alacritty bindsym $mod+c exec chromium bindsym $mod+b exec librewolf bindsym $mod+t exec thunderbird bindsym $mod+g exec code bindsym $mod+z exec thunar # ------------------------------------------------------------------------------ # Audio shortcuts # ------------------------------------------------------------------------------ bindsym XF86AudioRaiseVolume exec pactl set-sink-volume $(pactl get-default-sink) +1% bindsym XF86AudioLowerVolume exec pactl set-sink-volume $(pactl get-default-sink) -1% bindsym Shift+XF86AudioRaiseVolume exec pactl set-source-volume $(pactl get-default-source) +1% bindsym Shift+XF86AudioLowerVolume exec pactl set-source-volume $(pactl get-default-source) -1% bindsym XF86AudioMicMute exec $HOME/.local/bin/toggle-default-audio --source bindsym XF86AudioMute exec $HOME/.local/bin/toggle-default-audio --sink bindsym $mod+m exec $HOME/.local/bin/toggle-default-audio --source bindsym $mod+Shift+m exec $HOME/.local/bin/toggle-default-audio --sink # ------------------------------------------------------------------------------ # Video shortcuts # ------------------------------------------------------------------------------ bindsym XF86MonBrightnessUp exec xbacklight +5 bindsym XF86MonBrightnessDown exec xbacklight -5 # ------------------------------------------------------------------------------ # Assignment of programs to workspaces # ------------------------------------------------------------------------------ assign [app_id="^Alacritty$"] $workspace1 assign [class="^code-oss$"] $workspace2 assign [app_id="^code-oss$"] $workspace2 assign [class="^VSCodium$"] $workspace2 assign [app_id="^codium$"] $workspace2 assign [class="^jetbrains-idea$"] $workspace2 assign [class="^jetbrains-idea-ce$"] $workspace2 assign [class="^firefox$"] $workspace3 assign [app_id="^firefox$"] $workspace3 assign [app_id="^LibreWolf$"] $workspace3 assign [class="^Thunderbird$"] $workspace4 assign [app_id="^thunderbird$"] $workspace4 assign [app_id="^thunderbird-beta$"] $workspace4 assign [app_id="^thunar$"] $workspace5 assign [class="^Aseprite$"] $workspace6 assign [class="^Chromium$"] $workspace7 assign [app_id="^chromium$"] $workspace7 assign [class="^Slack$"] $workspace8 assign [class="^Element$"] $workspace8 assign [class="^Snowman$"] $workspace9 assign [class="^discord$"] $workspace10 # ------------------------------------------------------------------------------ # Floating windows # ------------------------------------------------------------------------------ for_window [app_id="xfce-polkit"] floating enable for_window [title="^Password Required - Mozilla Thunderbird$"] floating enable # ------------------------------------------------------------------------------ # Screenshot shortcuts # ------------------------------------------------------------------------------ bindsym Print exec $HOME/.local/bin/swaygrim --focused-output bindsym Shift+Print exec $HOME/.local/bin/swaygrim --focused-window bindsym $mod+Print exec $HOME/.local/bin/swaygrim --output bindsym $mod+Shift+Print exec $HOME/.local/bin/swaygrim --window bindsym $mod2+Print exec $HOME/.local/bin/swaygrim --manual bindsym $mod+$mod2+Print exec $HOME/.local/bin/swaygrim --all # ------------------------------------------------------------------------------ # Lockscreen # ------------------------------------------------------------------------------ exec swayidle -w \ timeout 300 'swaylock -f' \ timeout 600 'swaymsg "output * dpms off"' \ resume 'swaymsg "output * dpms on"' \ before-sleep 'swaylock -f' bindsym control+$mod2+l exec swaylock # ------------------------------------------------------------------------------ # Window theming # ------------------------------------------------------------------------------ # border background text indicator client.focused $color_bg_focused $color_bg_focused $color_fg_focused $color_bg_focused client.focused_inactive $color_bg_unfocused $color_bg_unfocused $color_fg_unfocused $color_bg_unfocused client.unfocused $color_bg_unfocused $color_bg_unfocused $color_fg_unfocused $color_bg_unfocused client.urgent $color_bg_unfocused $color_warn $color_fg_focused $color_bg_unfocused # do not display edge borders #hide_edge_borders both # do not display a titlebar in tiled layout default_border none # gaps gaps inner 10 # gaps outer -5 # ------------------------------------------------------------------------------ # Workspace bar # ------------------------------------------------------------------------------ bar { swaybar_command waybar } # ------------------------------------------------------------------------------ # Applets # ------------------------------------------------------------------------------ exec nm-applet --indicator # ------------------------------------------------------------------------------ # Notification daemon # ------------------------------------------------------------------------------ exec /usr/bin/mako # ------------------------------------------------------------------------------ # Polkit # ------------------------------------------------------------------------------ exec /usr/lib/xfce-polkit/xfce-polkit # ------------------------------------------------------------------------------ # GTK3 # ------------------------------------------------------------------------------ set $gnome-schema org.gnome.desktop.interface exec_always { gsettings set $gnome-schema gtk-theme 'Arc-Darker' gsettings set $gnome-schema icon-theme 'Moka' gsettings set $gnome-schema cursor-theme 'Adwaita' gsettings set $gnome-schema font-name '$font_family $gtk_font_size' } # ------------------------------------------------------------------------------ # xdg-desktop-portal # ------------------------------------------------------------------------------ exec $HOME/.local/bin/fix_xdg_desktop_portal_sharing.sh include /etc/sway/config.d/50-systemd-user.conf