diff options
| author | WriterV2 <primary-v2@protonmail.com> | 2026-11-07 14:02:49 +0100 |
|---|---|---|
| committer | WriterV2 <primary-v2@protonmail.com> | 2026-11-07 14:02:49 +0100 |
| commit | e40fc64fb0311a0af88b5803ebb6ef6b86f7368c (patch) | |
| tree | 6b5bfb193bf66f2d6ceae692bbcedb91cb6d760c | |
| parent | d1960155d13ad4743eecba4991debd29050125cd (diff) | |
Wayland: Add sway config
| -rw-r--r-- | .config/sway/config | 174 | ||||
| -rw-r--r-- | .config/waybar/config | 6 | ||||
| -rw-r--r-- | .gitignore | 2 |
3 files changed, 179 insertions, 3 deletions
diff --git a/.config/sway/config b/.config/sway/config new file mode 100644 index 0000000..a1ea581 --- /dev/null +++ b/.config/sway/config @@ -0,0 +1,174 @@ +# Read `man 5 sway` for a complete reference. + +exec wl-paste --watch cliphist store + +### Variables +# +# Your preferred terminal emulator +set $term alacritty +# Your preferred application launcher +set $menu fuzzel + +### Window appearance config +default_border pixel 1 +default_floating_border pixel 1 +client.focused #ffffff #929be5 #ffffff +client.urgent #ffffff #490404 #ffffff +client.unfocused #ffffff #222432 #ffffff +gaps inner 10 +gaps outer 5 + +### Output configuration +# +# Wallpaper +output * bg #6a4d53 solid_color +# + +### Idle configuration +# +exec swayidle -w \ + timeout 300 'swaylock -f' \ + timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ + before-sleep 'swaylock -f' +# +# This will lock your screen after 300 seconds of inactivity, then turn off +# your displays after another 300 seconds, and turn your screens back on when +# resumed. It will also lock your screen before your computer goes to sleep. + +### Input configuration + + input type:keyboard { + xkb_layout "de" + } +# +# You can also configure each device individually. +# Read `man 5 sway-input` for more information about this section. + +### Key bindings +# +# Basics: +# + # Start a terminal + bindsym Alt+Ctrl+T exec $term + + # Kill focused window + bindsym Alt+F4 kill + + # Start your launcher + bindsym Super+Alt+Space exec $menu + + # Reload the configuration file + bindsym Ctrl+Super+Alt+R reload + + # Exit sway (logs you out of your Wayland session) + bindsym Ctrl+Super+Alt+Q 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' + + # Lock screen + bindsym Super+Ctrl+Alt+L exec swaylock -f +# +# Moving around: +# + # Move your focus around + bindsym Alt+tab focus next + + # Move the focused window + bindsym Alt+Shift+Left move left + bindsym Alt+Shift+Down move down + bindsym Alt+Shift+Up move up + bindsym Alt+Shift+Right move right +# +# Workspaces: +# + # Switch to workspace + bindsym Super+1 workspace number 1 + bindsym Super+2 workspace number 2 + bindsym Super+3 workspace number 3 + bindsym Super+4 workspace number 4 + bindsym Super+5 workspace number 5 + bindsym Super+6 workspace number 6 + bindsym Super+7 workspace number 7 + bindsym Super+8 workspace number 8 + bindsym Super+9 workspace number 9 + bindsym Super+0 workspace number 10 + # Move focused container to workspace + bindsym Super+Shift+1 move container to workspace number 1 + bindsym Super+Shift+2 move container to workspace number 2 + bindsym Super+Shift+3 move container to workspace number 3 + bindsym Super+Shift+4 move container to workspace number 4 + bindsym Super+Shift+5 move container to workspace number 5 + bindsym Super+Shift+6 move container to workspace number 6 + bindsym Super+Shift+7 move container to workspace number 7 + bindsym Super+Shift+8 move container to workspace number 8 + bindsym Super+Shift+9 move container to workspace number 9 + bindsym Super+Shift+0 move container to workspace number 10 + # Note: workspaces can have any name you want, not just numbers. + # We just use 1-10 as the default. +# +# Layout stuff: +# + # Switch between horizontal and vertical split layout + bindsym Super+L layout toggle split + + # Make the current focus fullscreen + bindsym Alt+f fullscreen + + # Toggle the current focus between tiling and floating mode + bindsym Super+Alt+Ctrl+F floating toggle + + # Swap focus between the tiling area and the floating area + bindsym Super+Alt+Ctrl+Tab focus mode_toggle + +# +# Resizing containers: +# +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 + + # Return to default mode + bindsym Return mode "default" + bindsym Escape mode "default" +} +# Switch to resize move +bindsym Super+Alt+Shift+R mode "resize" + +# +# Utilities: +# + # Special keys to adjust volume via PulseAudio + bindsym --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle + bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -2% + bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +2% + bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle + + # Special keys to control media via playerctl + bindsym --locked XF86AudioPlay exec playerctl play-pause + bindsym --locked XF86AudioPause exec playerctl play-pause + bindsym --locked XF86AudioPrev exec playerctl previous + bindsym --locked XF86AudioNext exec playerctl next + bindsym --locked XF86AudioStop exec playerctl stop + + # Take a screenshot + bindsym Print exec maim -s /mnt/files/Pictures/Screens/$(date +%s)-screen.png + # Open an image + bindsym Super+Alt+P exec fd . -e png -e jpg -e gif /mnt | fuzzel -w 100 -p 'Search and select image to open: ' -d | xargs -I {} xdg-open {} + # Open a document + bindsym Super+Alt+D exec fd . -e pdf /mnt | fuzzel -w 100 -p 'Search and select document to open: ' -d | xargs -I {} xdg-open {}" + # Open a video + bindsym Super+Alt+V exec fd . -e webm -e mkv -e wmv -e avi -e mov -e qt -e mpeg -e mpg -e mp4 /mnt | fuzzel -w 100 -p 'Search and select video to open: ' -d | xargs -I {} xdg-open {}" + # Open clipboard list + bindsym Super+Alt+C exec cliphist list | fuzzel -w 100 -d | cliphist decode | wl-copy + # Open colorpicker and copy the value + bindsym Super+Alt+X exec hyprpicker -a + +# +# Status Bar: +# +# Read `man 5 sway-bar` for more information about this section. +bar { + swaybar_command waybar +} + +include /etc/sway/config.d/* diff --git a/.config/waybar/config b/.config/waybar/config index 9f9619c..550c36d 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -6,7 +6,7 @@ "pulseaudio" ], "modules-center": [ - "niri/workspaces" + "sway/workspaces" ], "modules-right": [ "clock" @@ -26,10 +26,10 @@ "format-muted": "", "tooltip": "false" }, - "niri/workspaces": { + "sway/workspaces": { "format": "{icon} {value}", "format-icons": { - "active": "<span color='#898570'>◉</span>", + "focused": "<span color='#898570'>◉</span>", "default": "○" } } @@ -52,3 +52,5 @@ !.config/niri/** !.config/fuzzel !.config/fuzzel/** +!.config/sway +!.config/sway/** |
