cleaned up config

This commit is contained in:
2025-03-16 21:26:10 +05:00
parent d77b6ee621
commit 585f918757

View File

@ -1,13 +1,13 @@
# shortcut bindings to app and directions
set $mod Mod4
set $term alacritty
set $menu tofi-drun | xargs swaymsg exec --
set $left h
set $down j
set $up k
set $right l
set $term alacritty
set $menu tofi-drun | xargs swaymsg exec --
# autostart
exec copyq --start-server
@ -20,34 +20,16 @@ exec sleep 7s && amixer -c 0 set Front unmute
exec sleep 7s && amixer -c 1 set Front unmute
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg /home/nikita/Pictures/wallpapers/nord-street.png fill
#
# Example configuration:
#
# display & bg config
# you can get the names of your outputs by running: swaymsg -t get_outputs
output DP-2 position 1920 0 mode 2560x1440@144Hz
output HDMI-A-1 position 0 360 mode 1920x1080@60Hz
output * bg /home/nikita/Pictures/wallpapers/nord-street.png fill
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
### Idle configuration
#
# Example configuration:
#
# exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
# before-sleep 'swaylock -f -c 000000'
#
# 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 configuration
# you can get the names of your inputs by running: swaymsg -t get_inputs
# read `man 5 sway-input` for more information about this section.
input "1133:16505:Logitech_G_Pro" {
pointer_accel 0
accel_profile "flat"
@ -58,47 +40,39 @@ output * bg /home/nikita/Pictures/wallpapers/nord-street.png fill
xkb_layout us,ru
xkb_options grp:lalt_lshift_toggle,caps:escape
}
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
### Key bindings
# Start a terminal
# key bindings
# start a terminal
bindsym --to-code $mod+Return exec $term
# Kill focused window
# kill focused window
bindsym --to-code $mod+Shift+q kill
# Start your launcher
# start your launcher
bindsym --to-code $mod+d exec $menu
# App shortcuts
# app shortcuts
bindsym --to-code $mod+b exec librewolf
bindsym --to-code $mod+m exec $term -e ncmpcpp
bindsym --to-code $mod+e exec $term -e neomutt
bindsym --to-code $mod+n exec $term -e newsboat
# powermenu
bindsym --to-code $mod+SHIFT+BackSpace exec ~/.config/tofi/powermenu.sh
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
# drag floating windows by holding down $mod and left mouse button.
# resize them with right mouse button + $mod.
floating_modifier $mod normal
# Reload the configuration file
# reload the configuration file
bindsym --to-code $mod+Shift+r reload
# Exit sway (logs you out of your Wayland session)
# exit sway (logs you out of your wayland session)
bindsym --to-code $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'
### Style
# style
gaps outer 15
gaps inner 10
@ -110,31 +84,30 @@ output * bg /home/nikita/Pictures/wallpapers/nord-street.png fill
client.urgent #1f1f28 #1f1f28 #888888 #1f1f28 #1f1f28
client.focused_inactive #1f1f28 #1f1f28 #888888 #1f1f28 #1f1f28
#
# Moving around:
#
# move mouse to focused window/workspace
mouse_warping output
focus_wrapping workspace
# hide cursor after ... time
seat * hide_cursor 5000
# seat * hide_cursor when-typing enable
# Move your focus around
# move your focus around
bindsym --to-code $mod+$left focus left
bindsym --to-code $mod+$down focus down
bindsym --to-code $mod+$up focus up
bindsym --to-code $mod+$right focus right
# Move the focused window with the same, but add Shift
# move the focused window with the same, but add shift
bindsym --to-code $mod+Shift+$left move left
# bindsym --to-code $mod+Shift+$down move down
# bindsym --to-code $mod+Shift+$up move up
bindsym --to-code $mod+Shift+$down move down
bindsym --to-code $mod+Shift+$up move up
bindsym --to-code $mod+Shift+$right move right
# switch focus to other monitor
bindsym --to-code $mod+i focus output left
#
# Workspaces:
#
# Change focus between workspaces
# workspaces
# change focus between workspaces
bindsym --to-code --no-warn $mod+1 exec "swaysome focus 1"
bindsym --to-code --no-warn $mod+2 exec "swaysome focus 2"
bindsym --to-code --no-warn $mod+3 exec "swaysome focus 3"
@ -146,7 +119,7 @@ output * bg /home/nikita/Pictures/wallpapers/nord-street.png fill
bindsym --to-code --no-warn $mod+9 exec "swaysome focus 9"
bindsym --to-code --no-warn $mod+0 exec "swaysome focus 0"
# Move containers between workspaces
# move containers between workspaces
bindsym --to-code --no-warn $mod+Shift+1 exec "swaysome move 1"
bindsym --to-code --no-warn $mod+Shift+2 exec "swaysome move 2"
bindsym --to-code --no-warn $mod+Shift+3 exec "swaysome move 3"
@ -158,103 +131,29 @@ output * bg /home/nikita/Pictures/wallpapers/nord-street.png fill
bindsym --to-code --no-warn $mod+Shift+9 exec "swaysome move 9"
bindsym --to-code --no-warn $mod+Shift+0 exec "swaysome move 0"
# Focus workspace groups
bindsym --to-code $mod+Alt+1 exec "swaysome focus-group 1"
bindsym --to-code $mod+Alt+2 exec "swaysome focus-group 2"
bindsym --to-code $mod+Alt+3 exec "swaysome focus-group 3"
bindsym --to-code $mod+Alt+4 exec "swaysome focus-group 4"
bindsym --to-code $mod+Alt+5 exec "swaysome focus-group 5"
bindsym --to-code $mod+Alt+6 exec "swaysome focus-group 6"
bindsym --to-code $mod+Alt+7 exec "swaysome focus-group 7"
bindsym --to-code $mod+Alt+8 exec "swaysome focus-group 8"
bindsym --to-code $mod+Alt+9 exec "swaysome focus-group 9"
bindsym --to-code $mod+Alt+0 exec "swaysome focus-group 0"
# Move containers to other workspace groups
bindsym --to-code $mod+Alt+Shift+1 exec "swaysome move-to-group 1"
bindsym --to-code $mod+Alt+Shift+2 exec "swaysome move-to-group 2"
bindsym --to-code $mod+Alt+Shift+3 exec "swaysome move-to-group 3"
bindsym --to-code $mod+Alt+Shift+4 exec "swaysome move-to-group 4"
bindsym --to-code $mod+Alt+Shift+5 exec "swaysome move-to-group 5"
bindsym --to-code $mod+Alt+Shift+6 exec "swaysome move-to-group 6"
bindsym --to-code $mod+Alt+Shift+7 exec "swaysome move-to-group 7"
bindsym --to-code $mod+Alt+Shift+8 exec "swaysome move-to-group 8"
bindsym --to-code $mod+Alt+Shift+9 exec "swaysome move-to-group 9"
bindsym --to-code $mod+Alt+Shift+0 exec "swaysome move-to-group 0"
# Move focused container to next output
# Move focused container to other monitor
bindsym --to-code $mod+p exec "swaysome next-output"
# Move focused container to previous output
# bindsym --to-code $mod+Shift+o exec "swaysome prev-output"
# Move focused workspace group to next output
# bindsym --to-code $mod+Alt+o exec "swaysome workspace-group-next-output"
# Move focused workspace group to previous output
# bindsym --to-code $mod+Alt+Shift+o exec "swaysome workspace-group-prev-output"
# Init workspaces for every screen
# init workspaces for every screen plugin
exec "swaysome init 1"
# Switch to workspace
# bindsym --to-code $mod+1 workspace number 1
# bindsym --to-code $mod+2 workspace number 2
# bindsym --to-code $mod+3 workspace number 3
# bindsym --to-code $mod+4 workspace number 4
# bindsym --to-code $mod+5 workspace number 5
# bindsym --to-code $mod+6 workspace number 6
# bindsym --to-code $mod+7 workspace number 7
# bindsym --to-code $mod+8 workspace number 8
# bindsym --to-code $mod+9 workspace number 9
# Move focused container to workspace
# bindsym --to-code $mod+Shift+1 move container to workspace number 1
# bindsym --to-code $mod+Shift+2 move container to workspace number 2
# bindsym --to-code $mod+Shift+3 move container to workspace number 3
# bindsym --to-code $mod+Shift+4 move container to workspace number 4
# bindsym --to-code $mod+Shift+5 move container to workspace number 5
# bindsym --to-code $mod+Shift+6 move container to workspace number 6
# bindsym --to-code $mod+Shift+7 move container to workspace number 7
# bindsym --to-code $mod+Shift+8 move container to workspace number 8
# bindsym --to-code $mod+Shift+9 move container to workspace number 9
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
# bindsym --to-code $mod+b splith
# bindsym --to-code $mod+v splitv
# Switch the current container between different layout styles
# bindsym --to-code $mod+s layout stacking
# bindsym --to-code $mod+w layout tabbed
# bindsym --to-code $mod+e layout toggle split
# Make the current focus fullscreen
# make the current focus fullscreen
bindsym --to-code $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
# toggle the current focus between tiling and floating mode
bindsym --to-code $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
# swap focus between the tiling area and the floating area
bindsym --to-code $mod+space focus mode_toggle
# Resizing containers:
#
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
# resizing containers
bindsym --to-code $mod+y resize shrink width 5ppt
bindsym --to-code $mod+o resize grow width 5ppt
# bindsym --to-code $up resize shrink height 10px
# bindsym --to-code $right resize grow width 10px
#
# Utilities:
#
# Special keys to adjust volume via PulseAudio
# utilities
# special keys to adjust volume via pulseaudio
bindsym --to-code $mod+Shift+bracketleft exec playerctl -p mpd volume 0.05-
bindsym --to-code $mod+Shift+bracketright exec playerctl -p mpd volume 0.05+
@ -266,13 +165,10 @@ output * bg /home/nikita/Pictures/wallpapers/nord-street.png fill
bindsym --to-code --locked XF86AudioPause exec playerctl play-pause
bindsym --to-code --locked XF86AudioNext exec playerctl next
bindsym --to-code --locked XF86AudioPrev exec playerctl previous
# Special keys to adjust brightness via brightnessctl
bindsym --to-code --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --to-code --locked XF86MonBrightnessUp exec brightnessctl set 5%+
# Special key to take a screenshot with grim
# special key to take a screenshot with grim
bindsym --to-code $mod+Shift+s exec grim -g "$(slurp)" - | wl-copy
# bindsym --to-code $mod+Shift+s exec XDG_CURRENT_DESKTOP=sway flameshot gui;
# try to make DP-2 monitor primary for xwayland apps
exec xrandr --output DP-2 --primary
exec_always sleep 10s && xrandr --output DP-2 --primary