Sway-config/.config/sway/config

260 lines
9.1 KiB
Text
Raw Normal View History

2023-03-23 15:43:18 +01:00
### noch zu tun:
2023-03-23 16:30:37 +01:00
# Farbeinstellungen für Alacritty, Mako und swaynag aus einer Datei automatisch anpassen (shellskript beim Start ausführen, um configs anzupassen?)
# Screenshot optimieren, Beispiel: https://github.com/de-arl/slurpshot
2023-03-23 15:43:18 +01:00
# https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation
2023-09-24 21:09:40 +02:00
Font "Noto Sans" Regular 14
2023-03-23 15:43:18 +01:00
### Variables
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction key
set $left n
set $down r
set $up t
set $right d
# Your preferred terminal emulator
set $term alacritty
2023-09-24 21:05:53 +02:00
# Colors / Design
2023-03-23 15:43:18 +01:00
set $primary 8d00c4
set $highlight c227ff
set $error c40000
set $backgr 28242a
set $lightbackgr 504854
set $border 000000
set $text ffffff
2023-03-23 21:42:54 +01:00
set $wallpaper ~/.config/sway/2020-12-21_The-fairy-fir-tree_by-David-Revoy.jpg
2023-11-19 19:38:26 +01:00
set $wallpaper2 ~/.config/sway/418263.jpg
2023-09-24 21:05:53 +02:00
# The default font can also be set with fontconfig
2023-11-19 19:38:26 +01:00
Font "Noto Sans" Regular 14
2023-03-23 15:43:18 +01:00
# Your preferred applications
2023-11-19 19:38:26 +01:00
#set $launcher bemenu-run --fn 14 -m -2 -l 10 -i -p ▶ -B 1 --tf "#$highlight" --fb "#$backgr" --nb "#$backgr" --hb "#$backgr" --hf "#$highlight" --ab "#$backgr" --bdr "#$border" | xargs swaymsg exec --
set $launcher wofi --show drun --monitor -2 --lines 10 --insensitive --allow-images | xargs swaymsg exec --
2023-09-24 21:05:53 +02:00
set $menu ~/.config/sway/menu.sh --fn 14 -m -2 -l 10 -i -B 1 --tf "#$highlight" --fb "#$backgr" --nb "#$backgr" --hb "#$backgr" --hf "#$highlight" --ab "#$backgr" --bdr "#$border"
2023-03-23 15:43:18 +01:00
set $term alacritty
2023-03-23 21:42:54 +01:00
set $lock swaylock -f -e -i "$wallpaper" -s fill --indicator-x-position 100 --ring-color "$primary" --ring-clear-color "$highlight" --ring-ver-color "$lightbackgr" --ring-wrong-color "$error" --inside-color 00000000 --inside-clear-color 00000000 --inside-ver-color 00000000 --inside-wrong-color 00000000 --key-hl-color "$highlight" --bs-hl-color "$error" --text-clear-color "$text" --text-ver-color "$text" --text-wrong-color "$text" --text-caps-lock-color "$text"
2023-03-23 15:43:18 +01:00
### Autostart
exec_always /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec gammastep-indicator -c ~/.config/sway/gammastep.ini
exec mako --background-color "#$backgr" --text-color "#$text" -c ~/.config/sway/mako.conf
2023-03-23 16:30:37 +01:00
# use "xwayland disable" for pure wayland session
2023-03-23 15:43:18 +01:00
exec_always xrandr --output XWAYLAND0 --primary
2023-09-24 21:05:53 +02:00
exec playerctld daemon
2023-03-23 15:43:18 +01:00
### Output configuration
2023-11-19 19:38:26 +01:00
output * bg $wallpaper2 fill
2023-03-23 15:43:18 +01:00
# You can get the names of your outputs by running: swaymsg -t get_outputs
# more wallpaper are available in /usr/share/backgrounds/sway/
### Idle configuration
for_window [class="^.*"] inhibit_idle fullscreen
for_window [app_id="^.*"] inhibit_idle fullscreen
exec swayidle -w \
timeout 180 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
timeout 185 'systemctl suspend' \
before-sleep '$lock' \
### Input configuration
2023-09-24 21:05:53 +02:00
input type:keyboard {
2023-03-23 15:43:18 +01:00
xkb_model "pc101"
xkb_layout "de"
xkb_variant "neo"
}
2023-09-24 21:05:53 +02:00
input type:touchpad {
dwt enabled
tap enabled
natural_scroll enabled
middle_emulation enabled
}
2023-03-23 15:43:18 +01:00
# You can get the names of your inputs by running: swaymsg -t get_inputs
### Key bindings
#
# Basics:
#
# Start launcher, terminal and menus
bindsym $mod+Return exec $term
bindsym $mod+a exec $launcher
bindsym XF86Search exec $launcher
bindsym $mod+Shift+l exec $menu
# Kill focused window
bindsym $mod+Shift+x kill
# Drag windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Change normal to inverse to use left mouse button for resizing and right mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+c reload
# Making a Screenshot
bindsym $mod+Shift+i exec ~/.config/sway/screenshot.sh
# Quit Notifications from mako
bindsym Control+Space exec makoctl dismiss
bindsym Control+Shift+Space exec makoctl dismiss --all
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+Backspace exec swaymsg exit
#
# Multimedia keys
#
# Pulse Audio controls
2023-11-19 17:26:49 +01:00
bindsym --locked XF86AudioRaiseVolume exec wpctl set-sink-volume @DEFAULT_SINK@ +5%
bindsym --locked XF86AudioLowerVolume exec wpctl set-sink-volume @DEFAULT_SINK@ -5%
bindsym --locked XF86AudioMute exec wpctl set-sink-mute @DEFAULT_SINK@ toggle
bindsym --locked XF86AudioMicMute exec wpctl set-source-mute @DEFAULT_SOURCE@ toggle
2023-03-23 15:43:18 +01:00
# Display controls
2023-09-24 21:05:53 +02:00
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
2023-03-23 15:43:18 +01:00
bindsym --locked XF86MonBrightnessUp exec brightnessctl set +5%
# Media player controls (MPRIS)
bindsym --locked XF86AudioPlay exec playerctl play-pause
bindsym --locked XF86AudioNext exec playerctl next
bindsym --locked XF86AudioPrev exec playerctl previous
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow 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
#
# Workspaces:
#
# Switch to workspace
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 focused container 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
# Note: workspaces can have any name you want, not just numbers.
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits respectively.
bindsym $mod+z splith
bindsym $mod+p splitv
# Switch the current container between different layout styles
bindsym $mod+i layout stacking
bindsym $mod+v layout tabbed
bindsym $mod+l layout toggle split
# Make the current focus fullscreen
bindsym $mod+e fullscreen
# 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+u focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+j move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+j scratchpad show
#
# 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
# Ditto, with arrow keys
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"
}
bindsym $mod+c mode "resize"
### Status Bar:
bar {
position top
# When the status_command prints a new line to stdout, swaybar updates.
2023-03-23 21:00:37 +01:00
status_command while ~/.config/sway/status.sh; do sleep 0,5; done
2023-03-23 15:43:18 +01:00
colors {
statusline $text
background $backgr
separator $backgr
# class border backgr. text
focused_workspace $primary $primary $text
active_workspace $lightbackgr $lightbackgr $text
urgent_workspace $highlight $backgr $text
inactive_workspace $backgr $backgr $text
}
}
### Titlebars
default_border pixel 2
default_floating_border pixel
hide_edge_borders smart
# client.class border backgr. text indicator child_border
client.focused $backgr $backgr $text $primary $primary
# client.focused_inactive $backgr $backgr $text $backgr $primary
client.unfocused $backgr $backgr $text $backgr $backgr
client.urgent $backgr $backgr $text $highlight $highlight