Fedora installer, cleanup and screenshots
- install.sh rewritten for Fedora: dry-run, --check, backups, oh-my-zsh, lazygit, swappy - outputs-setup.sh (monitor layout for new hardware) and doctor.sh (health check) - screenshot.sh: region / full / window / scroll / last / edit (swappy), saved and copied - remove waybar, swaync, dunst, rofi and their helper scripts, wallpaper picker, mirror.sh - wallpapers handled by DMS; keep only the favourite one - 00-session.conf for portals; swayfx-only layer rules split into 21-dms-effects.conf Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -131,7 +131,7 @@
|
||||
}
|
||||
],
|
||||
"configVersion": 42,
|
||||
"popupTransparency": 0.86,
|
||||
"popupTransparency": 0.95,
|
||||
"fontFamily": "JetBrains Mono Medium",
|
||||
"audioVisualizerEnabled": true,
|
||||
"scrollTitleEnabled": true,
|
||||
@@ -267,5 +267,7 @@
|
||||
}
|
||||
],
|
||||
"monoFontFamily": "JetBrains Mono",
|
||||
"displayFontFamily": "JetBrains Mono"
|
||||
"displayFontFamily": "JetBrains Mono",
|
||||
"fontWeight": 300,
|
||||
"fontScale": 1
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
[global]
|
||||
monitor = 0
|
||||
follow = mouse
|
||||
width = (250, 360)
|
||||
origin = top-right
|
||||
offset = (12, 48)
|
||||
gap_size = 8
|
||||
corner_radius = 14
|
||||
frame_width = 1
|
||||
padding = 12
|
||||
horizontal_padding = 14
|
||||
font = JetBrains Mono 10
|
||||
format = "<b>%s</b>\n%b"
|
||||
icon_position = left
|
||||
max_icon_size = 48
|
||||
transparency = 0
|
||||
icon_corner_radius = 8
|
||||
progress_bar_corner_radius = 4
|
||||
progress_bar_height = 8
|
||||
|
||||
[urgency_low]
|
||||
background = "#0c0c0c99"
|
||||
foreground = "#e8e8e8"
|
||||
frame_color = "#e8e8e815"
|
||||
timeout = 5
|
||||
|
||||
[urgency_normal]
|
||||
background = "#0c0c0c99"
|
||||
foreground = "#e8e8e8"
|
||||
frame_color = "#e8e8e830"
|
||||
timeout = 8
|
||||
|
||||
[urgency_critical]
|
||||
background = "#0c0c0c99"
|
||||
foreground = "#e8e8e8"
|
||||
frame_color = "#ff5c5c"
|
||||
timeout = 0
|
||||
@@ -1,25 +0,0 @@
|
||||
* {
|
||||
base: #0c0c0c; surface: #1c1c1c; text: #e8e8e8; mauve: #e8e8e8; subtext: #8c8c8c;
|
||||
background-color: transparent;
|
||||
text-color: @text;
|
||||
font: "JetBrains Mono 12";
|
||||
}
|
||||
window {
|
||||
background-color: rgba(12,12,12,0.60);
|
||||
border: 1px; border-color: rgba(232,232,232,0.14); border-radius: 20px;
|
||||
padding: 18px;
|
||||
width: 600px;
|
||||
}
|
||||
mainbox { spacing: 10px; }
|
||||
inputbar {
|
||||
background-color: rgba(255,255,255,0.07); border-radius: 14px; padding: 12px 16px; spacing: 8px;
|
||||
children: [ prompt, entry ];
|
||||
}
|
||||
prompt { text-color: @mauve; }
|
||||
entry { placeholder: "Search..."; placeholder-color: @subtext; }
|
||||
listview { lines: 8; scrollbar: false; spacing: 4px; fixed-height: true; }
|
||||
element { padding: 9px 14px; border-radius: 14px; spacing: 10px; }
|
||||
element selected { background-color: rgba(232,232,232,0.92); text-color: #0c0c0c; }
|
||||
element-text { text-color: inherit; }
|
||||
element selected element-text { text-color: #0c0c0c; }
|
||||
element-icon { size: 1.4em; }
|
||||
@@ -1,23 +0,0 @@
|
||||
* {
|
||||
background-color: #05050a;
|
||||
text-color: #fcee09;
|
||||
border-color: #fcee09;
|
||||
font: "monospace 11";
|
||||
}
|
||||
|
||||
window {
|
||||
border: 2px;
|
||||
padding: 15px;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: #fcee09;
|
||||
text-color: #000000;
|
||||
}
|
||||
|
||||
entry {
|
||||
placeholder: "OVERRIDE_SYSTEM...";
|
||||
placeholder-color:#444444;
|
||||
text-color: #ff003c;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Power menu in rofi
|
||||
opts=$' Lock\n Logout\n Suspend\n Reboot\n Shutdown'
|
||||
choice=$(printf '%s' "$opts" | rofi -dmenu -i -p "Power" -theme ~/.config/rofi/catppuccin.rasi -theme-str 'window {width: 300px;} listview {lines: 5;} entry {enabled: false;}')
|
||||
case "$choice" in
|
||||
*Lock) ~/.config/sway/lock.sh ;;
|
||||
*Logout) swaymsg exit ;;
|
||||
*Suspend) systemctl suspend ;;
|
||||
*Reboot) systemctl reboot ;;
|
||||
*Shutdown) systemctl poweroff ;;
|
||||
esac
|
||||
@@ -1,17 +0,0 @@
|
||||
window {
|
||||
background-color: #050B14;
|
||||
border: 2px solid #FF0055;
|
||||
font-family: "Orbitron", sans-serif;
|
||||
}
|
||||
|
||||
#input {
|
||||
background-color: #0D0F18;
|
||||
color: #00F0FF;
|
||||
border: 1px solid #FF0055;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
background-color: #FF0055;
|
||||
color: #050B14;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
[Default]
|
||||
save_dir=$HOME/Pictures/Screenshots
|
||||
save_filename_format=screenshot_%Y-%m-%d_%H-%M-%S_edited.png
|
||||
early_exit=true
|
||||
auto_save=false
|
||||
show_panel=true
|
||||
line_size=5
|
||||
text_size=20
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Bluetooth menu (rofi): power, connect/disconnect known devices, scan and pair new ones.
|
||||
THEME=~/.config/rofi/catppuccin.rasi
|
||||
menu() { rofi -dmenu -i -p "$1" -theme "$THEME" "${@:2}"; }
|
||||
|
||||
if ! bluetoothctl show | grep -q "Powered: yes"; then
|
||||
choice=$(printf '%s\n' "Включить Bluetooth" | menu "Bluetooth") || exit 0
|
||||
[[ $choice == "Включить Bluetooth" ]] && bluetoothctl power on >/dev/null && notify-send "Bluetooth" "Включён"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
build() {
|
||||
local list="" mac name mark
|
||||
while read -r _ mac name; do
|
||||
[[ -z $mac ]] && continue
|
||||
mark="○"; bluetoothctl info "$mac" | grep -q "Connected: yes" && mark="●"
|
||||
list+="$mark $name [$mac]"$'\n'
|
||||
done < <(bluetoothctl devices)
|
||||
printf '%s' "$list"
|
||||
}
|
||||
|
||||
choice=$(printf '%s%s\n%s\n' "$(build)" "Найти новые устройства" "Выключить Bluetooth" | sed '/^$/d' | menu "Bluetooth") || exit 0
|
||||
[[ -z $choice ]] && exit 0
|
||||
|
||||
case $choice in
|
||||
"Выключить Bluetooth") bluetoothctl power off >/dev/null; notify-send "Bluetooth" "Выключен"; exit 0 ;;
|
||||
"Найти новые устройства")
|
||||
notify-send "Bluetooth" "Поиск устройств (8 с)…"
|
||||
bluetoothctl --timeout 8 scan on >/dev/null 2>&1
|
||||
choice=$(build | menu "Bluetooth: найденные") || exit 0
|
||||
[[ -z $choice ]] && exit 0
|
||||
mac=${choice##*[}; mac=${mac%]}
|
||||
bluetoothctl pair "$mac" >/dev/null 2>&1; bluetoothctl trust "$mac" >/dev/null 2>&1
|
||||
bluetoothctl connect "$mac" >/dev/null 2>&1 && notify-send "Bluetooth" "Подключено" || notify-send -u critical "Bluetooth" "Не удалось подключиться"
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
mac=${choice##*[}; mac=${mac%]}
|
||||
name=${choice:2}; name=${name% [*}
|
||||
if [[ ${choice:0:1} == "●" ]]; then
|
||||
bluetoothctl disconnect "$mac" >/dev/null && notify-send "Bluetooth" "Отключено: $name"
|
||||
else
|
||||
bluetoothctl connect "$mac" >/dev/null 2>&1 && notify-send "Bluetooth" "Подключено: $name" || notify-send -u critical "Bluetooth" "Не удалось подключиться: $name"
|
||||
fi
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Shows all sway keybindings in rofi
|
||||
# Shows all sway keybindings in the DMS picker (type to filter, Esc to close)
|
||||
cat ~/.config/sway/config ~/.config/sway/config.d/*.conf | grep -E '^\s*bindsym' | grep -v -- '--locked' \
|
||||
| sed -E 's/^\s*bindsym\s+//; s/(--[a-z-]+(=[^ ]+)?\s+)+//; s/\$mod/Super/g; s/^(\S+)\s+/\1\t→ /' \
|
||||
| column -t -s $'\t' | rofi -dmenu -i -p "Keys" -theme ~/.config/rofi/catppuccin.rasi \
|
||||
-theme-str 'window {width: 900px;} listview {lines: 14;} entry {placeholder: "Filter...";}' >/dev/null
|
||||
| column -t -s $'\t' | dms dmenu >/dev/null
|
||||
|
||||
+1
-13
@@ -16,22 +16,10 @@ set $right l
|
||||
# Your preferred terminal emulator
|
||||
# Recommends: foot
|
||||
set $term kitty
|
||||
# Your preferred application launcher
|
||||
# Note: pass the final command to swaymsg so that the resulting window can be opened
|
||||
# on the original workspace that the command was run on.
|
||||
# Recommends: rofi-wayland
|
||||
set $rofi_cmd rofi -theme ~/.config/rofi/catppuccin.rasi \
|
||||
-terminal '$term'
|
||||
# Shows a combined list of the applications with desktop files and
|
||||
# executables from PATH.
|
||||
# TODO: add window with the next release of rofi-wayland
|
||||
set $menu $rofi_cmd -show combi -combi-modes drun#run -modes combi
|
||||
|
||||
### Output configuration
|
||||
#
|
||||
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||||
# Requires: desktop-backgrounds-compat, swaybg, jxl-pixbuf-loader
|
||||
output * bg /usr/share/backgrounds/default.jxl fill
|
||||
# Wallpaper is handled by DankMaterialShell (Settings > Wallpaper), not by sway.
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# Session plumbing so portals (screen sharing, file dialogs, dark mode) and D-Bus activated apps work on any distro.
|
||||
# Fedora's sway-systemd already does the same; running it twice is harmless.
|
||||
exec_always dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE
|
||||
exec systemctl --user import-environment WAYLAND_DISPLAY DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE
|
||||
exec systemctl --user start sway-session.target
|
||||
@@ -28,7 +28,6 @@ client.placeholder $base $base $text $base $base
|
||||
client.background $base
|
||||
|
||||
# Autostart
|
||||
exec_always sh -c 'pkill -x dunst; pkill -x swaync; true'
|
||||
exec_always sh -c 'pkill -x nm-applet; exec nm-applet --indicator'
|
||||
bindsym --to-code $mod+Shift+x exec ~/.config/sway/lock.sh
|
||||
|
||||
@@ -45,12 +44,10 @@ input type:touchpad {
|
||||
# Window rules
|
||||
for_window [app_id="pavucontrol|nm-connection-editor|blueman-manager"] floating enable, resize set 700 500, border pixel 2
|
||||
for_window [window_role="pop-up"] floating enable
|
||||
for_window [app_id="rofi"] border none
|
||||
titlebar_padding 10 4
|
||||
focus_follows_mouse no
|
||||
workspace_auto_back_and_forth yes
|
||||
bindsym --to-code $mod+Shift+p exec dms ipc call powermenu toggle
|
||||
|
||||
# Wallpaper + idle/lock
|
||||
output * bg ~/Pictures/wallpapers/current fill
|
||||
# Idle / lock
|
||||
exec_always ~/.config/sway/idle.sh
|
||||
|
||||
@@ -29,12 +29,7 @@ dim_inactive_colors.urgent #ff5c5c
|
||||
# Thin outline instead of fat border -> cleaner look
|
||||
titlebar_separator disable
|
||||
|
||||
# Frosted glass for layers
|
||||
layer_effects "waybar" blur enable; blur_ignore_transparent enable; corner_radius 14; shadows enable
|
||||
layer_effects "rofi" blur enable; blur_ignore_transparent enable; corner_radius 20; shadows enable
|
||||
layer_effects "notifications" blur enable; blur_ignore_transparent enable; corner_radius 14; shadows enable
|
||||
layer_effects "swaync-control-center" blur enable; blur_ignore_transparent enable; corner_radius 20; shadows enable
|
||||
layer_effects "swaync-notification-window" blur enable; blur_ignore_transparent enable; corner_radius 14; shadows enable
|
||||
# Frosted glass for sway's own layers (DMS layers: 21-dms-effects.conf)
|
||||
layer_effects "swaynag" blur enable; blur_ignore_transparent enable; corner_radius 12
|
||||
|
||||
# Translucent terminals, glass shows through
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# SwayFX blur for DMS surfaces (layer names: swaymsg -t get_outputs -r | jq '.[].layer_shell_surfaces[].namespace').
|
||||
# Only blur: DMS surfaces are bigger than what is drawn, so shadows / corner_radius here would paint
|
||||
# a glow and rounded corners around the whole (often full-screen) layer.
|
||||
# SwayFX-only: install.sh drops this file when plain sway is used.
|
||||
layer_effects "dms:bar" blur enable; blur_ignore_transparent enable
|
||||
layer_effects "dms:notification-popup" blur enable; blur_ignore_transparent enable
|
||||
layer_effects "dms:osd" blur enable; blur_ignore_transparent enable
|
||||
layer_effects "dms:dock" blur enable; blur_ignore_transparent enable
|
||||
@@ -15,20 +15,20 @@ bindsym --to-code $mod+Ctrl+Left workspace prev_on_output
|
||||
bindsym --to-code $mod+Shift+f floating toggle, resize set 1000 600, move position center
|
||||
bindsym --to-code $mod+c exec swaymsg [con_id=__focused__] move position center
|
||||
|
||||
# Screenshots: area -> clipboard, area -> file
|
||||
bindsym --to-code Shift+Print exec ~/.config/sway/screenshot.sh clip
|
||||
bindsym --to-code $mod+Print exec ~/.config/sway/screenshot.sh file
|
||||
# Screenshots (saved to ~/Pictures/Screenshots and copied to the clipboard)
|
||||
bindsym --to-code Print exec ~/.config/sway/screenshot.sh region
|
||||
bindsym --to-code $mod+Shift+s exec ~/.config/sway/screenshot.sh region
|
||||
bindsym --to-code Shift+Print exec ~/.config/sway/screenshot.sh full
|
||||
bindsym --to-code Ctrl+Print exec ~/.config/sway/screenshot.sh window
|
||||
bindsym --to-code Alt+Print exec ~/.config/sway/screenshot.sh scroll
|
||||
bindsym --to-code $mod+Print exec ~/.config/sway/screenshot.sh last
|
||||
bindsym --to-code Ctrl+Shift+Print exec ~/.config/sway/screenshot.sh edit
|
||||
|
||||
# Keep video/browser-video windows undimmed
|
||||
for_window [app_id="firefox"] inhibit_idle fullscreen
|
||||
for_window [app_id="mpv"] floating enable, dim_inactive 0
|
||||
|
||||
# Mirror internal screen to HDMI/TV on hotplug
|
||||
exec_always ~/.config/sway/mirror.sh
|
||||
|
||||
# Rice helpers
|
||||
bindsym --to-code $mod+Shift+w exec ~/.config/sway/wallpaper.sh
|
||||
bindsym --to-code $mod+Shift+s exec ~/.config/sway/screenshot-menu.sh
|
||||
bindsym --to-code $mod+F1 exec ~/.config/sway/cheatsheet.sh
|
||||
# Performance mode: toggle blur + shadows
|
||||
bindsym --to-code $mod+Shift+b blur toggle; shadows toggle
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Waybar (replaces sway-config-fedora's 90-bar.conf, which isn't installed with swayfx)
|
||||
bar {
|
||||
swaybar_command waybar
|
||||
}
|
||||
@@ -4,15 +4,6 @@ exec_always sh -c 'pgrep -x dms >/dev/null || exec dms run'
|
||||
# Hotkeys: $mod+d launcher, $mod+n control center, $mod+Shift+n notifications, $mod+Shift+p power menu (set in config / config.d)
|
||||
bindsym --to-code $mod+Shift+v exec dms ipc call clipboard toggle
|
||||
|
||||
|
||||
# SwayFX blur for DMS surfaces (layer names: swaymsg -t get_outputs -r | jq '.[].layer_shell_surfaces[].namespace').
|
||||
# Only blur: DMS surfaces are bigger than what is drawn, so shadows / corner_radius here would paint
|
||||
# a glow and rounded corners around the whole (often full-screen) layer.
|
||||
layer_effects "dms:bar" blur enable; blur_ignore_transparent enable
|
||||
layer_effects "dms:notification-popup" blur enable; blur_ignore_transparent enable
|
||||
layer_effects "dms:osd" blur enable; blur_ignore_transparent enable
|
||||
layer_effects "dms:dock" blur enable; blur_ignore_transparent enable
|
||||
|
||||
# Media keys (work on the lock screen too); DMS shows the OSD
|
||||
bindsym --locked XF86AudioRaiseVolume exec dms ipc call audio increment 5
|
||||
bindsym --locked XF86AudioLowerVolume exec dms ipc call audio decrement 5
|
||||
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
# Health check for the sway-rising setup. Prints OK / WARN / FAIL per item. Exit code = number of FAILs.
|
||||
CFG=${XDG_CONFIG_HOME:-$HOME/.config}
|
||||
fails=0
|
||||
ok() { printf ' \033[32mOK\033[0m %s\n' "$*"; }
|
||||
warn() { printf ' \033[33mWARN\033[0m %s\n' "$*"; }
|
||||
bad() { printf ' \033[31mFAIL\033[0m %s\n' "$*"; fails=$((fails+1)); }
|
||||
have() { command -v "$1" >/dev/null 2>&1; }
|
||||
section() { printf '\n\033[1m%s\033[0m\n' "$*"; }
|
||||
|
||||
section "Compositor"
|
||||
if have sway; then
|
||||
v=$(sway --version 2>/dev/null | head -1); ok "$v"
|
||||
case $v in *swayfx*) ok "SwayFX (blur, shadows, rounded corners available)";; *) warn "plain sway: effects are disabled";; esac
|
||||
sway -C >/dev/null 2>&1 && ok "sway config is valid" || bad "sway -C reports errors"
|
||||
else bad "sway / swayfx not installed"; fi
|
||||
[ -n "${SWAYSOCK:-}" ] && ok "running inside sway" || warn "not inside a sway session (some checks skipped)"
|
||||
|
||||
section "Shell (DMS)"
|
||||
if have dms; then
|
||||
ok "dms installed"
|
||||
pgrep -x dms >/dev/null && ok "dms is running" || { [ -n "${SWAYSOCK:-}" ] && bad "dms is not running" || warn "dms not running (not in session)"; }
|
||||
else bad "dms not installed"; fi
|
||||
[ -f "$CFG/dms/settings.json" ] && ok "DMS settings present" || warn "no DMS settings yet"
|
||||
|
||||
section "Session / portals"
|
||||
if systemctl --user is-active sway-session.target >/dev/null 2>&1; then ok "sway-session.target active"
|
||||
else [ -n "${SWAYSOCK:-}" ] && bad "sway-session.target inactive (portals will not start)" || warn "sway-session.target inactive (not in session)"; fi
|
||||
if [ -n "${SWAYSOCK:-}" ] && have gdbus; then
|
||||
timeout 10 gdbus call --session --dest org.freedesktop.portal.Desktop --object-path /org/freedesktop/portal/desktop \
|
||||
--method org.freedesktop.DBus.Properties.Get org.freedesktop.portal.Settings version >/dev/null 2>&1 \
|
||||
&& ok "xdg-desktop-portal reachable" || bad "xdg-desktop-portal unreachable"
|
||||
fi
|
||||
|
||||
section "Fonts and theme"
|
||||
fc-list 2>/dev/null | grep -qi "JetBrains Mono" && ok "JetBrains Mono" || bad "JetBrains Mono missing"
|
||||
fc-list 2>/dev/null | grep -qiE "Font ?Awesome" && ok "Font Awesome" || warn "Font Awesome missing (some icons)"
|
||||
{ [ -d /usr/share/themes/adw-gtk3-dark ] || [ -d "$HOME/.local/share/themes/adw-gtk3-dark" ]; } && ok "adw-gtk3 theme" || warn "adw-gtk3 theme missing (GTK apps will not follow the palette)"
|
||||
|
||||
section "Terminal and shell tools"
|
||||
for t in kitty zsh tmux git fzf zoxide eza bat fd rg ncdu lazygit; do
|
||||
have "$t" || { [ "$t" = fd ] && have fdfind; } && ok "$t" || warn "$t missing"
|
||||
done
|
||||
[ -d "$HOME/.oh-my-zsh" ] && ok "oh-my-zsh" || warn "oh-my-zsh missing"
|
||||
[ "$(basename "${SHELL:-}")" = zsh ] && ok "login shell is zsh" || warn "login shell is not zsh (run: chsh -s $(command -v zsh || echo /usr/bin/zsh))"
|
||||
|
||||
section "Per-machine config"
|
||||
[ -f "$CFG/sway/config.d/05-outputs.conf" ] && ok "monitor layout (05-outputs.conf)" || warn "no monitor layout yet: run ~/.config/sway/outputs-setup.sh inside sway"
|
||||
for t in grim slurp swaylock swayidle brightnessctl playerctl wl-copy rofi; do have "$t" && ok "$t" || warn "$t missing"; done
|
||||
|
||||
printf '\n'; [ "$fails" -eq 0 ] && echo "No failures." || echo "$fails failure(s)."
|
||||
exit "$fails"
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Mirror the internal display to any external output (sway has no native mirroring).
|
||||
# Watches output hotplug events; needs wl-mirror.
|
||||
exec 9>"${XDG_RUNTIME_DIR:-/tmp}/sway-mirror.lock"
|
||||
flock -n 9 || exit 0
|
||||
|
||||
internal=eDP-1
|
||||
|
||||
sync() {
|
||||
pkill -x wl-mirror
|
||||
for ext in $(swaymsg -t get_outputs -r | jq -r --arg i "$internal" '.[] | select(.active and .name != $i) | .name'); do
|
||||
wl-mirror --fullscreen-output "$ext" "$internal" &
|
||||
done
|
||||
}
|
||||
|
||||
sync
|
||||
swaymsg -t subscribe -m '["output"]' | while read -r _; do
|
||||
sleep 1
|
||||
sync
|
||||
done
|
||||
Executable
+54
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env bash
|
||||
# Generate ~/.config/sway/config.d/05-outputs.conf from the monitors sway sees right now.
|
||||
# Laptop panel first (left), the rest follow to the right. Run inside a sway session.
|
||||
# Usage: outputs-setup.sh [--auto] (--auto: no questions, guess scales)
|
||||
set -euo pipefail
|
||||
|
||||
AUTO=0; [ "${1:-}" = "--auto" ] && AUTO=1
|
||||
OUT=${XDG_CONFIG_HOME:-$HOME/.config}/sway/config.d/05-outputs.conf
|
||||
|
||||
command -v swaymsg >/dev/null && [ -n "${SWAYSOCK:-}" ] || { echo "Run this inside a sway session." >&2; exit 1; }
|
||||
command -v python3 >/dev/null || { echo "python3 is required." >&2; exit 1; }
|
||||
|
||||
mapfile -t ROWS < <(swaymsg -t get_outputs -r | python3 -c '
|
||||
import json,sys
|
||||
outs=[o for o in json.load(sys.stdin) if o.get("active") or o.get("power", True)]
|
||||
# internal panels (eDP/LVDS/DSI) first, then the others by name
|
||||
outs.sort(key=lambda o:(0 if o["name"].startswith(("eDP","LVDS","DSI")) else 1, o["name"]))
|
||||
for o in outs:
|
||||
m=o.get("current_mode") or {}
|
||||
print(o["name"], m.get("width",0), m.get("height",0), o.get("make","?").replace(" ","_"), o.get("model","?").replace(" ","_"))
|
||||
')
|
||||
[ "${#ROWS[@]}" -gt 0 ] || { echo "No outputs found." >&2; exit 1; }
|
||||
|
||||
guess_scale() { # name width height
|
||||
case $1 in
|
||||
eDP*|LVDS*|DSI*)
|
||||
if [ "$2" -ge 3000 ]; then echo 2
|
||||
elif [ "$2" -ge 2400 ]; then echo 1.5
|
||||
elif [ "$2" -ge 1900 ] && [ "$3" -ge 1200 ]; then echo 1.25
|
||||
else echo 1; fi ;;
|
||||
*) echo 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
x=0; body=""
|
||||
for row in "${ROWS[@]}"; do
|
||||
read -r name w h make model <<<"$row"
|
||||
scale=$(guess_scale "$name" "$w" "$h")
|
||||
if [ "$AUTO" = 0 ]; then
|
||||
read -r -p "$name ($make $model, ${w}x${h}) scale [$scale]: " ans || ans=""
|
||||
[ -n "$ans" ] && scale=$ans
|
||||
fi
|
||||
body+="output $name position $x 0 scale $scale"$'\n'
|
||||
x=$(python3 -c "print(int($x + $w / $scale))")
|
||||
done
|
||||
|
||||
mkdir -p "$(dirname "$OUT")"
|
||||
[ -e "$OUT" ] && cp -a "$OUT" "$OUT.bak"
|
||||
{
|
||||
echo "# Monitor layout, generated by outputs-setup.sh (edit freely; re-run to regenerate)"
|
||||
printf '%s' "$body"
|
||||
} > "$OUT"
|
||||
echo "Wrote $OUT:"; cat "$OUT"
|
||||
swaymsg reload >/dev/null && echo "sway reloaded."
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
choice=$(printf '%s\n' ' Area → clipboard' ' Area → file' ' Screen → clipboard' ' Screen → file' \
|
||||
| rofi -dmenu -i -p "Screenshot" -theme ~/.config/rofi/catppuccin.rasi \
|
||||
-theme-str 'window {width: 380px;} listview {lines: 4;} entry {enabled: false;}')
|
||||
dir=$HOME/Pictures/Screenshots; mkdir -p "$dir"
|
||||
f=$dir/$(date +%F_%H-%M-%S).png
|
||||
case "$choice" in
|
||||
*"Area → clipboard") ~/.config/sway/screenshot.sh clip ;;
|
||||
*"Area → file") ~/.config/sway/screenshot.sh file ;;
|
||||
*"Screen → clipboard") sleep 0.3; grim - | wl-copy ;;
|
||||
*"Screen → file") sleep 0.3; grim "$f" ;;
|
||||
*) exit 0 ;;
|
||||
esac
|
||||
notify-send -t 2000 "Screenshot" "Saved"
|
||||
@@ -1,10 +1,30 @@
|
||||
#!/bin/sh
|
||||
# usage: screenshot.sh clip | file
|
||||
geo=$(slurp) || exit 0
|
||||
if [ "$1" = file ]; then
|
||||
dir=$HOME/Pictures/Screenshots
|
||||
mkdir -p "$dir"
|
||||
grim -g "$geo" "$dir/$(date +%F_%H-%M-%S).png"
|
||||
else
|
||||
grim -g "$geo" - | wl-copy
|
||||
fi
|
||||
# Screenshots. Every capture goes to ~/Pictures/Screenshots AND the clipboard, with a notification.
|
||||
# usage: screenshot.sh region | full | all | window | scroll | last | edit
|
||||
# region select an area (DMS selector: drag, Enter/Space to confirm, Esc to cancel)
|
||||
# full the focused monitor all all monitors in one image
|
||||
# window the focused window last repeat the previous area
|
||||
# scroll stitch a scrolling area into one tall image (Enter finishes)
|
||||
# edit select an area and annotate it in swappy (arrows, text, blur; save/copy from there)
|
||||
dir="$HOME/Pictures/Screenshots"
|
||||
mkdir -p "$dir"
|
||||
mode=${1:-region}
|
||||
|
||||
case "$mode" in
|
||||
region|full|all|last|scroll)
|
||||
exec dms screenshot "$mode" --dir "$dir" ;;
|
||||
window)
|
||||
# DMS cannot capture a single window on sway, so use grim on the focused container
|
||||
geo=$(swaymsg -t get_tree | jq -r '.. | select(.focused? == true) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | head -1)
|
||||
[ -n "$geo" ] || { notify-send -u low "Screenshot" "No focused window"; exit 1; }
|
||||
f="$dir/$(date +%F_%H-%M-%S)_window.png"
|
||||
grim -g "$geo" "$f" && wl-copy < "$f" && notify-send -t 3000 -i "$f" "Screenshot" "Window saved and copied"
|
||||
;;
|
||||
edit)
|
||||
if ! command -v swappy >/dev/null; then
|
||||
notify-send -u critical "Screenshot" "swappy is not installed: sudo dnf install swappy"; exit 1
|
||||
fi
|
||||
dms screenshot region --stdout --no-file --no-clipboard --no-notify | swappy -f -
|
||||
;;
|
||||
*) echo "usage: $0 region|full|all|window|scroll|last|edit" >&2; exit 1 ;;
|
||||
esac
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# VPN menu (rofi): lists NetworkManager vpn/wireguard connections, click to connect/disconnect.
|
||||
# Secrets are asked by nm-applet (secret agent).
|
||||
THEME=~/.config/rofi/catppuccin.rasi
|
||||
menu() { rofi -dmenu -i -p "$1" -theme "$THEME" "${@:2}"; }
|
||||
|
||||
active=$(nmcli -t -e no -f NAME,TYPE connection show --active)
|
||||
list=""
|
||||
while IFS= read -r line; do
|
||||
type=${line##*:}; name=${line%:*}
|
||||
[[ $type == vpn || $type == wireguard ]] || continue
|
||||
mark="○"; grep -Fxq "$line" <<<"$active" && mark="●"
|
||||
list+="$mark $name ($type)"$'\n'
|
||||
done < <(nmcli -t -e no -f NAME,TYPE connection show)
|
||||
|
||||
[[ -z $list ]] && { notify-send "VPN" "Нет настроенных VPN"; exit 0; }
|
||||
choice=$(printf '%s%s\n' "$list" "Расширенные настройки…" | menu "VPN") || exit 0
|
||||
[[ -z $choice ]] && exit 0
|
||||
[[ $choice == "Расширенные настройки…" ]] && exec nm-connection-editor
|
||||
|
||||
name=${choice:2}; name=${name% (*}
|
||||
if [[ ${choice:0:1} == "●" ]]; then
|
||||
nmcli connection down id "$name" >/dev/null && notify-send "VPN" "Отключено: $name"
|
||||
else
|
||||
nmcli connection up id "$name" >/dev/null 2>&1 && notify-send "VPN" "Подключено: $name" || notify-send -u critical "VPN" "Не удалось подключиться: $name"
|
||||
fi
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Wallpaper picker with previews. Also used by sway at start (arg: apply).
|
||||
dir=$HOME/Pictures/wallpapers
|
||||
cur=$dir/current
|
||||
if [ "$1" != apply ]; then
|
||||
pick=$(find "$dir" -maxdepth 1 -type f \( -name '*.jpg' -o -name '*.png' \) | sort | while read -r f; do
|
||||
printf '%s\0icon\x1f%s\n' "$(basename "$f" | sed 's/\.[^.]*$//')" "$f"
|
||||
done | rofi -dmenu -i -p "Wallpaper" -show-icons -theme ~/.config/rofi/catppuccin.rasi \
|
||||
-theme-str 'window {width: 760px;} listview {columns: 3; lines: 2;} element {orientation: vertical; padding: 10px;} element-icon {size: 9em;} element-text {horizontal-align: 0.5;} entry {enabled: false;}')
|
||||
[ -n "$pick" ] || exit 0
|
||||
file=$(find "$dir" -maxdepth 1 -type f -name "$pick.*" | head -1)
|
||||
ln -sf "$file" "$cur"
|
||||
fi
|
||||
swaymsg output '*' bg "$cur" fill >/dev/null
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Wi-Fi menu (rofi): toggle radio, connect/disconnect, prompt for password on new networks.
|
||||
THEME=~/.config/rofi/catppuccin.rasi
|
||||
menu() { rofi -dmenu -i -p "$1" -theme "$THEME" "${@:2}"; }
|
||||
|
||||
radio=$(nmcli radio wifi)
|
||||
if [[ $radio != enabled ]]; then
|
||||
choice=$(printf '%s\n' "Включить Wi-Fi" | menu "Wi-Fi")
|
||||
[[ $choice == "Включить Wi-Fi" ]] && nmcli radio wifi on && notify-send "Wi-Fi" "Включён"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
declare -A seen
|
||||
list=""
|
||||
while IFS=: read -r use sig sec ssid; do
|
||||
[[ -z $ssid || -n ${seen[$ssid]} ]] && continue
|
||||
seen[$ssid]=1
|
||||
mark="○"; [[ $use == '*' ]] && mark="●"
|
||||
lock=""; [[ -n $sec && $sec != "--" ]] && lock=" (защищена)"
|
||||
list+="$mark $ssid ${sig}%$lock"$'\n'
|
||||
done < <(nmcli -t -e no -f IN-USE,SIGNAL,SECURITY,SSID dev wifi list --rescan auto | sort -t: -k2 -nr)
|
||||
|
||||
choice=$(printf '%s%s\n%s\n' "$list" "Выключить Wi-Fi" "Расширенные настройки…" | sed '/^$/d' | menu "Wi-Fi") || exit 0
|
||||
[[ -z $choice ]] && exit 0
|
||||
|
||||
case $choice in
|
||||
"Выключить Wi-Fi") nmcli radio wifi off; notify-send "Wi-Fi" "Выключен"; exit 0 ;;
|
||||
"Расширенные настройки…") exec nm-connection-editor ;;
|
||||
esac
|
||||
|
||||
ssid=${choice:2}; ssid=${ssid%% *}
|
||||
if [[ ${choice:0:1} == "●" ]]; then
|
||||
nmcli connection down id "$ssid" >/dev/null && notify-send "Wi-Fi" "Отключено от $ssid"
|
||||
elif nmcli -t -f NAME connection show | grep -Fxq "$ssid"; then
|
||||
nmcli connection up id "$ssid" >/dev/null 2>&1 && notify-send "Wi-Fi" "Подключено к $ssid" || notify-send -u critical "Wi-Fi" "Не удалось подключиться к $ssid"
|
||||
else
|
||||
if [[ $choice == *"(защищена)"* ]]; then
|
||||
pw=$(menu "Пароль для $ssid" -password -lines 0) || exit 0
|
||||
out=$(nmcli dev wifi connect "$ssid" password "$pw" 2>&1)
|
||||
else
|
||||
out=$(nmcli dev wifi connect "$ssid" 2>&1)
|
||||
fi
|
||||
[[ $? -eq 0 ]] && notify-send "Wi-Fi" "Подключено к $ssid" || notify-send -u critical "Wi-Fi" "Ошибка: $out"
|
||||
fi
|
||||
@@ -1,98 +0,0 @@
|
||||
{
|
||||
"$schema": "/etc/xdg/swaync/configSchema.json",
|
||||
"ignore-gtk-theme": true,
|
||||
"positionX": "right",
|
||||
"positionY": "top",
|
||||
"layer": "overlay",
|
||||
"control-center-layer": "top",
|
||||
"layer-shell": true,
|
||||
"layer-shell-cover-screen": false,
|
||||
"cssPriority": "user",
|
||||
"control-center-margin-top": 6,
|
||||
"control-center-margin-bottom": 8,
|
||||
"control-center-margin-right": 8,
|
||||
"control-center-margin-left": 0,
|
||||
"control-center-width": 460,
|
||||
"control-center-height": 620,
|
||||
"fit-to-screen": false,
|
||||
"notification-window-width": 380,
|
||||
"notification-icon-size": 48,
|
||||
"notification-body-image-height": 100,
|
||||
"notification-body-image-width": 200,
|
||||
"timeout": 8,
|
||||
"timeout-low": 5,
|
||||
"timeout-critical": 0,
|
||||
"transition-time": 180,
|
||||
"hide-on-clear": false,
|
||||
"hide-on-action": true,
|
||||
"keyboard-shortcuts": true,
|
||||
"notification-grouping": true,
|
||||
"relative-timestamps": true,
|
||||
"text-empty": "Нет уведомлений",
|
||||
"widgets": [
|
||||
"title",
|
||||
"buttons-grid",
|
||||
"volume",
|
||||
"backlight",
|
||||
"mpris",
|
||||
"dnd",
|
||||
"notifications"
|
||||
],
|
||||
"widget-config": {
|
||||
"title": {
|
||||
"text": "Центр управления",
|
||||
"clear-all-button": true,
|
||||
"button-text": "Очистить"
|
||||
},
|
||||
"dnd": {
|
||||
"text": "Не беспокоить"
|
||||
},
|
||||
"buttons-grid": {
|
||||
"actions": [
|
||||
{
|
||||
"label": " Wi-Fi",
|
||||
"command": "sh -c 'swaync-client -cp -sw; ~/.config/sway/wifi-menu.sh'"
|
||||
},
|
||||
{
|
||||
"label": " Bluetooth",
|
||||
"command": "sh -c 'swaync-client -cp -sw; ~/.config/sway/bt-menu.sh'"
|
||||
},
|
||||
{
|
||||
"label": " VPN",
|
||||
"command": "sh -c 'swaync-client -cp -sw; ~/.config/sway/vpn-menu.sh'"
|
||||
},
|
||||
{
|
||||
"label": " Микрофон",
|
||||
"type": "toggle",
|
||||
"active": true,
|
||||
"command": "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 0 || wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 1'",
|
||||
"update-command": "sh -c 'wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | grep -q MUTED && echo false || echo true'"
|
||||
},
|
||||
{
|
||||
"label": " Блок",
|
||||
"command": "sh -c 'swaync-client -cp -sw; ~/.config/sway/lock.sh'"
|
||||
},
|
||||
{
|
||||
"label": " Выкл",
|
||||
"command": "sh -c 'swaync-client -cp -sw; ~/.config/rofi/powermenu.sh'"
|
||||
}
|
||||
]
|
||||
},
|
||||
"volume": {
|
||||
"label": "",
|
||||
"show-per-app": true,
|
||||
"show-per-app-icon": true,
|
||||
"show-per-app-label": false
|
||||
},
|
||||
"backlight": {
|
||||
"label": "",
|
||||
"device": "intel_backlight"
|
||||
},
|
||||
"mpris": {
|
||||
"image-size": 64,
|
||||
"image-radius": 12,
|
||||
"autohide": true,
|
||||
"show-album-art": "when-available"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
/* swaync glass theme: matches rofi/waybar, purple accent from kitty.
|
||||
Icons come from FontAwesome (the same glyphs the waybar uses). */
|
||||
@define-color text #f2f2f2;
|
||||
@define-color sub #b4b4b4;
|
||||
@define-color accent #bb9af7;
|
||||
@define-color red #f7768e;
|
||||
|
||||
* {
|
||||
font-family: "JetBrains Mono", "FontAwesome", "Font Awesome 6 Brands", monospace;
|
||||
font-size: 14px;
|
||||
color: @text;
|
||||
text-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* ---------- Panel ---------- */
|
||||
.control-center {
|
||||
background: rgba(14, 14, 18, 0.80);
|
||||
border: 1px solid rgba(232, 232, 232, 0.18);
|
||||
border-radius: 20px;
|
||||
padding: 16px;
|
||||
}
|
||||
.control-center .widget-title { margin: 2px 2px 12px 2px; }
|
||||
.widget-title > label { font-size: 18px; font-weight: bold; }
|
||||
.widget-title > button {
|
||||
background: rgba(255, 255, 255, 0.10);
|
||||
border: none; border-radius: 12px; padding: 6px 16px;
|
||||
}
|
||||
.widget-title > button label { color: @text; }
|
||||
.widget-title > button:hover { background: rgba(255, 255, 255, 0.22); }
|
||||
|
||||
/* ---------- Toggle tiles ---------- */
|
||||
.widget-buttons-grid { background: transparent; margin: 0 0 10px 0; padding: 0; }
|
||||
.widget-buttons-grid > flowbox > flowboxchild > button {
|
||||
background: rgba(255, 255, 255, 0.09);
|
||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||
border-radius: 14px;
|
||||
min-width: 120px; min-height: 46px; margin: 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.widget-buttons-grid > flowbox > flowboxchild > button label { font-weight: bold; }
|
||||
.widget-buttons-grid > flowbox > flowboxchild > button:hover { background: rgba(255, 255, 255, 0.20); }
|
||||
.widget-buttons-grid > flowbox > flowboxchild > button:checked {
|
||||
background: @accent; border-color: @accent;
|
||||
}
|
||||
.widget-buttons-grid > flowbox > flowboxchild > button:checked label { color: #11111b; }
|
||||
|
||||
/* ---------- Sliders ---------- */
|
||||
.widget-volume, .widget-backlight {
|
||||
background: rgba(255, 255, 255, 0.09);
|
||||
border-radius: 14px; padding: 10px 16px; margin: 4px 0;
|
||||
}
|
||||
.widget-volume label, .widget-backlight label { font-size: 18px; min-width: 26px; }
|
||||
scale trough {
|
||||
min-height: 8px; border-radius: 6px;
|
||||
background: rgba(255, 255, 255, 0.20);
|
||||
}
|
||||
scale highlight { background: @accent; border-radius: 6px; }
|
||||
scale slider {
|
||||
min-width: 18px; min-height: 18px; margin: -6px;
|
||||
background: @text; border-radius: 50%; border: none;
|
||||
}
|
||||
.widget-volume button { background: rgba(255, 255, 255, 0.10); border: none; border-radius: 10px; }
|
||||
.per-app-volume { background: transparent; padding: 4px 0; }
|
||||
|
||||
/* ---------- Player ---------- */
|
||||
.widget-mpris {
|
||||
background: rgba(255, 255, 255, 0.09);
|
||||
border-radius: 14px; padding: 8px; margin: 4px 0;
|
||||
}
|
||||
.widget-mpris-title { font-weight: bold; font-size: 15px; }
|
||||
.widget-mpris-subtitle { color: @sub; font-size: 13px; }
|
||||
.widget-mpris button { background: transparent; border: none; border-radius: 12px; }
|
||||
.widget-mpris button:hover { background: rgba(255, 255, 255, 0.18); }
|
||||
|
||||
/* ---------- Do not disturb ---------- */
|
||||
.widget-dnd { margin: 10px 4px; font-size: 14px; }
|
||||
.widget-dnd > label { font-weight: bold; }
|
||||
.widget-dnd > switch {
|
||||
background: rgba(255, 255, 255, 0.20);
|
||||
border: none; border-radius: 14px;
|
||||
}
|
||||
.widget-dnd > switch:checked { background: @accent; }
|
||||
.widget-dnd > switch slider { background: @text; border-radius: 12px; }
|
||||
|
||||
/* ---------- Notifications (popups + list) ---------- */
|
||||
.notification-row { outline: none; }
|
||||
.notification {
|
||||
background: rgba(14, 14, 18, 0.85);
|
||||
border: 1px solid rgba(232, 232, 232, 0.22);
|
||||
border-radius: 14px; margin: 6px 8px; padding: 0;
|
||||
}
|
||||
.control-center .notification { background: rgba(255, 255, 255, 0.09); border: none; }
|
||||
.notification-content { background: transparent; padding: 10px; }
|
||||
.notification-default-action, .notification-action { background: transparent; border-radius: 14px; }
|
||||
.notification-default-action:hover { background: rgba(255, 255, 255, 0.09); }
|
||||
.summary { font-weight: bold; font-size: 15px; }
|
||||
.body { color: #d8d8d8; font-size: 14px; }
|
||||
.time { color: @sub; font-size: 12px; }
|
||||
.image { border-radius: 10px; }
|
||||
.close-button {
|
||||
background: rgba(255, 255, 255, 0.14);
|
||||
border: none; border-radius: 50%; margin: 6px; padding: 2px;
|
||||
}
|
||||
.close-button:hover { background: @red; }
|
||||
.critical { border: 1px solid @red; }
|
||||
.notification-group-headers label { color: @sub; font-weight: bold; }
|
||||
.widget-notifications, .notification-group { background: transparent; }
|
||||
|
||||
/* empty state: text only, no broken icon */
|
||||
.notifications-placeholder, .control-center-list placeholder { color: @sub; font-size: 14px; }
|
||||
.notifications-placeholder image, .control-center-list placeholder image { opacity: 0; min-height: 0; min-width: 0; -gtk-icon-size: 0; }
|
||||
.notifications-placeholder > *:first-child,
|
||||
.notifications-placeholder picture,
|
||||
.notifications-placeholder > box > image,
|
||||
.control-center-list-placeholder image,
|
||||
.empty-label image { opacity: 0; min-height: 0; min-width: 0; margin: 0; }
|
||||
@@ -1,66 +0,0 @@
|
||||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"height": 34,
|
||||
"margin-top": 8,
|
||||
"margin-left": 10,
|
||||
"margin-right": 10,
|
||||
"spacing": 6,
|
||||
"modules-left": ["sway/workspaces", "sway/mode", "sway/window"],
|
||||
"modules-center": ["clock", "mpris"],
|
||||
"modules-right": ["idle_inhibitor", "sway/language", "group/hw", "backlight", "pulseaudio", "network", "battery", "tray", "custom/notification", "custom/power"],
|
||||
|
||||
"sway/workspaces": { "disable-scroll": true, "all-outputs": true, "format": "{icon}", "format-icons": {"1": "", "2": "", "3": "", "4": "", "5": "", "urgent": "", "default": ""} },
|
||||
"sway/window": { "max-length": 45, "format": "{title}", "rewrite": { "(.*) — Mozilla Firefox": " $1", "(.*) - Chromium": " $1" } },
|
||||
"sway/language": { "format": " {short}" },
|
||||
"clock": { "format": " {:%H:%M}", "format-alt": " {:%A, %d %B %Y}", "tooltip-format": "<tt>{calendar}</tt>" },
|
||||
"mpris": { "format": "{player_icon} {title}", "format-paused": " {title}", "player-icons": { "default": "" }, "max-length": 36, "tooltip-format": "{artist} — {title}" },
|
||||
"group/hw": { "orientation": "inherit", "drawer": { "transition-duration": 350, "transition-left-to-right": false }, "modules": ["custom/hw", "temperature", "cpu", "memory"] },
|
||||
"custom/hw": { "format": "\uf085", "tooltip": false },
|
||||
"idle_inhibitor": { "format": "{icon}", "format-icons": { "activated": "", "deactivated": "" }, "tooltip-format-activated": "Idle inhibited", "tooltip-format-deactivated": "Idle allowed" },
|
||||
"temperature": { "critical-threshold": 85, "format": " {temperatureC}°", "interval": 5 },
|
||||
"cpu": { "format": " {usage}%", "interval": 3 },
|
||||
"memory": { "format": " {percentage}%", "interval": 5 },
|
||||
"backlight": { "format": "{icon} {percent}%", "format-icons": ["", ""], "on-scroll-up": "brightnessctl set 5%+", "on-scroll-down": "brightnessctl set 5%-" },
|
||||
"pulseaudio": {
|
||||
"format": "{icon} {volume}%",
|
||||
"format-muted": " muted",
|
||||
"format-icons": { "default": ["", "", ""] },
|
||||
"on-click": "pavucontrol",
|
||||
"on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
},
|
||||
"network": {
|
||||
"format-wifi": " {essid}",
|
||||
"format-ethernet": " {ipaddr}",
|
||||
"format-disconnected": " offline",
|
||||
"tooltip-format": "{ifname} {signalStrength}%"
|
||||
},
|
||||
"battery": {
|
||||
"states": { "warning": 25, "critical": 12 },
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-charging": " {capacity}%",
|
||||
"format-icons": ["", "", "", "", ""]
|
||||
},
|
||||
"tray": { "spacing": 8 },
|
||||
"custom/notification": {
|
||||
"tooltip": false,
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"notification": "\uf0f3<span foreground='#f7768e'><sup>\uf111</sup></span>",
|
||||
"none": "\uf0f3",
|
||||
"dnd-notification": "\uf1f6<span foreground='#f7768e'><sup>\uf111</sup></span>",
|
||||
"dnd-none": "\uf1f6",
|
||||
"inhibited-notification": "\uf0f3<span foreground='#f7768e'><sup>\uf111</sup></span>",
|
||||
"inhibited-none": "\uf0f3",
|
||||
"dnd-inhibited-notification": "\uf1f6<span foreground='#f7768e'><sup>\uf111</sup></span>",
|
||||
"dnd-inhibited-none": "\uf1f6"
|
||||
},
|
||||
"return-type": "json",
|
||||
"exec-if": "which swaync-client",
|
||||
"exec": "swaync-client -swb",
|
||||
"on-click": "swaync-client -t -sw",
|
||||
"on-click-right": "swaync-client -d -sw",
|
||||
"escape": true
|
||||
},
|
||||
"custom/power": { "format": "", "tooltip": false, "on-click": "~/.config/rofi/powermenu.sh" }
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
@define-color base #0c0c0c;
|
||||
@define-color surface0 #1c1c1c;
|
||||
@define-color surface1 #2e2e2e;
|
||||
@define-color text #e8e8e8;
|
||||
@define-color subtext #8c8c8c;
|
||||
@define-color red #ff5c5c;
|
||||
@define-color yellow #d9c99a;
|
||||
|
||||
* {
|
||||
font-family: "JetBrains Mono", "Font Awesome 6 Free";
|
||||
font-size: 13px;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar { background: transparent; color: @text; }
|
||||
|
||||
/* glass pills: translucent so swayfx blur shows through */
|
||||
#workspaces, #window, #clock, #language, #cpu, #memory, #pulseaudio, #network, #battery,
|
||||
#tray, #mode, #custom-power, #custom-notification, #backlight, #idle_inhibitor, #temperature, #mpris {
|
||||
background: alpha(@base, 0.55);
|
||||
border: 1px solid alpha(@text, 0.08);
|
||||
border-radius: 14px;
|
||||
padding: 0 12px;
|
||||
margin: 0;
|
||||
color: @text;
|
||||
transition: all 0.25s ease;
|
||||
}
|
||||
|
||||
#workspaces { padding: 0 4px; }
|
||||
#workspaces button {
|
||||
color: @subtext;
|
||||
padding: 0 9px;
|
||||
margin: 4px 2px;
|
||||
border-radius: 10px;
|
||||
background: transparent;
|
||||
transition: all 0.25s ease;
|
||||
}
|
||||
#workspaces button:hover { background: alpha(@text, 0.12); color: @text; box-shadow: none; text-shadow: none; }
|
||||
#workspaces button.focused { background: alpha(@text, 0.92); color: @base; padding: 0 16px; box-shadow: 0 0 12px alpha(@text, 0.35); }
|
||||
#workspaces button.urgent { background: @red; color: @base; }
|
||||
|
||||
#mode { background: @text; color: @base; font-weight: bold; }
|
||||
#window { color: @subtext; }
|
||||
window#waybar.empty #window { background: transparent; border-color: transparent; }
|
||||
#clock { font-weight: bold; padding: 0 16px; }
|
||||
#mpris { color: @subtext; }
|
||||
|
||||
#cpu:hover, #memory:hover, #pulseaudio:hover, #network:hover, #battery:hover,
|
||||
#language:hover, #backlight:hover, #idle_inhibitor:hover, #temperature:hover, #mpris:hover {
|
||||
background: alpha(@text, 0.14);
|
||||
border-color: alpha(@text, 0.25);
|
||||
}
|
||||
#idle_inhibitor.activated { background: @text; color: @base; }
|
||||
#network.disconnected { color: @red; }
|
||||
#battery.charging { color: @text; }
|
||||
#battery.warning:not(.charging) { color: @yellow; }
|
||||
#battery.critical:not(.charging) { color: @red; animation: blink 1s steps(2) infinite; }
|
||||
#temperature.critical { color: @red; }
|
||||
#custom-notification { padding: 0 14px; }
|
||||
#custom-power { padding: 0 14px; }
|
||||
#custom-power:hover { background: @red; color: @base; border-color: @red; }
|
||||
|
||||
@keyframes blink { to { background: alpha(@red, 0.5); } }
|
||||
|
||||
tooltip { background: alpha(@base, 0.85); border: 1px solid alpha(@text, 0.12); border-radius: 12px; }
|
||||
tooltip label { color: @text; padding: 2px; }
|
||||
|
||||
/* collapsible hardware drawer */
|
||||
#hw { background: alpha(@base, 0.55); border: 1px solid alpha(@text, 0.08); border-radius: 14px; padding: 0 4px; transition: all 0.25s ease; }
|
||||
#hw:hover { border-color: alpha(@text, 0.25); }
|
||||
#hw #custom-hw, #hw #temperature, #hw #cpu, #hw #memory { background: transparent; border: none; box-shadow: none; }
|
||||
#custom-hw { color: @subtext; }
|
||||
Reference in New Issue
Block a user