mirror of
https://github.com/SirTeddy99/sway-config.git
synced 2026-04-20 01:50:27 +00:00
sway config
This commit is contained in:
commit
010de60716
2 changed files with 431 additions and 0 deletions
208
config
Normal file
208
config
Normal file
|
|
@ -0,0 +1,208 @@
|
|||
# Sway config - converted from Hyprland setup
|
||||
# Read `man 5 sway` for a complete reference.
|
||||
|
||||
### Input Configuration
|
||||
input "type:keyboard" {
|
||||
xkb_layout "no"
|
||||
}
|
||||
seat * xcursor_theme breeze_cursors 24
|
||||
# Media keys
|
||||
bindsym XF86AudioPlay exec playerctl play-pause
|
||||
bindsym XF86AudioPause exec playerctl pause
|
||||
bindsym XF86AudioNext exec playerctl next
|
||||
bindsym XF86AudioPrev exec playerctl previous
|
||||
bindsym XF86AudioStop exec playerctl stop
|
||||
|
||||
# Volume keys
|
||||
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
|
||||
# Brightness keys (if you have them)
|
||||
bindsym XF86MonBrightnessUp exec brightnessctl set +5%
|
||||
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
|
||||
|
||||
### Variables
|
||||
set $mod Mod4
|
||||
# Home row direction keys (vim style like your Hyprland)
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
|
||||
# Your preferred terminal (from Hyprland config)
|
||||
set $term ghostty
|
||||
|
||||
# Application launcher (wofi from your Hyprland setup)
|
||||
set $menu wofi --show drun
|
||||
|
||||
include /etc/sway/config-vars.d/*
|
||||
|
||||
### Output configuration (monitors)
|
||||
output HDMI-A-1 resolution 2560x1440 position 0,0
|
||||
output DP-6 resolution 2560x1440 position 2560,0
|
||||
output DP-7 resolution 1440x2560 position 5120,0 transform 270
|
||||
output eDP-1 resolution 1920x1200 position 7680,0
|
||||
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
||||
|
||||
# Laptop lid switch
|
||||
bindswitch --reload --locked lid:on output eDP-1 disable
|
||||
bindswitch --reload --locked lid:off output eDP-1 enable
|
||||
|
||||
### Gaps (from your Hyprland config)
|
||||
gaps inner 5
|
||||
gaps outer 20
|
||||
|
||||
### Borders
|
||||
default_border pixel 2
|
||||
client.focused #33ccff #285577 #ffffff #33ccff #33ccff
|
||||
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
|
||||
client.unfocused #333333 #222222 #888888 #292d2e #222222
|
||||
|
||||
# Assign workspaces to specific outputs
|
||||
workspace 1 output HDMI-A-1
|
||||
workspace 2 output DP-6
|
||||
workspace 3 output DP-7
|
||||
workspace 4 output DP-6
|
||||
workspace 5 output DP-6
|
||||
|
||||
# Workspace assignments
|
||||
assign [app_id="vivaldi-stable"] workspace number 1
|
||||
assign [app_id="com.mitchellh.ghostty"] workspace number 2
|
||||
assign [app_id="obsidian"] workspace number 3
|
||||
assign [app_id="vivaldi-faolnafnngnfdaknnbpnkhgohbobgegn-Default"] workspace number 3 # Teams PWA
|
||||
assign [app_id="vivaldi-cifhbcnohmdccbgoicgdjpfamggdegmo-Default"] workspace number 3 # Outlook PWA
|
||||
assign [app_id="Horizon-client"] workspace number 4
|
||||
assign [app_id="Spotify"] workspace number 5
|
||||
|
||||
# Autostart applications
|
||||
exec vivaldi-stable
|
||||
exec ghostty
|
||||
exec obsidian
|
||||
exec vivaldi-stable --app-id=faolnafnngnfdaknnbpnkhgohbobgegn # Teams PWA
|
||||
exec vivaldi-stable --app-id=cifhbcnohmdccbgoicgdjpfamggdegmo # Outlook PWA
|
||||
exec vmware-view # or horizon-client
|
||||
exec spotify
|
||||
exec mako
|
||||
exec dbus-update-activation-environment --all
|
||||
exec gnome-keyring-daemon --start --components=pkcs11,secrets,ssh
|
||||
|
||||
### Idle configuration (from your swaylock setup)
|
||||
exec swayidle -w \
|
||||
timeout 300 'swaylock -f' \
|
||||
timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
|
||||
before-sleep 'swaylock -f'
|
||||
|
||||
### Key bindings (converted from Hyprland)
|
||||
|
||||
# Basics
|
||||
bindsym $mod+Return exec $term
|
||||
bindsym $mod+q kill
|
||||
bindsym $mod+d exec $menu
|
||||
bindsym $mod+shift+z exec swaylock -f
|
||||
|
||||
# Drag floating windows
|
||||
floating_modifier $mod normal
|
||||
|
||||
# Reload configuration
|
||||
bindsym $mod+Shift+c reload
|
||||
|
||||
# Exit sway
|
||||
bindsym $mod+Shift+e exec swaynag -t warning -m 'Exit sway?' -B 'Yes' 'swaymsg exit'
|
||||
|
||||
# Moving around (vim keys like Hyprland)
|
||||
bindsym $mod+$left focus left
|
||||
bindsym $mod+$down focus down
|
||||
bindsym $mod+$up focus up
|
||||
bindsym $mod+$right focus right
|
||||
|
||||
# Arrow keys also work
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# Move windows (vim 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
|
||||
|
||||
# Arrow keys for moving
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# Workspaces (1-9 like Hyprland)
|
||||
bindsym $mod+1 workspace number 1
|
||||
bindsym $mod+2 workspace number 2
|
||||
bindsym $mod+3 workspace number 3
|
||||
bindsym $mod+4 workspace number 4
|
||||
bindsym $mod+5 workspace number 5
|
||||
bindsym $mod+6 workspace number 6
|
||||
bindsym $mod+7 workspace number 7
|
||||
bindsym $mod+8 workspace number 8
|
||||
bindsym $mod+9 workspace number 9
|
||||
bindsym $mod+0 workspace number 10
|
||||
|
||||
# Move to workspace
|
||||
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
|
||||
|
||||
# Layout stuff
|
||||
bindsym $mod+b splith
|
||||
bindsym $mod+v splitv
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
bindsym $mod+f fullscreen
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
bindsym $mod+space focus mode_toggle
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# Scratchpad
|
||||
bindsym $mod+Shift+minus move scratchpad
|
||||
bindsym $mod+minus scratchpad show
|
||||
|
||||
# Flameshot for Sway
|
||||
# exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
# exec dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
|
||||
# Screenshot binding
|
||||
# bindsym Print exec flameshot gui --raw | wl-copy
|
||||
|
||||
# Screenshots using screenshots
|
||||
bindsym Print exec grim -g "$(slurp)" - | wl-copy
|
||||
bindsym $mod+Print exec bash -c 'FILE=~/Pictures/screenshot-$(date +%Y%m%d-%H%M%S).png; grim -g "$(slurp)" "$FILE" && ksnip -e "$FILE"'
|
||||
# Resizing
|
||||
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 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"
|
||||
|
||||
# # Status Bar
|
||||
bar {
|
||||
swaybar_command waybar
|
||||
}
|
||||
|
||||
include /etc/sway/config.d/*
|
||||
Loading…
Add table
Add a link
Reference in a new issue