Initial release for Sauropod
* Switch from light to brightnessctl * Switch from Rofi to Wofi (launcher) * Switch from Rofi to Wofi (LRU window switcher) * Switch from Rofi to nwg-clipman (clipboard manager) * Switch to gtklock by default * Added kbd-backlight.sh to control keyboard backlight
This commit is contained in:
parent
f87305b06d
commit
2d4e3f3c74
10 changed files with 86 additions and 32 deletions
12
debian/changelog
vendored
12
debian/changelog
vendored
|
@ -1,3 +1,15 @@
|
||||||
|
tileos-settings-sway (2.0.0~tileos) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Initial release for Sauropod
|
||||||
|
* Switch from light to brightnessctl
|
||||||
|
* Switch from Rofi to Wofi (launcher)
|
||||||
|
* Switch from Rofi to Wofi (LRU window switcher)
|
||||||
|
* Switch from Rofi to nwg-clipman (clipboard manager)
|
||||||
|
* Switch to gtklock by default
|
||||||
|
* Added kbd-backlight.sh to control keyboard backlight
|
||||||
|
|
||||||
|
-- Aleksey Samoilov <samoilov.lex@gmail.com> Tue, 03 Jun 2025 12:37:25 +0400
|
||||||
|
|
||||||
tileos-settings-sway (1.2.0~tileos) unstable; urgency=medium
|
tileos-settings-sway (1.2.0~tileos) unstable; urgency=medium
|
||||||
|
|
||||||
* Change module order
|
* Change module order
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
timeout 240 'light -G > /tmp/brightness && light -S 10' resume 'light -S $([ -f /tmp/brightness ] && cat /tmp/brightness || echo 100%)'
|
timeout 240 'brightnessctl -s && brightnessctl set 10' resume 'brightnessctl -r'
|
||||||
timeout 300 '/usr/share/sway/scripts/lock.sh'
|
timeout 300 '/usr/share/sway/scripts/lock.sh'
|
||||||
timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"'
|
timeout 600 '/usr/share/sway/scripts/kbd-backlight.sh off && swaymsg "output * power off"' resume '/usr/share/sway/scripts/kbd-backlight.sh on && swaymsg "output * power on"'
|
||||||
timeout 900 'systemctl suspend'
|
timeout 900 '[ "$(acpi -b | grep Discharging)" != "" ] && systemctl suspend'
|
||||||
|
timeout 3600 '[ "$(acpi -b | grep Discharging)" = "" ] && systemctl suspend'
|
||||||
before-sleep 'playerctl pause'
|
before-sleep 'playerctl pause'
|
||||||
before-sleep '/usr/share/sway/scripts/lock.sh'
|
before-sleep '/usr/share/sway/scripts/lock.sh && sleep 2'
|
||||||
lock '/usr/share/sway/scripts/lock.sh'
|
after-resume '/usr/share/sway/scripts/kbd-backlight.sh on && swaymsg "output * power on" && brightnessctl -r'
|
||||||
|
|
|
@ -124,8 +124,7 @@
|
||||||
"format": "",
|
"format": "",
|
||||||
"interval": "once",
|
"interval": "once",
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"on-click": "swaymsg -q exec '$clipboard'; pkill -RTMIN+9 waybar",
|
"on-click": "swaymsg -q exec nwg-clipman; pkill -RTMIN+9 waybar",
|
||||||
"on-click-right": "swaymsg -q exec '$clipboard-del'; pkill -RTMIN+9 waybar",
|
|
||||||
"on-click-middle": "rm -f ~/.cache/cliphist/db; pkill -RTMIN+9 waybar",
|
"on-click-middle": "rm -f ~/.cache/cliphist/db; pkill -RTMIN+9 waybar",
|
||||||
"exec": "printf '{\"tooltip\":\"%s\"}' $(cliphist list | wc -l)' item(s) in the clipboard\r(Mid click to clear)'",
|
"exec": "printf '{\"tooltip\":\"%s\"}' $(cliphist list | wc -l)' item(s) in the clipboard\r(Mid click to clear)'",
|
||||||
"exec-if": "[ -x \"$(command -v cliphist)\" ] && [ $(cliphist list | wc -l) -gt 0 ]",
|
"exec-if": "[ -x \"$(command -v cliphist)\" ] && [ $(cliphist list | wc -l) -gt 0 ]",
|
||||||
|
|
|
@ -45,6 +45,11 @@ for_window [title="Confirm to replace files"] move position center
|
||||||
for_window [title="Choose an Application"] floating enable
|
for_window [title="Choose an Application"] floating enable
|
||||||
for_window [title="Removable medium is inserted"] floating enable
|
for_window [title="Removable medium is inserted"] floating enable
|
||||||
|
|
||||||
|
# inhibit scrensaver for fullscreen browser windows
|
||||||
|
for_window [con_mark="Browser"] {
|
||||||
|
inhibit_idle fullscreen
|
||||||
|
}
|
||||||
|
|
||||||
# Don't allow applications to inhibit shortcuts, i.e. grab total control of the
|
# 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=..."
|
# keyboard. Chrome currently abuses this by enabling it for all "--app=..."
|
||||||
# shortcuts.
|
# shortcuts.
|
||||||
|
|
|
@ -14,7 +14,6 @@ exec {
|
||||||
$pcmanfm_daemon
|
$pcmanfm_daemon
|
||||||
}
|
}
|
||||||
exec_always {
|
exec_always {
|
||||||
$kanshi
|
|
||||||
$nwg_drawer_daemon
|
$nwg_drawer_daemon
|
||||||
$watch_playerctl
|
$watch_playerctl
|
||||||
$calendar_daemon
|
$calendar_daemon
|
||||||
|
|
|
@ -21,7 +21,8 @@ set $term_float $term --class floating_shell -e
|
||||||
set $rofi_theme "* {lightbg: $base; background: $base; lightfg: $blue; foreground: $text; border-color: $blue;} window {border: 2;}"
|
set $rofi_theme "* {lightbg: $base; background: $base; lightfg: $blue; foreground: $text; border-color: $blue;} window {border: 2;}"
|
||||||
|
|
||||||
# Your preferred application launcher
|
# Your preferred application launcher
|
||||||
set $menu rofi -show combi -modes combi -combi-modes "drun,run" -terminal "$term" -show-icons -font "$gui-font"
|
# set $menu rofi -show combi -modes combi -combi-modes "drun,run" -terminal "$term" -show-icons -font "$gui-font"
|
||||||
|
set $menu wofi --show drun --allow-images --allow-markup --hide-scroll --no-actions -lines 10 -width 35 --term $term --prompt "Search"
|
||||||
|
|
||||||
# Add --to-code to bindsym, support for non-latin layouts
|
# Add --to-code to bindsym, support for non-latin layouts
|
||||||
set $bindsym bindsym --to-code
|
set $bindsym bindsym --to-code
|
||||||
|
@ -36,9 +37,9 @@ set $volume_bar /usr/share/sway/scripts/volume-notify.sh
|
||||||
set $brightness_bar /usr/share/sway/scripts/brightness-notify.sh
|
set $brightness_bar /usr/share/sway/scripts/brightness-notify.sh
|
||||||
|
|
||||||
# Brightness control
|
# Brightness control
|
||||||
set $brightness_step bash -c 'echo $(( $(light -Mr) / 100 * 5 < 1 ? 1 : $(( $(light -Mr) / 100 * 5 )) ))'
|
set $brightness /usr/share/sway/scripts/brightness.sh
|
||||||
set $brightness_up light -r -A $($brightness_step) && $brightness_bar
|
set $brightness_up $brightness up && $brightness_bar
|
||||||
set $brightness_down light -r -U $($brightness_step) && $brightness_bar
|
set $brightness_down $brightness down && $brightness_bar
|
||||||
|
|
||||||
# Volume control
|
# Volume control
|
||||||
set $volume_down pulsemixer --change-volume -5 && $volume_bar
|
set $volume_down pulsemixer --change-volume -5 && $volume_bar
|
||||||
|
@ -101,9 +102,6 @@ set $autoname_workspaces '[ -f /usr/share/sway/scripts/autoname-workspaces.py ]
|
||||||
# switch between top-level containers (windows) in a workspace
|
# switch between top-level containers (windows) in a workspace
|
||||||
set $switch_toplevel '[ -f /usr/share/sway/scripts/switch-top-level.py ] && /usr/share/sway/scripts/switch-top-level.py'
|
set $switch_toplevel '[ -f /usr/share/sway/scripts/switch-top-level.py ] && /usr/share/sway/scripts/switch-top-level.py'
|
||||||
|
|
||||||
# restart kanshi https://github.com/emersion/kanshi/issues/43#issuecomment-531679213
|
|
||||||
set $kanshi '[ -x "$(command -v kanshi)" ] && pkill kanshi; exec kanshi'
|
|
||||||
|
|
||||||
# Start PCmanFM-Qt as a daemon
|
# Start PCmanFM-Qt as a daemon
|
||||||
set $pcmanfm_daemon '[ -x "$(command -v pcmanfm-qt)" ] && pcmanfm-qt -d'
|
set $pcmanfm_daemon '[ -x "$(command -v pcmanfm-qt)" ] && pcmanfm-qt -d'
|
||||||
|
|
||||||
|
@ -126,8 +124,5 @@ set $calendar_daemon 'calcurse --daemon'
|
||||||
# Notifications from Swappy
|
# Notifications from Swappy
|
||||||
set $swappy_notify '[ -x "$(command -v swappy)" ] && /usr/share/sway/scripts/screenshot-notify.sh'
|
set $swappy_notify '[ -x "$(command -v swappy)" ] && /usr/share/sway/scripts/screenshot-notify.sh'
|
||||||
|
|
||||||
# Start a screensaver
|
|
||||||
set $lock '/usr/share/sway/scripts/lock.sh'
|
|
||||||
|
|
||||||
# Toggle shortcuts inhibition mode for the current focused window
|
# Toggle shortcuts inhibition mode for the current focused window
|
||||||
set $toggle_shorcuts_inhibitor 'swaymsg "seat - shortcuts_inhibitor toggle"'
|
set $toggle_shorcuts_inhibitor 'swaymsg "seat - shortcuts_inhibitor toggle"'
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
[menu]
|
[menu]
|
||||||
executable = 'rofi'
|
executable = 'wofi'
|
||||||
args = [
|
args = [
|
||||||
'-dmenu',
|
'--show=dmenu',
|
||||||
'-markup-rows',
|
'--define=layer=overlay',
|
||||||
'-show-icons',
|
'--allow-markup',
|
||||||
'-no-case-sensitive',
|
'--allow-images',
|
||||||
'-no-drun-use-desktop-cache',
|
'--insensitive',
|
||||||
'-p','{prompt}',
|
'--cache-file=/dev/null',
|
||||||
'-font','Noto Sans 11',
|
'--parse-search',
|
||||||
|
'--height=40%',
|
||||||
|
'--prompt={prompt}',
|
||||||
]
|
]
|
||||||
|
|
||||||
[format]
|
[format]
|
||||||
|
|
25
usr/share/sway/scripts/brightness.sh
Executable file
25
usr/share/sway/scripts/brightness.sh
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/sh
|
||||||
|
current_abs=$(brightnessctl get)
|
||||||
|
current_rel() {
|
||||||
|
echo "$(brightnessctl get) * 100 / $(brightnessctl max)" | bc
|
||||||
|
}
|
||||||
|
max=$(brightnessctl max)
|
||||||
|
factor=3
|
||||||
|
brightness_step=$((max * factor / 100 < 1 ? 1 : max * factor / 100))
|
||||||
|
|
||||||
|
case $1'' in
|
||||||
|
'') ;;
|
||||||
|
'down')
|
||||||
|
# if current value <= 3% and absolute value != 1, set brightness to absolute 1
|
||||||
|
if [ "$(current_rel)" -le "$factor" ] && [ "$current_abs" -ge 0 ]; then
|
||||||
|
brightnessctl --quiet set 1
|
||||||
|
else
|
||||||
|
brightnessctl --quiet set "${brightness_step}-"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
'up')
|
||||||
|
brightnessctl --quiet set "${brightness_step}+"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
current_rel
|
11
usr/share/sway/scripts/kbd-backlight.sh
Executable file
11
usr/share/sway/scripts/kbd-backlight.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
set -x
|
||||||
|
|
||||||
|
case $1'' in
|
||||||
|
'on')
|
||||||
|
brightnessctl -r -d "*kbd_backlight"
|
||||||
|
;;
|
||||||
|
'off')
|
||||||
|
brightnessctl -s -d "*kbd_backlight" && brightnessctl -d "*kbd_backlight" set 0
|
||||||
|
;;
|
||||||
|
esac
|
|
@ -1,10 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
USER_SCRIPT="$HOME/.config/swaylock/lock.sh"
|
# Swaylock run's with additional features, e.g. adding screenshot to background
|
||||||
GLOB_SCRIPT="/usr/share/sway/scripts/swaylock.sh"
|
SWAYLOCK_USER_SCRIPT="$HOME/.config/swaylock/lock.sh"
|
||||||
|
SWAYLOCK_GLOB_SCRIPT="/usr/share/sway/scripts/swaylock.sh"
|
||||||
|
|
||||||
if [[ -x "$USER_SCRIPT" ]]; then
|
if [ -x "$(command -v gtklock)" ]; then
|
||||||
"$USER_SCRIPT"
|
gtklock --daemonize --follow-focus --idle-hide --start-hidden
|
||||||
else
|
elif [ -x "$(command -v swaylock)" ]; then
|
||||||
"$GLOB_SCRIPT"
|
if [[ -x "$SWAYLOCK_USER_SCRIPT" ]]; then
|
||||||
|
"$SWAYLOCK_USER_SCRIPT"
|
||||||
|
else
|
||||||
|
"$SWAYLOCK_GLOB_SCRIPT"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue