Skip to content

Instantly share code, notes, and snippets.

@enko
Created April 8, 2019 11:19
Show Gist options
  • Save enko/5f18e4eec38975666696abec40eee0e0 to your computer and use it in GitHub Desktop.
Save enko/5f18e4eec38975666696abec40eee0e0 to your computer and use it in GitHub Desktop.
font pango:Dank Mono:size 10
set $mod Mod4
set $term kitty
set $menu rofi -show drun # dmenu_path | dmenu | xargs swaymsg exec
set $workspace_layout stacked
set $wsemacs emacs
set $wscomm comm
set $wsmusic music
set $wsterm term
set $wsweb web
set $wspwsafe pwsafe
set $blue #285577
set $gray #333333
set $red #900000
input * xkb_layout "de"
input * xkb_variant "neo"
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
output eDP-1 dpms on
output eDP-1 resolution 1920x1080 position 0,0
output HDMI-A-1 dpms on
output HDMI-A-1 resolution 1920x1080 position 1920,0
output DP-3 dpms on
output DP-3 resolution 2560x1440 position 1920,0
output DP-4 dpms on
output DP-4 resolution 2560x1440 position 4480,0
output DP-5 dpms on
output DP-5 resolution 2560x1440 position 1920,0
output DP-6 dpms on
output DP-6 resolution 2560x1440 position 4480,0
workspace $wspwsafe output "eDP-1"
workspace $wsmusic output "eDP-1"
workspace $wsemacs output "HDMI-A-1"
workspace $wscomm output "HDMI-A-1"
workspace $wsweb output "HDMI-A-1"
workspace $wsterm output "HDMI-A-1"
workspace $wsemacs output "DP-3"
workspace $wscomm output "DP-3"
workspace $wsweb output "DP-4"
workspace $wsterm output "DP-4"
workspace $wsemacs output "DP-5"
workspace $wscomm output "DP-5"
workspace $wsweb output "DP-6"
workspace $wsterm output "DP-6"
exec swayidle -w \
timeout 300 'swaylock -f -c 000000' \
timeout 60 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f -c 000000'
assign [class="Emacs"] $wsemacs
assign [class="kitty"] $wsterm
assign [title="^Riot"] $wscomm
assign [class="pwsafe"] $wspwsafe
assign [class="Nightly"] $wsweb
# TODO does not work
assign [class="Spotify"] $wsmusic
for_window [class="Spotify"] move to workspace $wsmusic
bindsym $mod+period exec rofi -show emoji -modi emoji
bindsym $mod+i mode "keyplane"
mode "keyplane" {
bindsym $mod+u exec ~/.local/bin/select-workspace.sh; mode "default"
bindsym $mod+x exec $menu; mode "default"
bindsym $mod+Shift+c kill; mode "default"
bindsym $mod+s exec grim -g "$(slurp)" ~/Bilder/screenshot-`date -Iseconds`.png; mode "default"
bindsym $mod+1 focus output eDP-1; mode "default"
bindsym $mod+2 focus output DP-3 ; focus output HDMI-A-1 ; mode "default"
bindsym $mod+3 focus output DP-4; mode "default"
}
floating_modifier $mod normal
bindsym $mod+Shift+c reload
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'
bindsym $mod+l exec swaylock -f -c 000000
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+f fullscreen
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle # mute sound
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# move focus to the parent container
bindsym $mod+a focus parent
exec ~/.local/bin/startup-wayland.sh
include /etc/sway/config.d/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment