sway config

This commit is contained in:
q3aql 2025-07-30 08:52:59 +02:00
parent 15a905be98
commit 265f0c1359

View File

@ -1,6 +1,3 @@
# This file has been auto-generated by Sway.
# It will not be overwritten, so edit it as you like.
#
# sway config file (v4) # sway config file (v4)
# #
set $mod Mod4 set $mod Mod4
@ -12,35 +9,16 @@ font pango:UbuntuMono Nerd Font 11.5
#font pango:Noto Sans 10 #font pango:Noto Sans 10
#font pango:Ubuntu 10.5 #font pango:Ubuntu 10.5
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 9
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
#exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
#exec --no-startup-id connman-gtk --tray &
#exec --no-startup-id nm-applet
# Applet for Audio
#exec --no-startup-id pnmixer -t &
# Configure screens and resolution # Configure screens and resolution
exec --no-startup-id ~/.config/sway/startwlrrandr.sh & exec --no-startup-id ~/.config/sway/startwlrrandr.sh &
exec --no-startup-id systemctl --user start xdg-desktop-portal.service exec --no-startup-id systemctl --user start xdg-desktop-portal.service
exec --no-startup-id systemctl --user start xdg-desktop-portal-gtk.service exec --no-startup-id systemctl --user start xdg-desktop-portal-gtk.service
exec --no-startup-id systemctl --user start xdg-desktop-portal-wlr.service exec --no-startup-id systemctl --user start xdg-desktop-portal-wlr.service
# Permite ejecutar aplicaciones como root # Run apps as root
exec --no-startup-id ~/.config/sway/xhost-x11-root.sh & exec --no-startup-id ~/.config/sway/xhost-x11-root.sh &
# Reiniciar pipewire # Restart pipewire
exec --no-startup-id systemctl --user restart pipewire exec --no-startup-id systemctl --user restart pipewire
exec --no-startup-id systemctl --user restart pipewire-pulse exec --no-startup-id systemctl --user restart pipewire-pulse
@ -61,7 +39,6 @@ exec --no-startup-id WAYLAND_DISPLAY=wayland-1 wl-paste --watch clipman store
exec --no-startup-id sleep 9 && ~/.config/sway/nwg-wrapper-conky.sh exec --no-startup-id sleep 9 && ~/.config/sway/nwg-wrapper-conky.sh
# Use pactl to adjust volume in PulseAudio. # Use pactl to adjust volume in PulseAudio.
#set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% #&& $refresh_i3status bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% #&& $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% #&& $refresh_i3status bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% #&& $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle #&& $refresh_i3status bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle #&& $refresh_i3status
@ -75,24 +52,16 @@ floating_modifier $mod
#new_window pixel 3 #new_window pixel 3
# Start a terminal # Start a terminal
#bindsym $mod+Return exec xterm
#bindsym $mod+Return exec env WAYLAND_DISPLAY=wayland-1 alacritty
bindsym $mod+Return exec foot bindsym $mod+Return exec foot
# kill focused window # kill focused window
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
# start dmenu (a program launcher) # Start Wofi (a program launcher)
bindsym $mod+d exec --no-startup-id ~/.config/sway/wofi/wofi_fbrun bindsym $mod+d exec --no-startup-id ~/.config/sway/wofi/wofi_fbrun
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
# NetworkManager # Clipman
bindsym $mod+c exec --no-startup-id WAYLAND_DISPLAY=wayland-1 clipman pick -t wofi bindsym $mod+c exec --no-startup-id WAYLAND_DISPLAY=wayland-1 clipman pick -t wofi
#bindsym $mod+c exec --no-startup-id nm-connection-editor
# Run applications # Run applications
bindsym $mod+o exec --no-startup-id ~/.config/sway/wofi/wofi_drun bindsym $mod+o exec --no-startup-id ~/.config/sway/wofi/wofi_drun
@ -103,9 +72,7 @@ bindsym $mod+n exec --no-startup-id pcmanfm
bindsym $mod+p exec --no-startup-id ~/.config/sway/wofi/wofi_run bindsym $mod+p exec --no-startup-id ~/.config/sway/wofi/wofi_run
bindsym $mod+g exec --no-startup-id geany bindsym $mod+g exec --no-startup-id geany
bindsym $mod+m exec --no-startup-id telegram bindsym $mod+m exec --no-startup-id telegram
#bindsym $mod+z exec --no-startup-id kitty -e wf-recorder
bindsym $mod+z exec --no-startup-id ~/.config/sway/wayland-recorder bindsym $mod+z exec --no-startup-id ~/.config/sway/wayland-recorder
#bindsym $mod+u exec --no-startup-id xterm
bindsym $mod+u exec --no-startup-id ~/.config/sway/xterm-wayland bindsym $mod+u exec --no-startup-id ~/.config/sway/xterm-wayland
bindsym $mod+t exec --no-startup-id ~/.config/sway/wayland-screenshot bindsym $mod+t exec --no-startup-id ~/.config/sway/wayland-screenshot
bindsym $mod+i exec --no-startup-id lxappearance bindsym $mod+i exec --no-startup-id lxappearance
@ -135,7 +102,6 @@ set $swaylockwall ~/.config/sway/down-screen.sh
bindsym $mod+Ctrl+Shift+l exec --no-startup-id $swaylockwall bindsym $mod+Ctrl+Shift+l exec --no-startup-id $swaylockwall
# close session # close session
#bindsym Mod1+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
bindsym Mod1+Shift+e exec "swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your X session.' -B 'Yes, exit sway' 'swaymsg exit'" bindsym Mod1+Shift+e exec "swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your X session.' -B 'Yes, exit sway' 'swaymsg exit'"
# shutdown / restart / suspend... # shutdown / restart / suspend...
@ -241,9 +207,6 @@ bindsym $mod+Shift+plus move container to workspace $ws12
# force a window on a named workspace # force a window on a named workspace
assign [class="Firefox"] $ws2 assign [class="Firefox"] $ws2
#assign [class="mpv"] $ws5
#assign [class="vlc"] $ws5
#assign [class="Ristretto"] $ws5
assign [title="wf-recorder"] $ws5 assign [title="wf-recorder"] $ws5
assign [class="Gimp"] $ws5 assign [class="Gimp"] $ws5
assign [class="Gimp-2.10"] $ws5 assign [class="Gimp-2.10"] $ws5
@ -296,10 +259,9 @@ for_window [app_id="open_tv"] floating enable
for_window [app_id="org.twosheds.iwgtk"] floating enable for_window [app_id="org.twosheds.iwgtk"] floating enable
for_window [app_id="iwgtk"] floating enable for_window [app_id="iwgtk"] floating enable
# restart sway inplace (preserves your layout/session, can be used to upgrade i3) # restart sway inplace (preserves your layout/session, can be used to upgrade sway)
bindsym $mod+Shift+r reload bindsym $mod+Shift+r reload
# exit i3 (logs you out of your X session) # exit sway (logs you out of your session)
#bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
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+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'"
# resize window (you can also use the mouse for that) # resize window (you can also use the mouse for that)
@ -346,8 +308,7 @@ exec_always {
} }
# Start i3bar to display a workspace bar (plus the system information i3status # Start swaybar to display a workspace bar
# finds out, if available)
bar { bar {
position top position top
status_command ~/.config/sway/scripts/status_bar.sh status_command ~/.config/sway/scripts/status_bar.sh