switched to sway

This commit is contained in:
2024-12-14 22:48:47 +05:00
parent 45c2a522c0
commit 643b32e0cd
4 changed files with 304 additions and 5 deletions

View File

@ -1,5 +1,5 @@
preload = ~/Pictures/wallpapers/a_group_of_white_lines_on_a_black_background.jpeg
preload = ~/Pictures/wallpapers/nord-street.png
wallpaper = HDMI-A-1,~/Pictures/wallpapers/a_group_of_white_lines_on_a_black_background.jpeg
wallpaper = DP-2,~/Pictures/wallpapers/a_group_of_white_lines_on_a_black_background.jpeg
wallpaper = HDMI-A-1,~/Pictures/wallpapers/nord-street.png
wallpaper = DP-2,~/Pictures/wallpapers/nord-street.png
splash = false

274
.config/sway/config Normal file
View File

@ -0,0 +1,274 @@
set $mod Mod4
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
exec waybar
exec dunst
exec_always autotiling
# fix audio mute on start
exec sleep 5; amixer -c 0 set Front unmute
exec sleep 5; 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:
#
output DP-2 position 1920 0 mode 2560x1440@144Hz adaptive_sync 1
output HDMI-A-1 position 0 360 mode 1920x1080@60Hz
#
# 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 "1133:16505:Logitech_G_Pro" {
pointer_accel 0
accel_profile "flat"
}
input type:keyboard {
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
bindsym --to-code $mod+Return exec $term
# Kill focused window
bindsym --to-code $mod+Shift+q kill
# Start your launcher
bindsym --to-code $mod+d exec $menu
# 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.
floating_modifier $mod normal
# Reload the configuration file
bindsym --to-code $mod+Shift+r reload
# 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
gaps outer 15
gaps inner 10
default_border pixel 2
client.focused #7e9cd8 #7e9cd8 #ffffff #7e9cd8 #7e9cd8
client.unfocused #1f1f28 #1f1f28 #888888 #1f1f28 #1f1f28
client.urgent #1f1f28 #1f1f28 #888888 #1f1f28 #1f1f28
client.focused_inactive #1f1f28 #1f1f28 #888888 #1f1f28 #1f1f28
#
# Moving around:
#
mouse_warping container
focus_wrapping workspace
seat * hide_cursor 3000
# seat * hide_cursor when-typing enable
# 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
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+$right move right
bindsym --to-code $mod+i focus output left
#
# 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"
bindsym --to-code --no-warn $mod+4 exec "swaysome focus 4"
bindsym --to-code --no-warn $mod+5 exec "swaysome focus 5"
bindsym --to-code --no-warn $mod+6 exec "swaysome focus 6"
bindsym --to-code --no-warn $mod+7 exec "swaysome focus 7"
bindsym --to-code --no-warn $mod+8 exec "swaysome focus 8"
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
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"
bindsym --to-code --no-warn $mod+Shift+4 exec "swaysome move 4"
bindsym --to-code --no-warn $mod+Shift+5 exec "swaysome move 5"
bindsym --to-code --no-warn $mod+Shift+6 exec "swaysome move 6"
bindsym --to-code --no-warn $mod+Shift+7 exec "swaysome move 7"
bindsym --to-code --no-warn $mod+Shift+8 exec "swaysome move 8"
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
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
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
bindsym --to-code $mod+f fullscreen
# 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
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
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
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+
bindsym --to-code --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle
bindsym --to-code --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5%
bindsym --to-code --locked XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5%
bindsym --to-code --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
bindsym --to-code --locked XF86AudioPlay exec playerctl play-pause
bindsym --to-code --locked XF86AudioPause exec playerctl play-pause
# 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
bindsym --to-code $mod+Shift+s exec grim -g "$(slurp)" - | wl-copy
exec xrandr --output DP-2 --primary
exec_always sleep 10;xrandr --output DP-2 --primary
include /etc/sway/config.d/*

View File

@ -9,13 +9,15 @@
"spacing": 10, // Gaps between modules (4px)
// Choose the order of the modules
"modules-left": [
"hyprland/workspaces"
// "hyprland/workspaces"
"sway/workspaces"
],
"modules-center": [
"mpd"
],
"modules-right": [
"hyprland/language",
// "hyprland/language",
"sway/language",
"pulseaudio",
"cpu",
"memory",
@ -29,11 +31,29 @@
"format-ru": "ru",
"keyboard-name": "keychron-keychron-q1-keyboard"
},
"sway/language": {
"format": "{}",
"format-en": "en",
"format-ru": "ru",
"keyboard-name": "keychron-keychron-q1-keyboard"
},
"custom/weather": {
"exec": "$HOME/.config/waybar/weather-plugin.sh",
"interval": 600,
"signal": "8"
},
"sway/workspaces": {
"format": "{name}",
"rewrite": {
"\\d(.*)": "$1"
},
"tooltip": false,
"on-click": "activate",
"sort-by-number": true,
"all-outputs": false,
"disable-scroll": true,
"show-special": true
},
"hyprland/workspaces": {
"format": "{name}",
"tooltip": false,

View File

@ -29,6 +29,11 @@ window#waybar {
border-radius: 0;
}
#workspaces button.focused {
border-bottom: 2px solid white;
border-radius: 0;
}
#clock,
#backlight,
#pulseaudio,