diff --git a/debian/changelog b/debian/changelog index 3abc161..ae0d015 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +tileos-settings-miracle (2.0.0~tileos) unstable; urgency=medium + + * Initial release for Sauropod + + -- Aleksey Samoilov Thu, 05 Jun 2025 15:19:00 +0400 + tileos-settings-miracle (1.1.1~tileos) unstable; urgency=medium * Initial release diff --git a/debian/tileos-settings-miracle.install b/debian/tileos-settings-miracle.install index 2a19875..d474166 100644 --- a/debian/tileos-settings-miracle.install +++ b/debian/tileos-settings-miracle.install @@ -1 +1,2 @@ /etc +/usr diff --git a/etc/skel/.config/alacritty/theme/catppuccin-macchiato.yml b/etc/skel/.config/alacritty/theme/catppuccin-macchiato.yml index 183b3c8..a0c8327 100644 --- a/etc/skel/.config/alacritty/theme/catppuccin-macchiato.yml +++ b/etc/skel/.config/alacritty/theme/catppuccin-macchiato.yml @@ -1,79 +1,97 @@ +color_set: + text: &TEXT "#cad3f5" + subtext0: &SUBTEXT0 "#e3e3f3" + subtext1: &SUBTEXT1 "#ced4e0" + surface2: &SURFACE2 "#5b6078" + surface1: &SURFACE1 "#494d64" + index16: &INDEX16 "#ed6c13" + index17: &INDEX17 "#f4dbd6" + base: &BASE "#24273a" + red: &RED "#ed6070" + green: &GREEN "#a6da95" + blue: &BLUE "#8aadf4" + yellow: &YELLOW "#eed49f" + pink: &PINK "#f5bde6" + teal: &TEAL "#8bd5ca" + rosewater: &ROSEWATER "#f4dbd6" + lavender: &LAVENDER "#b7bdf8" + colors: # Default colors primary: - background: "#24273A" # base - foreground: "#CAD3F5" # text + background: *BASE + foreground: *TEXT # Bright and dim foreground colors - dim_foreground: "#CAD3F5" # text - bright_foreground: "#CAD3F5" # text + dim_foreground: *TEXT + bright_foreground: *TEXT # Cursor colors cursor: - text: "#24273A" # base - cursor: "#F4DBD6" # rosewater + text: *BASE + cursor: *ROSEWATER vi_mode_cursor: - text: "#24273A" # base - cursor: "#B7BDF8" # lavender + text: *BASE + cursor: *LAVENDER # Search colors search: matches: - foreground: "#24273A" # base - background: "#A5ADCB" # subtext0 + foreground: *BASE + background: *SUBTEXT0 focused_match: - foreground: "#24273A" # base - background: "#A6DA95" # green + foreground: *BASE + background: *GREEN footer_bar: - foreground: "#24273A" # base - background: "#A5ADCB" # subtext0 + foreground: *BASE + background: *SUBTEXT0 # Keyboard regex hints hints: start: - foreground: "#24273A" # base - background: "#EED49F" # yellow + foreground: *BASE + background: *YELLOW end: - foreground: "#24273A" # base - background: "#A5ADCB" # subtext0 + foreground: *BASE + background: *SUBTEXT0 # Selection colors selection: - text: "#24273A" # base - background: "#F4DBD6" # rosewater + text: *BASE + background: *ROSEWATER # Normal colors normal: - black: "#494D64" # surface1 - red: "#ED8796" # red - green: "#A6DA95" # green - yellow: "#EED49F" # yellow - blue: "#8AADF4" # blue - magenta: "#F5BDE6" # pink - cyan: "#8BD5CA" # teal - white: "#B8C0E0" # subtext1 + black: *SURFACE1 + red: *RED + green: *GREEN + yellow: *YELLOW + blue: *BLUE + magenta: *PINK + cyan: *TEAL + white: *SUBTEXT1 # Bright colors bright: - black: "#5B6078" # surface2 - red: "#ED8796" # red - green: "#A6DA95" # green - yellow: "#EED49F" # yellow - blue: "#8AADF4" # blue - magenta: "#F5BDE6" # pink - cyan: "#8BD5CA" # teal - white: "#A5ADCB" # subtext0 + black: *SURFACE2 + red: *RED + green: *GREEN + yellow: *YELLOW + blue: *BLUE + magenta: *PINK + cyan: *TEAL + white: *SUBTEXT0 # Dim colors dim: - black: "#494D64" # surface1 - red: "#ED8796" # red - green: "#A6DA95" # green - yellow: "#EED49F" # yellow - blue: "#8AADF4" # blue - magenta: "#F5BDE6" # pink - cyan: "#8BD5CA" # teal - white: "#B8C0E0" # subtext1 + black: *SURFACE1 + red: *RED + green: *GREEN + yellow: *YELLOW + blue: *BLUE + magenta: *PINK + cyan: *TEAL + white: *SUBTEXT1 indexed_colors: - - { index: 16, color: "#F5A97F" } - - { index: 17, color: "#F4DBD6" } + - { index: 16, color: *INDEX16 } + - { index: 17, color: *INDEX17 } diff --git a/etc/skel/.config/bluetuith/bluetuith.conf b/etc/skel/.config/bluetuith/bluetuith.conf new file mode 100644 index 0000000..e335eea --- /dev/null +++ b/etc/skel/.config/bluetuith/bluetuith.conf @@ -0,0 +1,15 @@ +{ + adapter: "" + gsm-apn: "" + gsm-number: "" + keybindings: {} + receive-dir: "" + theme: { + AdapterPowered: "powderblue", + AdapterNotPowered: "lightcoral", + AdapterPairable: "thistle", + AdapterScanning: "mistyrose", + DevicePropertyDiscovered: "mistyrose", + DevicePropertyConnected: "powderblue" + } +} diff --git a/etc/skel/.config/btop/themes/catppuccin_machiato.theme b/etc/skel/.config/btop/themes/catppuccin_machiato.theme index 86819d2..59fc259 100644 --- a/etc/skel/.config/btop/themes/catppuccin_machiato.theme +++ b/etc/skel/.config/btop/themes/catppuccin_machiato.theme @@ -58,7 +58,7 @@ theme[cached_mid]="#8aadf4" theme[cached_end]="#b7bdf8" # Mem/Disk available meter (Peach -> Red) -theme[available_start]="#f5a97f" +theme[available_start]="#ed6c13" theme[available_mid]="#ee99a0" theme[available_end]="#ed8796" @@ -68,7 +68,7 @@ theme[used_mid]="#8bd5ca" theme[used_end]="#91d7e3" # Download graph colors (Peach -> Red) -theme[download_start]="#f5a97f" +theme[download_start]="#ed6c13" theme[download_mid]="#ee99a0" theme[download_end]="#ed8796" diff --git a/etc/skel/.config/dunst/dunstrc b/etc/skel/.config/dunst/dunstrc index 452f72b..729b877 100644 --- a/etc/skel/.config/dunst/dunstrc +++ b/etc/skel/.config/dunst/dunstrc @@ -17,7 +17,7 @@ # # If this option is set to mouse or keyboard, the monitor option # will be ignored. - follow = none + follow = mouse ### Geometry ### @@ -329,7 +329,7 @@ [urgency_critical] background = "#24273A" foreground = "#CAD3F5" - frame_color = "#F5A97F" + frame_color = "#ED6C13" timeout = 0 # Icon for notifications with critical urgency, uncomment to enable #default_icon = /path/to/icon diff --git a/etc/skel/.config/miracle-wm.yaml b/etc/skel/.config/miracle-wm.yaml index f09be7a..5e1778a 100644 --- a/etc/skel/.config/miracle-wm.yaml +++ b/etc/skel/.config/miracle-wm.yaml @@ -2,8 +2,6 @@ terminal: alacritty # Start waybar and Azote on startup startup_apps: - - command: waybar - restart_on_death: true - command: bash ~/.azotebg restart_on_death: true @@ -20,3 +18,50 @@ environment_variables: value: gl - key: _JAVA_AWT_WM_NONREPARENTING value: 1 + +border: + size: 2 + color: a5adcb + focus_color: 8aadf4 + +enable_animations: true + +animations: + - event: window_open + type: grow + function: ease_in_out_back + duration: 0.25 + - event: window_move + type: slide + function: ease_in_out_back + duration: 0.25 + - event: window_close + type: shrink + function: ease_out_back + duration: 0.25 + - event: workspace_switch + type: slide + function: ease_out_sine + duration: 0.175 + +workspaces: + - number: 0 + layout: tiled + - number: 1 + layout: tiled + - number: 2 + layout: tiled + - number: 3 + layout: tiled + - number: 4 + layout: tiled + - number: 5 + layout: tiled + - number: 6 + layout: tiled + - number: 7 + layout: tiled + - number: 8 + layout: tiled + - number: 9 + layout: tiled diff --git a/etc/skel/.config/nwg-bar/bar.json b/etc/skel/.config/nwg-bar/bar.json index 4b03dbb..ac46314 100644 --- a/etc/skel/.config/nwg-bar/bar.json +++ b/etc/skel/.config/nwg-bar/bar.json @@ -1,7 +1,7 @@ [ { "label": "Lock", - "exec": "swaymsg exec ~/.config/swaylock/lock.sh", + "exec": "swaymsg exec /usr/share/sway/scripts/lock.sh", "icon": "system-lock-screen" }, { diff --git a/etc/skel/.config/pluma/styles/catppuccin-macchiato.xml b/etc/skel/.config/pluma/styles/catppuccin-macchiato.xml index e2b840e..23098aa 100644 --- a/etc/skel/.config/pluma/styles/catppuccin-macchiato.xml +++ b/etc/skel/.config/pluma/styles/catppuccin-macchiato.xml @@ -13,9 +13,9 @@ Catppuccin Gedit theme based on Oblivion theme and Cappuccin for Visual Studio C - + - + @@ -24,8 +24,8 @@ Catppuccin Gedit theme based on Oblivion theme and Cappuccin for Visual Studio C - - + + diff --git a/etc/skel/.config/qt6ct/qt6ct.conf b/etc/skel/.config/qt6ct/qt6ct.conf index 5102cb6..79eb85e 100644 --- a/etc/skel/.config/qt6ct/qt6ct.conf +++ b/etc/skel/.config/qt6ct/qt6ct.conf @@ -3,7 +3,7 @@ color_scheme_path=$HOME/.config/qt6ct/colors/Catppuccin-Macchiato.conf custom_palette=true icon_theme=ePapirus standard_dialogs=default -style=Fusion +style=kvantum-dark [Fonts] fixed="Noto Sans,11,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular" diff --git a/etc/skel/.config/swayidle/config b/etc/skel/.config/swayidle/config index 36c92e1..8e38260 100644 --- a/etc/skel/.config/swayidle/config +++ b/etc/skel/.config/swayidle/config @@ -1,6 +1,8 @@ -timeout 240 'light -G > /tmp/brightness && light -S 10' resume 'light -S $([ -f /tmp/brightness ] && cat /tmp/brightness || echo 100%)' -timeout 300 ~/.config/swaylock/lock.sh -timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' +timeout 240 'brightnessctl -s && brightnessctl set 10' resume 'brightnessctl -r' +timeout 300 '/usr/share/miracle-wm/scripts/lock.sh' +timeout 600 '/usr/share/miracle-wm/scripts/kbd-backlight.sh off && timeout 600 'wlopm --off \*' resume '/usr/share/miracle-wm/scripts/kbd-backlight.sh on && 'wlopm --on \*' +timeout 900 '[ "$(acpi -b | grep Discharging)" != "" ] && systemctl suspend' +timeout 3600 '[ "$(acpi -b | grep Discharging)" = "" ] && systemctl suspend' before-sleep 'playerctl pause' -before-sleep ~/.config/swaylock/lock.sh -lock ~/.config/swaylock/lock.sh +before-sleep '/usr/share/miracle-wm/scripts/lock.sh && sleep 2' +after-resume '/usr/share/miracle-wm/scripts/kbd-backlight.sh on && 'wlopm --on \*' && brightnessctl -r' diff --git a/etc/skel/.config/swaylock/config b/etc/skel/.config/swaylock/config index 1dfd380..65aca8f 100644 --- a/etc/skel/.config/swaylock/config +++ b/etc/skel/.config/swaylock/config @@ -15,4 +15,4 @@ ring-color=c6a0f6 ring-ver-color=7dc4e4 ring-wrong-color=ee99a0 ring-clear-color=8aadf4 -ring-caps-lock-color=f5a97f +ring-caps-lock-color=ed6c13 diff --git a/etc/skel/.config/waybar/config.jsonc b/etc/skel/.config/waybar/config.jsonc index ea7a2ed..43760dc 100644 --- a/etc/skel/.config/waybar/config.jsonc +++ b/etc/skel/.config/waybar/config.jsonc @@ -7,8 +7,6 @@ "modules-right": [ "tray", "custom/playerctl", - "custom/help", - "custom/wlsunset", "idle_inhibitor", "custom/dunst", "sway/language", @@ -73,28 +71,6 @@ "signal": 5 }, - "custom/help": { - "format": "", - "on-click": "/usr/share/sway/scripts/help.sh --toggle", - "tooltip": "false" - }, - - "custom/wlsunset": { - "interval": "once", - "tooltip": true, - "tooltip-format": "{tooltip}", - "return-type": "json", - "format": "{icon}", - "format-icons": { - "on": "", - "off": "" - }, - "exec": "fallback_latitude=50.1 fallback_longitude=8.7 latitude= longitude= /usr/share/sway/scripts/sunset.sh", - "on-click": "/usr/share/sway/scripts/sunset.sh toggle; pkill -RTMIN+6 waybar", - "exec-if": "/usr/share/sway/scripts/sunset.sh check", - "signal": 6 - }, - "idle_inhibitor": { "format": "{icon}", "format-icons": { @@ -108,7 +84,7 @@ }, "custom/dunst": { - "exec": "/usr/share/sway/scripts/dunst.sh", + "exec": "/usr/share/miracle-wm/scripts/dunst.sh", "on-click": "dunstctl set-paused toggle", "restart-interval": 1, }, @@ -124,8 +100,7 @@ "format": "", "interval": "once", "return-type": "json", - "on-click": "swaymsg -q exec '$clipboard'; pkill -RTMIN+9 waybar", - "on-click-right": "swaymsg -q exec '$clipboard-del'; pkill -RTMIN+9 waybar", + "on-click": "nwg-clipman; 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-if": "[ -x \"$(command -v cliphist)\" ] && [ $(cliphist list | wc -l) -gt 0 ]", @@ -139,7 +114,7 @@ "warning": 70, "critical": 90 }, - "on-click": "swaymsg exec \\$flock \\$term_float btop" + "on-click": "alacritty --class floating_shell -e btop" }, "memory": { @@ -149,8 +124,8 @@ "warning": 70, "critical": 90 }, - "on-click": "swaymsg exec \\$flock \\$term_float btop" - + "on-click": "alacritty --class floating_shell -e btop" + }, "battery": { @@ -168,13 +143,14 @@ "tooltip-format-wifi": "{icon} {ifname} ({essid}): {ipaddr}", "tooltip-format-disconnected": "{icon} disconnected", "tooltip-format-disabled": "{icon} disabled", - "on-click": "swaymsg exec \\$flock \\$term_float nmtui connect" + "on-click": "alacritty --class floating_shell -e nmtui connect" }, "bluetooth": { "format": "", "format-disabled": "", - "on-click": "swaymsg exec \\$bluetooth", + "format-no-controller": "", + "on-click": "alacritty --class floating_shell -e bluetuith", "on-click-right": "rfkill toggle bluetooth", "tooltip-format": "{}" }, @@ -191,9 +167,9 @@ "default": ["", "", ""] }, "tooltip-format": "{icon}  {volume}% {format_source}", - "on-click": "swaymsg exec \\$flock \\$pulseaudio", - "on-click-middle": "swaymsg exec \\$volume_mute", - "on-click-right": "swaymsg exec pavucontrol" + "on-click": "alacritty --class floating_shell -e pulsemixer", + "on-click-middle": "pulsemixer --toggle-mute && /usr/share/miracle-wm/scripts/volume-notify.sh", + "on-click-right": "pavucontrol" }, "clock": { @@ -201,7 +177,7 @@ "tooltip": true, "tooltip-format": "{:%d.%m.%Y %H:%M}", "interval": 5, - "on-click": "swaymsg exec \\$calendar" + "on-click": "alacritty --class floating_shell -e calcurse" }, "custom/power": { diff --git a/usr/share/miracle-wm/scripts/dunst.sh b/usr/share/miracle-wm/scripts/dunst.sh new file mode 100755 index 0000000..87d2c7d --- /dev/null +++ b/usr/share/miracle-wm/scripts/dunst.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +COUNT=$(dunstctl count waiting) +ENABLED= +DISABLED= + +if [ $COUNT != 0 ]; then + DISABLED=" $COUNT" +fi + +if dunstctl is-paused | grep -q "false" ; then + echo $ENABLED +else + echo $DISABLED +fi diff --git a/usr/share/miracle-wm/scripts/kbd-backlight.sh b/usr/share/miracle-wm/scripts/kbd-backlight.sh new file mode 100755 index 0000000..14cbab7 --- /dev/null +++ b/usr/share/miracle-wm/scripts/kbd-backlight.sh @@ -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 diff --git a/usr/share/miracle-wm/scripts/lock.sh b/usr/share/miracle-wm/scripts/lock.sh new file mode 100755 index 0000000..13da2d8 --- /dev/null +++ b/usr/share/miracle-wm/scripts/lock.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Swaylock run's with additional features, e.g. adding screenshot to background +SWAYLOCK_USER_SCRIPT="$HOME/.config/swaylock/lock.sh" +SWAYLOCK_GLOB_SCRIPT="/usr/share/river/scripts/swaylock.sh" + +if [ -x "$(command -v gtklock)" ]; then + gtklock --daemonize --follow-focus --idle-hide --start-hidden +elif [ -x "$(command -v swaylock)" ]; then + if [[ -x "$SWAYLOCK_USER_SCRIPT" ]]; then + "$SWAYLOCK_USER_SCRIPT" + else + "$SWAYLOCK_GLOB_SCRIPT" + fi +fi diff --git a/usr/share/miracle-wm/scripts/mic-mute.sh b/usr/share/miracle-wm/scripts/mic-mute.sh new file mode 100755 index 0000000..5f4d97d --- /dev/null +++ b/usr/share/miracle-wm/scripts/mic-mute.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -e + +MIC="${1:-'Capture'}" + +amixer sset "$MIC" toggle + +STATE="$(amixer sget "$MIC",0 | sed -E -e '0,/^.*\[(on|off)\].*$/d' -e 's/^.*\[(\w+)\].*$/\1/')" + +test -n "$STATE" && notify-send \ + --app-name river \ + --expire-time 800 \ + "Microphone is $STATE" diff --git a/usr/share/miracle-wm/scripts/screenshot-notify.sh b/usr/share/miracle-wm/scripts/screenshot-notify.sh new file mode 100755 index 0000000..ae1e993 --- /dev/null +++ b/usr/share/miracle-wm/scripts/screenshot-notify.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e +DIR=${XDG_PICTURES_DIR:-$HOME/Pictures} + +while true; do + mkdir -p "$DIR" && inotifywait -q -e create "$DIR" --format '%w%f' | xargs notify-send "Screenshot saved" +done diff --git a/usr/share/miracle-wm/scripts/swaylock.sh b/usr/share/miracle-wm/scripts/swaylock.sh new file mode 100755 index 0000000..a1aad62 --- /dev/null +++ b/usr/share/miracle-wm/scripts/swaylock.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# This script takes a screenshot of current output and adds a blur and vignette to it + +cd /tmp +grim screen.png + +# Delete existing image +rm screen-out.png + +#Adds a blur and vignette +ffmpeg -i screen.png -vf "gblur=sigma=10, vignette=PI/5" -c:a copy screen-out.png + +#Uses output image with Swaylock +swaylock \ +--image screen-out.png \ +--daemonize diff --git a/usr/share/miracle-wm/scripts/volume-notify.sh b/usr/share/miracle-wm/scripts/volume-notify.sh new file mode 100755 index 0000000..07a8ec2 --- /dev/null +++ b/usr/share/miracle-wm/scripts/volume-notify.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +VOLUME=$(pulsemixer --get-volume) +# get first percent value +VOLUME=${VOLUME%%%*} +VOLUME=${VOLUME##* } + +TEXT="Volume: ${VOLUME}%" +case $(pulsemixer --get-mute) in + *1) + TEXT="Volume: muted" + VOLUME=0 + ;; +esac + +notify-send \ + --app-name sway \ + --expire-time 800 \ + --hint string:x-canonical-private-synchronous:volume \ + --hint "int:value:$VOLUME" \ + --hint "int:transient:1" \ + "${TEXT}"