Update
This commit is contained in:
39
config/sway/autostart
Normal file
39
config/sway/autostart
Normal file
@@ -0,0 +1,39 @@
|
||||
# units
|
||||
|
||||
set $initialize_foot_server '[ -x "$(command -v foot)" ] && foot --server'
|
||||
# set $initialize_swayr_daemon '[ -x "$(command -v swayrd)" ] && systemctl --now --user enable swayrd'
|
||||
set $initialize_waybar '[ -x "$(command -v waybar)" ] && (pkill -U $USER waybar || exit 0) && $HOME/.local/share/sway/scripts/waybar.sh)'
|
||||
set $initialize_workspace_icons '[ -x "$(command -v sworkstyle)" ] && sworkstyle'
|
||||
set $initialize_poweralert_daemon '[ -x "$(command -v poweralertd)" ] && systemctl --now --user enable poweralertd'
|
||||
set $initialize_idlehack_daemon '[ -x "$(command -v idlehack)" ] && systemctl --now --user enable idlehack'
|
||||
set $initialize_idle_daemon '[ -x "$(command -v swayidle-conf)" ] && systemctl --now --user enable swayidle'
|
||||
set $initialize_mounting_daemon '[ -x "$(command -v pcmanfm-qt)" ] || [ -x "$(command -v pcmanfm)" ] && systemctl --now --user enable pcmanfm'
|
||||
set $initialize_way_displays '[ -x "$(command -v way-displays)" ] && systemctl --now --user enable way-displays'
|
||||
set $initialize_flashfocus 'systemctl --now --user enable flashfocus'
|
||||
|
||||
# autostarts
|
||||
|
||||
set $autostart_dex '[ -x "$(command -v dex)" ] && gdbus wait --session org.kde.StatusNotifierWatcher && dex -a -e SWAY'
|
||||
set $wlsunset '[ -x "$(command -v wlsunset)" ] && $HOME/.local/share/sway/scripts/sunset.sh "on"'
|
||||
set $autotiling '[ -x "$(command -v autotiling)" ] && autotiling || [ -x "$(command -v autotiling-rs)" ] && autotiling-rs'
|
||||
set $help_menu '[ -x "$(command -v nwg-wrapper)" ] && [ -f $HOME/.config/nwg-wrapper/help.sh ] && $HOME/.local/share/sway/scripts/help.sh'
|
||||
set $kanshi '[ -x "$(command -v kanshi)" ] && pkill -U $USER -x kanshi; exec kanshi'
|
||||
set $xdg-dirs '[ -x "$(command -v xdg-user-dirs-update)" ] && exec xdg-user-dirs-update'
|
||||
|
||||
## apply the keyboard layout from localectl if no keyboard layout has been set via config.d
|
||||
set $auto_xdg_keyboard 'grep -q xkb_layout ~/.config/sway/config.d/*.conf || $HOME/.local/share/sway/scripts/keyboard.sh'
|
||||
set $enable_noisetorch '[ -x "$(command -v noisetorch)" ] && noisetorch -u && noisetorch -i'
|
||||
set $disable_nm_applet_autostart '[ -x "$(command -v nm-applet)" ] && [ ! -f $HOME/.config/autostart/nm-applet.desktop ] && cp /etc/xdg/autostart/nm-applet.desktop $HOME/.config/autostart/nm-applet.desktop && echo "Hidden=true" >> $HOME/.config/autostart/nm-applet.desktop'
|
||||
set $apply_background swaymsg 'output * bg $background fill'
|
||||
|
||||
## daemons
|
||||
|
||||
set $mako '[ -x "$(command -v mako)" ] && pkill -U $USER -x mako; $HOME/.local/share/sway/scripts/mako.sh'
|
||||
# set $mako '[ -x "$(command -v mako)" ] && pkill -U $USER -x mako; $HOME/.local/share/sway/scripts/mako.sh --font "$term-font" --text-color "$text-color" --border-color "$accent-color" --background-color "$background-color" --border-size 3 --width 400 --height 200 --padding 20 --margin 20 --default-timeout 15000'
|
||||
set $swappy_notify '[ -x "$(command -v swappy)" ] && $HOME/.local/share/sway/scripts/screenshot-notify.sh'
|
||||
set $cliphist_watch '[ -x "$(command -v wl-paste)" ] && [ -x "$(command -v cliphist)" ] && wl-paste --watch waybar-signal clipboard'
|
||||
set $cliphist_store '[ -x "$(command -v wl-paste)" ] && [ -x "$(command -v cliphist)" ] && wl-paste --watch cliphist store'
|
||||
set $clip-persist '[ -x "$(command -v wl-clip-persist)" ] && pkill -U $USER -x wl-clip-persist; wl-clip-persist --clipboard regular --all-mime-type-regex \'(?i)^(?!image/x-inkscape-svg).+\''
|
||||
set $calendar_daemon 'calcurse --daemon'
|
||||
set $nm_applet '[ -x "$(command -v nm-applet)" ] && pkill -U $USER -x nm-applet && dbus-launch nm-applet'
|
||||
set $watch_playerctl '[ -x "$(command -v playerctl)" ] && pkill -U $USER -x playerctl; playerctl -a metadata --format \"{{status}} {{title}}\" --follow | while read line; do waybar-signal playerctl; waybar-signal idle; done'
|
||||
166
config/sway/config
Normal file
166
config/sway/config
Normal file
@@ -0,0 +1,166 @@
|
||||
# Default config for sway
|
||||
#
|
||||
# Copy this to ~/.config/sway/config and edit it to your liking.
|
||||
#
|
||||
# Read `man 5 sway` for a complete reference.
|
||||
|
||||
# styles - set the folder for your theme definition file
|
||||
set $theme $HOME/.local/share/sway/themes/my-gruvbox
|
||||
|
||||
# theme variables
|
||||
include $theme/theme.conf
|
||||
|
||||
# global variables
|
||||
include $HOME/.config/sway/definitions
|
||||
|
||||
include $HOME/.config/sway/inputs/*
|
||||
|
||||
# enable modes
|
||||
include $HOME/.config/sway/modes/*
|
||||
|
||||
include $HOME/.config/sway/autostart
|
||||
|
||||
include $HOME/.config/sway/config.d/*
|
||||
|
||||
gaps inner 6
|
||||
smart_gaps on
|
||||
|
||||
default_border pixel 1
|
||||
default_floating_border pixel 1
|
||||
hide_edge_borders smart
|
||||
focus_follows_mouse no
|
||||
mouse_warping container
|
||||
|
||||
workspace_auto_back_and_forth no
|
||||
workspace_layout default
|
||||
|
||||
# only enable this if every app you use is compatible with wayland
|
||||
# xwayland disable
|
||||
|
||||
# Default config for sway
|
||||
#
|
||||
# Copy this to ~/.config/sway/config and edit it to your liking.
|
||||
#
|
||||
# Read `man 5 sway` for a complete reference.
|
||||
|
||||
### Variables
|
||||
#
|
||||
# Logo key. Use Mod1 for Alt.
|
||||
set $mod Mod4
|
||||
# Home row direction keys, like vim
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
# Your preferred application launcher
|
||||
|
||||
### Output configuration
|
||||
#
|
||||
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||||
# output * bg $HOME/.local/share/wallpapers/20250607_192951_D4E78119.jpg fill
|
||||
# output DP-1 pos 0 0
|
||||
# output eDP-1 pos 3840 2160
|
||||
# output HDMI-A-1 pos 0 2160
|
||||
# focus output DP-1
|
||||
# bindswitch lid:on output eDP-1 disable
|
||||
# bindswitch lid:off output eDP-1 enable
|
||||
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
# output HDMI-A-1 resolution 1920x1080 position 1920,0
|
||||
#
|
||||
# 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.
|
||||
|
||||
exec swayidle -w \
|
||||
timeout 300 $locking \
|
||||
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
|
||||
before-sleep $locking
|
||||
|
||||
|
||||
for_window [class="(?i)firefox"] move container to workspace $ws1
|
||||
for_window [title="(?i)Picture-in-Picture"] floating enable border none
|
||||
for_window [class="(?i)telegram"] move container to workspace $ws2
|
||||
for_window [class="mpv"] floating enable border none
|
||||
for_window [class="(?i)zooout"] floating enable
|
||||
for_window [class="(?i)netsurf"] floating enable
|
||||
for_window [class="(?i)proton-bridge"] move container to workspace $ws9 floating enable border none
|
||||
for_window [class="(?i)easyeffects"] move container to workspace $ws10
|
||||
# for_window [class="(?i)xterm-256color"] border none
|
||||
|
||||
# for_window [class="(?i)cadence"] move container to workspace $ws7 floating enable
|
||||
# for_window [class="(?i)catia"] move container to workspace $ws7 floating enable
|
||||
# for_window [class="(?i)reaper"] move container to workspace $ws7
|
||||
# for_window [class="(?i)renoise"] move container to workspace $ws7
|
||||
for_window [class="(?i)uvi"] floating enable
|
||||
for_window [class="(?i)arturia"] floating enable
|
||||
for_window [class="(?i)ilok"] floating enable
|
||||
|
||||
for_window [class="Space"] floating enable
|
||||
|
||||
|
||||
#######################
|
||||
#### sway appearance ####
|
||||
#######################
|
||||
font pango:DejaVu Sans Condensed Bold 8
|
||||
|
||||
#
|
||||
# Utilities:
|
||||
#
|
||||
# Special keys to adjust volume via PulseAudio
|
||||
bindsym --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle
|
||||
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5%
|
||||
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5%
|
||||
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
|
||||
# Special keys to adjust brightness via brightnessctl
|
||||
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
|
||||
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
|
||||
# Special key to take a screenshot with grim
|
||||
# bindsym Print exec grim
|
||||
|
||||
#
|
||||
# Status Bar:
|
||||
#
|
||||
# Read `man 5 sway-bar` for more information about this section.
|
||||
bar {
|
||||
# Execute Waybar; Waybar restarts when Sway reloads.
|
||||
status_command $HOME/.local/share/sway/scripts/waybar.sh
|
||||
|
||||
# Hide Sway's builtin status bar.
|
||||
mode invisible
|
||||
}
|
||||
|
||||
bindsym $mod+z exec $locking
|
||||
# bindsym $mod+x exec "taskwarrior_stop"
|
||||
# bindsym $mod+Shift+z exec "suspend-and-lock"
|
||||
|
||||
bindsym XF86MonBrightnessUp exec --no-startup-id /usr/bin/light -A 5
|
||||
bindsym XF86MonBrightnessDown exec --no-startup-id /usr/bin/light -U 5
|
||||
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +3%
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -3%
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
|
||||
# bindsym $mod+Shift+o exec "display_switch"
|
||||
|
||||
bindsym $mod+minus exec "makoctl dismiss"
|
||||
bindsym $mod+equal exec "makoctl restore"
|
||||
|
||||
bindsym $mod+F4 exec "$term edit_project"
|
||||
bindsym $mod+v exec "passmenu"
|
||||
bindsym $mod+Shift+v exec "passotpmenu"
|
||||
|
||||
exec --no-startup-id xautorun
|
||||
35
config/sway/config.d/98-application-defaults.conf
Normal file
35
config/sway/config.d/98-application-defaults.conf
Normal file
@@ -0,0 +1,35 @@
|
||||
# don't show gaps if there's only one window on the desktop
|
||||
smart_gaps on
|
||||
|
||||
# set floating mode for generated windows
|
||||
for_window [title="(?:Open|Save) (?:File|Folder|As)"] floating enable
|
||||
for_window [title="(?:Open|Save) (?:File|Folder|As)"] resize set 800 600
|
||||
for_window [window_role="pop-up"] floating enable
|
||||
for_window [window_role="bubble"] floating enable
|
||||
for_window [window_role="task_dialog"] floating enable
|
||||
for_window [window_role="Preferences"] floating enable
|
||||
for_window [window_type="dialog"] floating enable
|
||||
for_window [window_type="menu"] floating enable
|
||||
|
||||
# set floating mode for specific applications
|
||||
for_window [instance="lxappearance"] floating enable
|
||||
for_window [app_id="pamac-manager"] floating enable
|
||||
for_window [app_id="blueberry.py"] floating enable
|
||||
for_window [app_id="dragon-drop"] floating enable, sticky enable
|
||||
for_window [app_id="firefox" title="^Library$"] floating enable, border pixel 1, sticky enable
|
||||
for_window [app_id="thunderbird" title=".*Reminder"] floating enable
|
||||
for_window [app_id="floating_shell"] floating enable, border pixel 1, sticky enable
|
||||
for_window [app_id="Manjaro.manjaro-settings-manager"] floating enable
|
||||
for_window [app_id="" title="Picture in picture"] floating enable, sticky enable
|
||||
for_window [app_id="" title="Picture-in-Picture"] floating enable, sticky enable
|
||||
for_window [instance="around"] floating enable, sticky enable
|
||||
for_window [app_id="xsensors"] floating enable
|
||||
for_window [title="Save File"] floating enable
|
||||
for_window [title="Firefox .*— Sharing Indicator"] floating enable, sticky enable, move to scratchpad
|
||||
for_window [app_id="" title=".* is sharing your screen."] floating enable
|
||||
for_window [title="^wlay$"] floating enable
|
||||
|
||||
# Don't allow applications to inhibit shortcuts, i.e. grab total control of the
|
||||
# keyboard. Chrome currently abuses this by enabling it for all "--app=..."
|
||||
# shortcuts.
|
||||
seat * shortcuts_inhibitor disable
|
||||
41
config/sway/config.d/99-autostart-applications.conf
Normal file
41
config/sway/config.d/99-autostart-applications.conf
Normal file
@@ -0,0 +1,41 @@
|
||||
# autostart background applications
|
||||
# FIXME: exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
|
||||
# autostarts
|
||||
exec {
|
||||
# $initialize_way_displays
|
||||
$initialize_foot_server
|
||||
# $initialize_mounting_daemon
|
||||
# $initialize_poweralert_daemon
|
||||
# $initialize_idlehack_daemon
|
||||
$initialize_workspace_icons
|
||||
# $initialize_swayr_daemon
|
||||
# $initialize_idle_daemon
|
||||
# $initialize_flashfocus
|
||||
|
||||
$xdg-dirs
|
||||
# $swappy_notify
|
||||
# $autostart_dex
|
||||
# $wlsunset
|
||||
# $autotiling
|
||||
# $cliphist_store
|
||||
# $cliphist_watch
|
||||
}
|
||||
|
||||
# commands that "reload" something
|
||||
exec_always {
|
||||
$initialize_waybar
|
||||
|
||||
$apply_background
|
||||
$help_menu
|
||||
$kanshi
|
||||
# $clip-persist
|
||||
$mako
|
||||
# $auto_xdg_keyboard
|
||||
$watch_playerctl
|
||||
# $calendar_daemon
|
||||
# $enable_noisetorch
|
||||
$onscreen_bar --refresh
|
||||
$disable_nm_applet_autostart
|
||||
$nm_applet
|
||||
}
|
||||
107
config/sway/definitions
Normal file
107
config/sway/definitions
Normal file
@@ -0,0 +1,107 @@
|
||||
# shellcheck disable=SC2148,SC2086,SC2154,SC2046,SC2016
|
||||
### Variables
|
||||
#
|
||||
# Logo key. Use Mod1 for Alt and Mod4 for Super.
|
||||
set $mod Mod4
|
||||
set $alt_mod Alt
|
||||
|
||||
# Alternative direction keys
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
|
||||
# Default generated background
|
||||
set $background $HOME/.local/share/wallpapers/20250607_192951_D4E78119.jpg
|
||||
|
||||
# Add --to-code to bindsym, support for non-latin layouts
|
||||
set $bindsym bindsym --to-code
|
||||
|
||||
# For user's convenience, the same for unbindsym
|
||||
set $unbindsym unbindsym --to-code
|
||||
|
||||
# Script paths
|
||||
set $script_path $HOME/.local/share/sway/scripts
|
||||
|
||||
# Terminal emulator
|
||||
set $term footclient
|
||||
set $term_cwd $term -D "$(swaycwd 2>/dev/null || echo $HOME)"
|
||||
set $term_float footclient --app-id floating_shell --window-size-chars 82x25
|
||||
|
||||
# Task manager
|
||||
set $task_manager $script_path/once.sh $term_float btop
|
||||
|
||||
# Onscreen bar
|
||||
set $onscreen_bar $script_path/wob.sh "$accent-color" "$background-color"
|
||||
|
||||
# Brightness control
|
||||
set $brightness $script_path/brightness.sh
|
||||
set $brightness_up $brightness up | $onscreen_bar
|
||||
set $brightness_down $brightness down | $onscreen_bar
|
||||
|
||||
# Scaling
|
||||
set $scale_up $script_path/scale.sh up
|
||||
set $scale_down $script_path/scale.sh down
|
||||
set $scale_default $script_path/scale.sh default
|
||||
|
||||
# Audio control
|
||||
set $sink_volume pactl get-sink-volume @DEFAULT_SINK@ | grep '^Volume:' | cut -d / -f 2 | tr -d ' ' | sed 's/%//'
|
||||
set $source_volume pactl get-source-volume @DEFAULT_SOURCE@ | grep '^Volume:' | cut -d / -f 2 | tr -d ' ' | sed 's/%//'
|
||||
set $volume_down $onscreen_bar $(pactl set-sink-volume @DEFAULT_SINK@ -5% && $sink_volume)
|
||||
set $volume_up $onscreen_bar $(pactl set-sink-volume @DEFAULT_SINK@ +5% && $sink_volume)
|
||||
set $volume_mute $onscreen_bar $(pactl set-sink-mute @DEFAULT_SINK@ toggle && pactl get-sink-mute @DEFAULT_SINK@ | sed -En "/no/ s/.*/$($sink_volume)/p; /yes/ s/.*/0/p")
|
||||
set $mic_mute $onscreen_bar $(pactl set-source-mute @DEFAULT_SOURCE@ toggle && pactl get-source-mute @DEFAULT_SOURCE@ | sed -En "/no/ s/.*/$($source_volume)/p; /yes/ s/.*/0/p")
|
||||
|
||||
# Clipboard history
|
||||
set $clipboard cliphist list | rofi -dmenu -p "Select item to copy" -lines 10 | cliphist decode | wl-copy
|
||||
set $clipboard-del cliphist list | rofi -dmenu -p "Select item to delete" -lines 10 | cliphist delete
|
||||
|
||||
# Application launcher
|
||||
set $menu rofi -show combi -combi-modi "drun,run" -terminal "$term" -ssh-command "{terminal} {ssh-client} {host} [-p {port}]" -run-shell-command "{terminal} {cmd}" -show-icons -lines 10
|
||||
|
||||
# Lockscreen configuration
|
||||
set $locking $script_path/lock.sh
|
||||
|
||||
# Bluetooth menu
|
||||
set $bluetooth $script_path/once.sh $term_float bluetuith
|
||||
|
||||
# Hide cursor after 5 seconds of inactivty
|
||||
seat seat0 hide_cursor 5000
|
||||
|
||||
# Pulseaudio command
|
||||
set $pulseaudio $script_path/once.sh $term_float pulsemixer
|
||||
|
||||
# Help command
|
||||
set $help $script_path/help.sh --toggle
|
||||
|
||||
# Calendar application
|
||||
set $calendar $script_path/once.sh $term_float ikhal
|
||||
|
||||
# Workspace names
|
||||
set $ws1 number 1
|
||||
set $ws2 number 2
|
||||
set $ws3 number 3
|
||||
set $ws4 number 4
|
||||
set $ws5 number 5
|
||||
set $ws6 number 6
|
||||
set $ws7 number 7
|
||||
set $ws8 number 8
|
||||
set $ws9 number 9
|
||||
set $ws10 number 10
|
||||
|
||||
# Screenshot commands
|
||||
set $grimshot grimshot
|
||||
set $pipe_output $grimshot save output -
|
||||
set $pipe_selection $grimshot save area -
|
||||
set $notify_paste [[ $(wl-paste -l) == "image/png" ]] && notify-send "Screenshot copied to clipboard"
|
||||
set $swappy swappy -f -
|
||||
set $upload_pipe curl -s -F "file=@-;filename=.png" https://x0.at/ | tee >(wl-copy) >(xargs notify-send)
|
||||
|
||||
set $screenshot_screen $pipe_output | $swappy && $notify_paste
|
||||
set $screenshot_screen_upload $pipe_output | $upload_pipe
|
||||
|
||||
set $screenshot_selection $pipe_selection | $swappy && $notify_paste
|
||||
set $screenshot_selection_upload $pipe_selection | $upload_pipe
|
||||
|
||||
# Emoji picker
|
||||
set $emoji_picker emoji-picker
|
||||
33
config/sway/idle.yaml
Normal file
33
config/sway/idle.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
debug: true
|
||||
wait: false
|
||||
timeouts:
|
||||
# idle_timeout
|
||||
- timeout: 240
|
||||
command: brightnessctl -s && brightnessctl set 10
|
||||
resume: brightnessctl -r
|
||||
# locking_timeout
|
||||
- timeout: 300
|
||||
command: swaymsg exec \$locking
|
||||
# keyboard_timeout
|
||||
- timeout: 600
|
||||
command: /usr/share/sway/scripts/keyboard-backlight-switch.sh off
|
||||
resume: /usr/share/sway/scripts/keyboard-backlight-switch.sh on
|
||||
# screen_timeout
|
||||
- timeout: 600
|
||||
command: swaymsg "output * power off"
|
||||
resume: swaymsg "output * power on"
|
||||
# dpms_timeout
|
||||
- timeout: 600
|
||||
command: swaymsg "output * dpms off"
|
||||
resume: swaymsg "output * dpms on"
|
||||
# sleep_timeout_bat
|
||||
- timeout: 900
|
||||
command: acpi --ac-adapter | grep -v 'on-line' && systemctl sleep
|
||||
# sleep_timeout_ac
|
||||
- timeout: 3600
|
||||
command: acpi --ac-adapter | grep 'on-line' && systemctl sleep
|
||||
before-sleep: swaymsg exec \$locking
|
||||
after-resume: swaymsg "output * dpms on" && brightnessctl -r
|
||||
lock: swaymsg exec \$locking
|
||||
idlehint: '240'
|
||||
13
config/sway/inputs/default-keyboard
Normal file
13
config/sway/inputs/default-keyboard
Normal file
@@ -0,0 +1,13 @@
|
||||
### Input configuration
|
||||
#
|
||||
# Example configuration:
|
||||
|
||||
# input type:keyboard {
|
||||
# xkb_layout "eu"
|
||||
# }
|
||||
|
||||
input type:keyboard {
|
||||
xkb_layout "us,ru"
|
||||
xkb_variant "colemak,winkeys"
|
||||
xkb_options "grp:shifts_toggle,grp_led:caps"
|
||||
}
|
||||
12
config/sway/inputs/default-touchpad
Normal file
12
config/sway/inputs/default-touchpad
Normal file
@@ -0,0 +1,12 @@
|
||||
### 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 type:touchpad {
|
||||
dwt enabled
|
||||
tap enabled
|
||||
natural_scroll false
|
||||
middle_emulation enabled
|
||||
pointer_accel 0.5
|
||||
}
|
||||
162
config/sway/modes/default
Normal file
162
config/sway/modes/default
Normal file
@@ -0,0 +1,162 @@
|
||||
### Key bindings
|
||||
#
|
||||
# Basics:
|
||||
#
|
||||
## Launch // Terminal ##
|
||||
$bindsym $mod+Return exec $term
|
||||
|
||||
## Action // Kill focused window ##
|
||||
$bindsym $mod+Shift+c kill
|
||||
|
||||
## Launch // Open launcher ##
|
||||
$bindsym $alt_mod+space exec $menu
|
||||
$bindsym $mod+F2 exec $menu
|
||||
|
||||
## Launch // Open clipboard ##
|
||||
$bindsym $mod+Shift+p exec $clipboard
|
||||
|
||||
# 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
|
||||
|
||||
## Action // Reload Sway Configuration ##
|
||||
$bindsym $mod+Shift+r reload
|
||||
$bindsym $mod+F12 restart
|
||||
|
||||
## Action // Toggle Waybar ##
|
||||
$bindsym $mod+Shift+b exec pkill -U $USER -x -SIGUSR1 waybar
|
||||
|
||||
# --locked flags allow the buttons to be used whilst the screen is locked.
|
||||
$bindsym --locked XF86AudioRaiseVolume exec $volume_up
|
||||
|
||||
$bindsym --locked XF86AudioLowerVolume exec $volume_down
|
||||
|
||||
$bindsym --locked XF86AudioMute exec $volume_mute
|
||||
|
||||
$bindsym XF86AudioMicMute exec $mic_mute
|
||||
|
||||
$bindsym --locked XF86MonBrightnessUp exec $brightness_up
|
||||
|
||||
$bindsym --locked XF86MonBrightnessDown exec $brightness_down
|
||||
|
||||
$bindsym --locked XF86AudioPlay exec playerctl play-pause
|
||||
|
||||
$bindsym XF86AudioNext exec playerctl next
|
||||
|
||||
$bindsym XF86AudioPrev exec playerctl previous
|
||||
|
||||
$bindsym XF86PowerOff exec $shutdown
|
||||
|
||||
$bindsym XF86TouchpadToggle input type:touchpad events toggle enabled disabled
|
||||
|
||||
# Moving around:
|
||||
#
|
||||
# Move your focus around
|
||||
## Navigation // Move focus // $mod + ↑ ↓ ← → ##
|
||||
$bindsym $mod+$left focus left
|
||||
$bindsym $mod+$down focus down
|
||||
$bindsym $mod+$up focus up
|
||||
$bindsym $mod+$right focus right
|
||||
|
||||
## Navigation // Move focused window // $mod + Shift + ↑ ↓ ← → ##
|
||||
$bindsym $mod+Shift+$left move left
|
||||
$bindsym $mod+Shift+$down move down
|
||||
$bindsym $mod+Shift+$up move up
|
||||
$bindsym $mod+Shift+$right move right
|
||||
|
||||
## Navigation // Move focused workspace // $mod + Alt + ↑ ↓ ← → ##
|
||||
$bindsym $mod+$alt_mod+$right move workspace to output right
|
||||
$bindsym $mod+$alt_mod+$left move workspace to output left
|
||||
$bindsym $mod+$alt_mod+$down move workspace to output down
|
||||
$bindsym $mod+$alt_mod+$up move workspace to output up
|
||||
|
||||
## Navigation // List all open windows in last-recently-used order ##
|
||||
$bindsym $mod+p exec env RUST_BACKTRACE=1 swayr switch-window &>> /tmp/swayr.log
|
||||
|
||||
## Navigation // Switch to the last recently used window ##
|
||||
$bindsym $alt_mod+Tab exec env RUST_BACKTRACE=1 swayr switch-to-urgent-or-lru-window &>> /tmp/swayr.log
|
||||
|
||||
## Navigation // Switch to the last recently used workspace ##
|
||||
$bindsym $mod+Tab workspace back_and_forth
|
||||
|
||||
#
|
||||
# Workspaces:
|
||||
#
|
||||
## Navigation // Switch workspace // $mod + [number] ##
|
||||
$bindsym $mod+1 workspace $ws1
|
||||
$bindsym $mod+2 workspace $ws2
|
||||
$bindsym $mod+3 workspace $ws3
|
||||
$bindsym $mod+4 workspace $ws4
|
||||
$bindsym $mod+5 workspace $ws5
|
||||
$bindsym $mod+6 workspace $ws6
|
||||
$bindsym $mod+7 workspace $ws7
|
||||
$bindsym $mod+8 workspace $ws8
|
||||
$bindsym $mod+9 workspace $ws9
|
||||
$bindsym $mod+0 workspace $ws10
|
||||
|
||||
set $focus_ws [ "$focus_after_move" == 'true' ] && swaymsg workspace
|
||||
|
||||
## Action // Move focused window to workspace // $mod + Shift + [number] ##
|
||||
$bindsym $mod+Shift+1 move container to workspace $ws1, exec $focus_ws $ws1
|
||||
$bindsym $mod+Shift+2 move container to workspace $ws2, exec $focus_ws $ws2
|
||||
$bindsym $mod+Shift+3 move container to workspace $ws3, exec $focus_ws $ws3
|
||||
$bindsym $mod+Shift+4 move container to workspace $ws4, exec $focus_ws $ws4
|
||||
$bindsym $mod+Shift+5 move container to workspace $ws5, exec $focus_ws $ws5
|
||||
$bindsym $mod+Shift+6 move container to workspace $ws6, exec $focus_ws $ws6
|
||||
$bindsym $mod+Shift+7 move container to workspace $ws7, exec $focus_ws $ws7
|
||||
$bindsym $mod+Shift+8 move container to workspace $ws8, exec $focus_ws $ws8
|
||||
$bindsym $mod+Shift+9 move container to workspace $ws9, exec $focus_ws $ws9
|
||||
$bindsym $mod+Shift+0 move container to workspace $ws10, exec $focus_ws $ws10
|
||||
|
||||
#
|
||||
# Layout stuff:
|
||||
#
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
$bindsym $mod+Shift+q layout stacking
|
||||
$bindsym $mod+Shift+t layout tabbed
|
||||
$bindsym $mod+Shift+w layout toggle split
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
$bindsym $mod+f fullscreen toggle
|
||||
## Action // Toggle global fullscreen ##
|
||||
$bindsym $mod+Shift+f fullscreen global
|
||||
|
||||
## Action // Scale up ##
|
||||
$bindsym $alt_mod+plus exec $scale_up
|
||||
|
||||
## Action // Scale down ##
|
||||
$bindsym $alt_mod+minus exec $scale_down
|
||||
|
||||
## Action // Scale default ##
|
||||
$bindsym $alt_mod+equal exec $scale_default
|
||||
|
||||
## Action // Toggle floating ##
|
||||
$bindsym $mod+Shift+space floating toggle
|
||||
$bindsym $mod+Shift+equal sticky toggle
|
||||
|
||||
## Navigation // Toggle focus between tiling and floating ##
|
||||
# $bindsym $mod+space focus mode_toggle
|
||||
|
||||
## Navigation // Swap focus to the parent window ##
|
||||
$bindsym $mod+a focus parent
|
||||
|
||||
## Launch // Toggle Help ##
|
||||
$bindsym $mod+question exec $help
|
||||
|
||||
## Launch // Inhibit Idle ##
|
||||
$bindsym $mod+Shift+i exec inhibit-idle interactive
|
||||
|
||||
default_border pixel 1
|
||||
hide_edge_borders smart
|
||||
|
||||
# allow to kill focused floating shell windows using Esc
|
||||
$bindsym --release Escape [app_id="floating_shell" con_id=__focused__] kill
|
||||
|
||||
## Launch // Task Manager ##
|
||||
$bindsym Ctrl+$alt_mod+Delete exec $task_manager
|
||||
|
||||
## Launch // Emoji Picker ##
|
||||
$bindsym $alt_mod+Shift+e exec $emoji_picker
|
||||
19
config/sway/modes/recording
Normal file
19
config/sway/modes/recording
Normal file
@@ -0,0 +1,19 @@
|
||||
# set $mode_recording "<span foreground='$color10'></span> \
|
||||
# <span foreground='$color5'><b>Record</b></span> <span foreground='$color10'>(<b>r</b>)</span> \
|
||||
# <span foreground='$color5'>+ [<span foreground='$color10'><b>Shift</b></span> for ]</span>"
|
||||
#
|
||||
# set $recorder /usr/share/sway/scripts/recorder.sh
|
||||
#
|
||||
# mode --pango_markup $mode_recording {
|
||||
# $bindsym r exec $recorder, mode "default"
|
||||
# $bindsym Shift+r exec $recorder -a, mode "default"
|
||||
#
|
||||
# # Return to default mode.
|
||||
# $bindsym Escape mode "default"
|
||||
# }
|
||||
#
|
||||
## Launch // Recording Mode ##
|
||||
# $bindsym $mod+Shift+r mode $mode_recording
|
||||
#
|
||||
## Launch // Stop Recording Mode ##
|
||||
# $bindsym $mod+Escape exec killall -s SIGINT wf-recorder
|
||||
25
config/sway/modes/resize
Normal file
25
config/sway/modes/resize
Normal file
@@ -0,0 +1,25 @@
|
||||
set $mode_resize "<span foreground='$color10'></span> \
|
||||
<span foreground='$color5'><b>Resize</b></span> <span foreground='$color10'>(<b>↑ ↓ ← →</b>)</span> \
|
||||
<span foreground='$color5'><b>Increase Gaps</b></span> <span foreground='$color10'>(<b>+</b>)</span> \
|
||||
<span foreground='$color5'><b>Decrease Gaps</b></span> <span foreground='$color10'>(<b>-</b>)</span>"
|
||||
|
||||
mode --pango_markup $mode_resize {
|
||||
# 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 $left resize shrink width 10px
|
||||
$bindsym $down resize grow height 10px
|
||||
$bindsym $up resize shrink height 10px
|
||||
$bindsym $right resize grow width 10px
|
||||
|
||||
## Resize // Window Gaps // + - ##
|
||||
$bindsym minus gaps inner current minus 5px
|
||||
$bindsym plus gaps inner current plus 5px
|
||||
|
||||
# Return to default mode
|
||||
$bindsym Return mode "default"
|
||||
$bindsym Escape mode "default"
|
||||
}
|
||||
## Launch // Resize Mode ##
|
||||
$bindsym $mod+r mode $mode_resize
|
||||
12
config/sway/modes/scratchpad
Normal file
12
config/sway/modes/scratchpad
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# Scratchpad:
|
||||
#
|
||||
# Sway has a "scratchpad", which is a bag of holding for windows.
|
||||
# You can send windows there and get them back later.
|
||||
|
||||
## Action // Move window to scratchpad ##
|
||||
$bindsym $mod+Shift+minus move scratchpad, exec "waybar-signal scratchpad"
|
||||
|
||||
# If there are multiple scratchpad windows, this command cycles through them.
|
||||
## Action // Toggle scratchpad ##
|
||||
$bindsym $mod+space scratchpad show, exec "waybar-signal scratchpad"
|
||||
20
config/sway/modes/screenshot
Normal file
20
config/sway/modes/screenshot
Normal file
@@ -0,0 +1,20 @@
|
||||
set $mode_screenshot "<span foreground='$color10'></span> \
|
||||
<span foreground='$color5'><b>Pick</b></span> <span foreground='$color10'>(<b>p</b>)</span> \
|
||||
<span foreground='$color5'><b>Output</b></span> <span foreground='$color10'>(<b>o</b>)</span> \
|
||||
<span foreground='$color7'>+ <span foreground='$color10'><b>Shift</b></span> for </span>"
|
||||
|
||||
mode --pango_markup $mode_screenshot {
|
||||
# output = currently active output
|
||||
$bindsym o mode "default", exec $screenshot_screen
|
||||
$bindsym Shift+o mode "default", exec $screenshot_screen_upload
|
||||
|
||||
# pick the region to screenshot
|
||||
$bindsym p mode "default", exec $screenshot_selection
|
||||
$bindsym Shift+p mode "default", exec $screenshot_selection_upload
|
||||
|
||||
# Return to default mode.
|
||||
$bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
## Launch // Screenshot Mode ##
|
||||
$bindsym Print mode $mode_screenshot
|
||||
30
config/sway/modes/shutdown
Normal file
30
config/sway/modes/shutdown
Normal file
@@ -0,0 +1,30 @@
|
||||
set $mode_shutdown "\
|
||||
<span foreground='$color10'></span> \
|
||||
<span foreground='$color5'> \
|
||||
<span foreground='$color10'>(<b>l</b>)</span>lock \
|
||||
<span foreground='$color10'>(<b>e</b>)</span>logout \
|
||||
<span foreground='$color10'>(<b>r</b>)</span>reboot \
|
||||
<span foreground='$color10'>(<b>s</b>)</span>shutdown \
|
||||
</span>"
|
||||
|
||||
set $purge_cliphist [ $purge_cliphist_logout == 'true' ] && rm -f $HOME/.cache/cliphist/db || exit 0
|
||||
|
||||
mode --pango_markup $mode_shutdown {
|
||||
# lock
|
||||
$bindsym l mode "default", exec $locking
|
||||
|
||||
# logout
|
||||
$bindsym e exec $purge_cliphist; exec swaymsg exit
|
||||
|
||||
# shutdown
|
||||
$bindsym s exec $purge_cliphist; exec sudo /sbin/poweroff
|
||||
|
||||
# reboot
|
||||
$bindsym r exec $purge_cliphist; exec sudo /sbin/reboot
|
||||
|
||||
# Return to default mode.
|
||||
$bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
## Launch // Exit Menu ##
|
||||
$bindsym $mod+Shift+e mode $mode_shutdown
|
||||
15
config/sway/modes/split
Normal file
15
config/sway/modes/split
Normal file
@@ -0,0 +1,15 @@
|
||||
set $mode_split "<span foreground='$color10'></span> \
|
||||
<span foreground='$color5'><b>Horizontal</b></span> <span foreground='$color10'>(<b>h</b>)</span> \
|
||||
<span foreground='$color5'><b>Vertical</b></span> <span foreground='$color10'>(<b>v</b>)</span>"
|
||||
|
||||
mode --pango_markup $mode_split {
|
||||
$bindsym h splith, mode "default"
|
||||
$bindsym $mod+h splith, mode "default"
|
||||
$bindsym v splitv, mode "default"
|
||||
$bindsym $mod+v splitv, mode "default"
|
||||
|
||||
$bindsym Escape mode "default"
|
||||
$bindsym Return mode "default"
|
||||
}
|
||||
## Launch // Resize Mode ##
|
||||
$bindsym $mod+s mode $mode_split
|
||||
31
config/sway/themes/my-gruvbox/theme.conf
Normal file
31
config/sway/themes/my-gruvbox/theme.conf
Normal file
@@ -0,0 +1,31 @@
|
||||
# dracula
|
||||
|
||||
# some global theme specific variables
|
||||
# set $gtk-theme Dracula
|
||||
# set $icon-theme Dracula-icons
|
||||
# set $cursor-theme Dracula-cursors
|
||||
set $gui-font Iosevka Custom 12
|
||||
set $term-font Iosevka Custom 12
|
||||
set $gtk-color-scheme prefer-dark
|
||||
# set $kvantum-theme Dracula-purple-solid
|
||||
|
||||
###############################
|
||||
#### Gruvbox Material Dark ####
|
||||
###############################
|
||||
set $bg #282828
|
||||
set $fg #d4be98
|
||||
set $red #ea6962
|
||||
set $orange #e78a4e
|
||||
set $green #a9b665
|
||||
set $blue #7daea3
|
||||
set $purple #d3869b
|
||||
set $aqua #89b482
|
||||
set $darkgray #282828
|
||||
|
||||
# Gruvbox Theme brdr bg text indictr chld_brdr
|
||||
client.focused $orange $orange $bg $green $orange
|
||||
client.focused_inactive $blue $blue $bg $blue $blue
|
||||
client.unfocused $bg $bg $bg $bg $bg
|
||||
client.urgent $red $red $bg $red $red
|
||||
client.placeholder $bg $bg $bg $bg $bg
|
||||
client.background $bg
|
||||
Reference in New Issue
Block a user