initial release
This commit is contained in:
1 parent
96ab3df34e
commit
9876e39216
57 files changed
+5301
-1
No files matched your search
@@ -0,0 +1,102 @@
|
||||
# ~/.config/fish/config.fish
|
||||
# Breeze-Dark-Farbschema für fish
|
||||
|
||||
# ---------- PATH ----------
|
||||
# opencode
|
||||
if test -d "$HOME/.opencode/bin"; and not contains -- "$HOME/.opencode/bin" $PATH
|
||||
set -gx PATH "$HOME/.opencode/bin" $PATH
|
||||
end
|
||||
|
||||
# Node.js (nvm)
|
||||
# Standardversion aus ~/.nvm/alias/default ableiten, damit der Pfad auch
|
||||
# nach einem nvm-Versionswechsel stimmt ("26", "v26.13.0", "lts/*").
|
||||
set -gx NVM_DIR "$HOME/.nvm"
|
||||
if test -d "$HOME/.nvm/versions/node"
|
||||
set -l nvm_alias
|
||||
if test -f "$HOME/.nvm/alias/default"
|
||||
set nvm_alias (string trim < "$HOME/.nvm/alias/default")
|
||||
end
|
||||
# Verschachtelte Aliase wie lts/* -> lts/lithium -> v26.13.0 auflösen
|
||||
for i in 1 2 3
|
||||
test -n "$nvm_alias"; or break
|
||||
test -f "$HOME/.nvm/alias/$nvm_alias"; or break
|
||||
set nvm_alias (string trim < "$HOME/.nvm/alias/$nvm_alias")
|
||||
end
|
||||
|
||||
set -l nvm_matches
|
||||
if test -n "$nvm_alias"
|
||||
for d in "$HOME"/.nvm/versions/node/v$nvm_alias.* "$HOME"/.nvm/versions/node/$nvm_alias
|
||||
test -x "$d/bin/node"; and set -a nvm_matches $d
|
||||
end
|
||||
end
|
||||
# Ohne auflösbaren Alias: neueste installierte Version nehmen
|
||||
if test (count $nvm_matches) -eq 0
|
||||
for d in "$HOME"/.nvm/versions/node/*/
|
||||
test -x "$d/bin/node"; and set -a nvm_matches (string trim -r -c / -- $d)
|
||||
end
|
||||
end
|
||||
|
||||
if test (count $nvm_matches) -gt 0
|
||||
set -l nvm_bin (printf '%s\n' $nvm_matches | sort -V | tail -n 1)/bin
|
||||
if not contains -- "$nvm_bin" $PATH
|
||||
set -gx PATH "$nvm_bin" $PATH
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Eigene Skripte
|
||||
if test -d "$HOME/.local/bin"; and not contains -- "$HOME/.local/bin" $PATH
|
||||
set -gx PATH "$HOME/.local/bin" $PATH
|
||||
end
|
||||
|
||||
# Flatpak-Programme (z. B. org.mozilla.firefox)
|
||||
for dir in /var/lib/flatpak/exports/bin "$HOME/.local/share/flatpak/exports/bin"
|
||||
if test -d "$dir"; and not contains -- "$dir" $PATH
|
||||
set -gx PATH $PATH "$dir"
|
||||
end
|
||||
end
|
||||
|
||||
# Systemwerkzeuge aus sbin (z. B. gparted, adduser, halt, blkid)
|
||||
for dir in /usr/local/sbin /usr/sbin /sbin
|
||||
if test -d "$dir"; and not contains -- "$dir" $PATH
|
||||
set -gx PATH $PATH "$dir"
|
||||
end
|
||||
end
|
||||
|
||||
# ---------- X11 / XWayland ----------
|
||||
# SSH-Sitzungen haben kein DISPLAY. labwc stellt XWayland auf :0 bereit,
|
||||
# damit X11-Programme (als Benutzer) auf dem Desktop erscheinen.
|
||||
# Für als root gestartete X11-Programme reicht DISPLAY nicht; GParted
|
||||
# nutzt stattdessen die Wayland-Anzeige (siehe /usr/sbin/gparted).
|
||||
if not set -q DISPLAY; and test -S /tmp/.X11-unix/X0
|
||||
set -gx DISPLAY :0
|
||||
end
|
||||
|
||||
if status is-interactive
|
||||
set -gx EDITOR nano
|
||||
set -gx VISUAL nano
|
||||
set -gx PAGER less
|
||||
set -gx MANPAGER 'less -R'
|
||||
set -gx TERMINAL kitty
|
||||
|
||||
# Pfadanzeige im Prompt: vollständig, aber mit ~ abgekürzt
|
||||
set -g fish_prompt_pwd_dir_length 0
|
||||
|
||||
# Farben stehen in ~/.config/fish/conf.d/10-theme.fish
|
||||
# (wird vom Desktop-Theme hell/dunkel gesetzt)
|
||||
|
||||
# ---------- Abkürzungen ----------
|
||||
abbr -a ls 'ls --color=auto'
|
||||
abbr -a ll 'ls -lah --color=auto'
|
||||
abbr -a la 'ls -A --color=auto'
|
||||
abbr -a lt 'ls -lah --color=auto --sort=time'
|
||||
abbr -a .. 'cd ..'
|
||||
abbr -a ... 'cd ../..'
|
||||
abbr -a c clear
|
||||
abbr -a df 'df -h'
|
||||
abbr -a free 'free -h'
|
||||
abbr -a ff fastfetch
|
||||
abbr -a files thunar
|
||||
abbr -a reload 'pkill -HUP -x labwc'
|
||||
abbr -a session session-menu
|
||||
end
|
||||
@@ -0,0 +1,12 @@
|
||||
function fish_greeting
|
||||
if status is-login
|
||||
set_color $theme_muted
|
||||
echo " Willkommen, $USER."
|
||||
echo " Desktop starten: "
|
||||
set_color $theme_accent
|
||||
echo -n " startlabwc"
|
||||
set_color $theme_muted
|
||||
echo " (nur auf der lokalen Konsole)"
|
||||
set_color normal
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,36 @@
|
||||
function fish_prompt
|
||||
set -l last_status $status
|
||||
set -l normal (set_color $theme_normal)
|
||||
set -l dim (set_color $theme_muted)
|
||||
set -l accent (set_color $theme_accent)
|
||||
set -l red (set_color $theme_danger)
|
||||
set -l green (set_color $theme_success)
|
||||
|
||||
# Erste Zeile: ╭─ [user@host] ~/pfad on branch
|
||||
echo -n "$dim╭─$normal"
|
||||
|
||||
if set -q SSH_CONNECTION
|
||||
echo -n " $dim$USER@"(prompt_hostname)"$normal"
|
||||
end
|
||||
|
||||
echo -n " $accent"(prompt_pwd)$normal
|
||||
|
||||
if command -q git
|
||||
set -l branch (command git symbolic-ref --short HEAD 2>/dev/null)
|
||||
if test -z "$branch"
|
||||
set branch (command git rev-parse --short HEAD 2>/dev/null)
|
||||
end
|
||||
if test -n "$branch"
|
||||
echo -n " $dim"on"$normal $green$branch$normal"
|
||||
end
|
||||
end
|
||||
|
||||
echo
|
||||
|
||||
# Zweite Zeile: ╰─❯
|
||||
if test $last_status -ne 0
|
||||
echo -n "$dim╰─$red❯$normal "
|
||||
else
|
||||
echo -n "$dim╰─$accent❯$normal "
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
function fish_right_prompt
|
||||
set -l dim (set_color $theme_muted)
|
||||
echo -n "$dim"(date '+%H:%M')" "(set_color normal)
|
||||
end
|
||||
@@ -0,0 +1,24 @@
|
||||
function startlabwc --description 'Startet labwc auf der lokalen Konsole'
|
||||
if set -q WAYLAND_DISPLAY
|
||||
set_color $theme_danger
|
||||
echo "Wayland läuft bereits (WAYLAND_DISPLAY=$WAYLAND_DISPLAY)."
|
||||
set_color normal
|
||||
return 1
|
||||
end
|
||||
|
||||
# QEMU/bochs-drm: kein OpenGL, keine Hardware-Cursor
|
||||
set -lx WLR_RENDERER pixman
|
||||
set -lx WLR_NO_HARDWARE_CURSORS 1
|
||||
set -lx XKB_DEFAULT_LAYOUT de
|
||||
set -lx XDG_SESSION_TYPE wayland
|
||||
|
||||
set_color $theme_muted
|
||||
echo "Starte labwc (pixman, Software-Rendering) ..."
|
||||
set_color normal
|
||||
|
||||
if command -q dbus-run-session
|
||||
exec dbus-run-session -- labwc
|
||||
else
|
||||
exec labwc
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,53 @@
|
||||
# kitty – gemeinsame Einstellungen für Breeze Dark/Light
|
||||
# Die Farben stehen in theme.conf und werden vom Desktop-Theme ersetzt.
|
||||
|
||||
font_family JetBrains Mono
|
||||
font_size 10
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
|
||||
# Shell: fish. Die Login-Shell wird zusätzlich einmalig per chsh gesetzt.
|
||||
shell /usr/bin/fish
|
||||
|
||||
cursor_shape beam
|
||||
cursor_blink_interval 0
|
||||
scrollback_lines 10000
|
||||
|
||||
# foot-Padding 12x9 px optisch übernommen (kitty rechnet in pt)
|
||||
window_padding_width 9 12
|
||||
|
||||
# Startgröße wie bei foot, Größe nicht dauerhaft merken
|
||||
remember_window_size no
|
||||
initial_window_width 1100
|
||||
initial_window_height 680
|
||||
|
||||
# Ghostty-artige Splits: kitty startet direkt im splits-Layout.
|
||||
# (Das Standard-Layout "fat" würde vsplit/hsplit ignorieren.)
|
||||
enabled_layouts splits
|
||||
|
||||
# Neues Fenster rechts daneben (vertikale Trennlinie)
|
||||
map ctrl+shift+enter launch --location=vsplit --cwd=current
|
||||
# Neues Fenster darunter (horizontale Trennlinie)
|
||||
map ctrl+shift+alt+enter launch --location=hsplit --cwd=current
|
||||
# Alternativ mit Pfeiltasten (gleiche Aktion)
|
||||
map ctrl+shift+alt+right launch --location=vsplit --cwd=current
|
||||
map ctrl+shift+alt+down launch --location=hsplit --cwd=current
|
||||
|
||||
# Tabs (kitty-Standard):
|
||||
# ctrl+shift+t neuer Tab
|
||||
# ctrl+shift+q Tab schließen
|
||||
# ctrl+shift+left/right Tab wechseln
|
||||
# ctrl+shift+l Layout wechseln (hier nur "splits")
|
||||
#
|
||||
# Fenster/Splits:
|
||||
# ctrl+shift+w Fenster schließen
|
||||
# ctrl+shift+] / [ nächstes/vorheriges Fenster
|
||||
# ctrl+shift+r Größe ändern (Pfeiltasten), Enter beendet
|
||||
|
||||
# Tab-Leiste oben, erst ab zwei Tabs sichtbar
|
||||
tab_bar_edge top
|
||||
tab_bar_style fade
|
||||
tab_bar_min_tabs 2
|
||||
|
||||
include theme.conf
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openbox_menu>
|
||||
|
||||
<menu id="root-menu">
|
||||
<item label="Terminal">
|
||||
<action name="Execute" command="kitty" />
|
||||
</item>
|
||||
<item label="Dateien">
|
||||
<action name="Execute" command="thunar" />
|
||||
</item>
|
||||
<item label="Anwendungen">
|
||||
<action name="Execute" command="fuzzel" />
|
||||
</item>
|
||||
<item label="Screenshot (Bereich)">
|
||||
<action name="Execute" command="screenshot region" />
|
||||
</item>
|
||||
<item label="Screenshot (ganzer Bildschirm)">
|
||||
<action name="Execute" command="screenshot full" />
|
||||
</item>
|
||||
<separator />
|
||||
<item label="Sitzung">
|
||||
<action name="Execute" command="session-menu" />
|
||||
</item>
|
||||
<item label="Neu laden">
|
||||
<action name="Reconfigure" />
|
||||
</item>
|
||||
<separator />
|
||||
<item label="labwc beenden">
|
||||
<action name="Exit" />
|
||||
</item>
|
||||
</menu>
|
||||
|
||||
</openbox_menu>
|
||||
@@ -0,0 +1,206 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
labwc – minimaler, dunkler Desktop
|
||||
Farben: Breeze-Dark-Anlehnung
|
||||
Hintergrund #1b1e20
|
||||
Text #eff0f1
|
||||
Akzent #3daee9
|
||||
-->
|
||||
<labwc_config>
|
||||
|
||||
<core>
|
||||
<decoration>server</decoration>
|
||||
<gap>0</gap>
|
||||
<adaptiveSync>no</adaptiveSync>
|
||||
<allowTearing>no</allowTearing>
|
||||
<autoEnableOutputs>yes</autoEnableOutputs>
|
||||
<reuseOutputMode>yes</reuseOutputMode>
|
||||
</core>
|
||||
|
||||
<placement>
|
||||
<policy>cascade</policy>
|
||||
</placement>
|
||||
|
||||
<theme>
|
||||
<cornerRadius>8</cornerRadius>
|
||||
<keepBorder>yes</keepBorder>
|
||||
<dropShadows>yes</dropShadows>
|
||||
<titlebar>
|
||||
<layout>icon:iconify,max,close</layout>
|
||||
<showTitle>yes</showTitle>
|
||||
</titlebar>
|
||||
<font place="ActiveWindow">
|
||||
<name>DejaVu Sans</name>
|
||||
<size>10</size>
|
||||
<weight>bold</weight>
|
||||
</font>
|
||||
<font place="InactiveWindow">
|
||||
<name>DejaVu Sans</name>
|
||||
<size>10</size>
|
||||
</font>
|
||||
<font place="MenuHeader">
|
||||
<name>DejaVu Sans</name>
|
||||
<size>10</size>
|
||||
</font>
|
||||
<font place="MenuItem">
|
||||
<name>DejaVu Sans</name>
|
||||
<size>10</size>
|
||||
</font>
|
||||
<font place="OnScreenDisplay">
|
||||
<name>DejaVu Sans</name>
|
||||
<size>10</size>
|
||||
</font>
|
||||
</theme>
|
||||
|
||||
<desktops>
|
||||
<number>4</number>
|
||||
<popupTime>500</popupTime>
|
||||
<prefix>Desktop</prefix>
|
||||
</desktops>
|
||||
|
||||
<windowSwitcher show="yes" preview="yes" outlines="yes" allWorkspaces="no">
|
||||
<fields>
|
||||
<field content="type" width="20%" />
|
||||
<field content="trimmed_identifier" width="30%" />
|
||||
<field content="title" width="50%" />
|
||||
</fields>
|
||||
</windowSwitcher>
|
||||
|
||||
<keyboard>
|
||||
<default />
|
||||
<repeatRate>30</repeatRate>
|
||||
<repeatDelay>500</repeatDelay>
|
||||
|
||||
<!-- Terminal / Launcher / Menü -->
|
||||
<keybind key="W-Return">
|
||||
<action name="Execute" command="kitty" />
|
||||
</keybind>
|
||||
<keybind key="W-d">
|
||||
<action name="Execute" command="fuzzel" />
|
||||
</keybind>
|
||||
<keybind key="W-e">
|
||||
<action name="Execute" command="thunar" />
|
||||
</keybind>
|
||||
<keybind key="W-space">
|
||||
<action name="Execute" command="fuzzel" />
|
||||
</keybind>
|
||||
<keybind key="W-Menu">
|
||||
<action name="ShowMenu" menu="root-menu" />
|
||||
</keybind>
|
||||
|
||||
<!-- Fenster -->
|
||||
<keybind key="W-q">
|
||||
<action name="Close" />
|
||||
</keybind>
|
||||
<keybind key="W-m">
|
||||
<action name="ToggleMaximize" />
|
||||
</keybind>
|
||||
<keybind key="W-f">
|
||||
<action name="ToggleFullscreen" />
|
||||
</keybind>
|
||||
<keybind key="W-a">
|
||||
<action name="ToggleAlwaysOnTop" />
|
||||
</keybind>
|
||||
<keybind key="W-Tab">
|
||||
<action name="NextWindow" />
|
||||
</keybind>
|
||||
<keybind key="W-S-Tab">
|
||||
<action name="PreviousWindow" />
|
||||
</keybind>
|
||||
|
||||
<!-- Fenster an Bildschirmkanten andocken -->
|
||||
<keybind key="W-Left">
|
||||
<action name="ToggleSnapToEdge" direction="left" />
|
||||
</keybind>
|
||||
<keybind key="W-Right">
|
||||
<action name="ToggleSnapToEdge" direction="right" />
|
||||
</keybind>
|
||||
<keybind key="W-Up">
|
||||
<action name="ToggleSnapToEdge" direction="up" />
|
||||
</keybind>
|
||||
<keybind key="W-Down">
|
||||
<action name="ToggleSnapToEdge" direction="down" />
|
||||
</keybind>
|
||||
|
||||
<!-- Virtuelle Desktops -->
|
||||
<keybind key="W-1">
|
||||
<action name="GoToDesktop" to="1" />
|
||||
</keybind>
|
||||
<keybind key="W-2">
|
||||
<action name="GoToDesktop" to="2" />
|
||||
</keybind>
|
||||
<keybind key="W-3">
|
||||
<action name="GoToDesktop" to="3" />
|
||||
</keybind>
|
||||
<keybind key="W-4">
|
||||
<action name="GoToDesktop" to="4" />
|
||||
</keybind>
|
||||
<keybind key="W-S-1">
|
||||
<action name="SendToDesktop" to="1" follow="yes" />
|
||||
</keybind>
|
||||
<keybind key="W-S-2">
|
||||
<action name="SendToDesktop" to="2" follow="yes" />
|
||||
</keybind>
|
||||
<keybind key="W-S-3">
|
||||
<action name="SendToDesktop" to="3" follow="yes" />
|
||||
</keybind>
|
||||
<keybind key="W-S-4">
|
||||
<action name="SendToDesktop" to="4" follow="yes" />
|
||||
</keybind>
|
||||
<!-- Aktives Fenster eine Arbeitsfläche weiter schieben -->
|
||||
<keybind key="W-S-Left">
|
||||
<action name="SendToDesktop" to="left" follow="yes" wrap="yes" />
|
||||
</keybind>
|
||||
<keybind key="W-S-Right">
|
||||
<action name="SendToDesktop" to="right" follow="yes" wrap="yes" />
|
||||
</keybind>
|
||||
|
||||
<!-- Lautstärke (keine Medientasten nötig) -->
|
||||
<keybind key="W-S-Up">
|
||||
<action name="Execute" command="wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" />
|
||||
</keybind>
|
||||
<keybind key="W-S-Down">
|
||||
<action name="Execute" command="wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" />
|
||||
</keybind>
|
||||
<keybind key="W-S-m">
|
||||
<action name="Execute" command="wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" />
|
||||
</keybind>
|
||||
|
||||
<!-- Screenshots -->
|
||||
<keybind key="Print">
|
||||
<action name="Execute" command="screenshot full" />
|
||||
</keybind>
|
||||
<keybind key="S-Print">
|
||||
<action name="Execute" command="screenshot region" />
|
||||
</keybind>
|
||||
<keybind key="W-S-s">
|
||||
<action name="Execute" command="screenshot region" />
|
||||
</keybind>
|
||||
|
||||
<!-- Bildschirm sperren -->
|
||||
<keybind key="W-l">
|
||||
<action name="Execute" command="idle-action lock-now" />
|
||||
</keybind>
|
||||
|
||||
<!-- Sitzung / Konfiguration -->
|
||||
<keybind key="W-x">
|
||||
<action name="Execute" command="session-menu" />
|
||||
</keybind>
|
||||
<keybind key="W-r">
|
||||
<action name="Reconfigure" />
|
||||
</keybind>
|
||||
<keybind key="W-S-q">
|
||||
<action name="Execute" command="session-menu" />
|
||||
</keybind>
|
||||
</keyboard>
|
||||
|
||||
<mouse>
|
||||
<default />
|
||||
<context name="Root">
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="ShowMenu" menu="root-menu" />
|
||||
</mousebind>
|
||||
</context>
|
||||
</mouse>
|
||||
|
||||
</labwc_config>
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
# labwc – Shutdown: laufende Panel-/Hintergrundprozesse sauber beenden.
|
||||
|
||||
pkill -TERM -x waybar >/dev/null 2>&1
|
||||
pkill -TERM -x mako >/dev/null 2>&1
|
||||
pkill -TERM -x swaybg >/dev/null 2>&1
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,25 @@
|
||||
[Default Applications]
|
||||
image/png=org.gnome.Loupe.desktop
|
||||
image/jpeg=org.gnome.Loupe.desktop
|
||||
image/gif=org.gnome.Loupe.desktop
|
||||
image/webp=org.gnome.Loupe.desktop
|
||||
image/bmp=org.gnome.Loupe.desktop
|
||||
image/tiff=org.gnome.Loupe.desktop
|
||||
image/svg+xml=org.gnome.Loupe.desktop
|
||||
application/pdf=org.gnome.Evince.desktop
|
||||
x-scheme-handler/http=org.mozilla.firefox.desktop
|
||||
x-scheme-handler/https=org.mozilla.firefox.desktop
|
||||
text/html=org.mozilla.firefox.desktop
|
||||
|
||||
[Added Associations]
|
||||
image/png=org.gnome.Loupe.desktop;
|
||||
image/jpeg=org.gnome.Loupe.desktop;
|
||||
image/gif=org.gnome.Loupe.desktop;
|
||||
image/webp=org.gnome.Loupe.desktop;
|
||||
image/bmp=org.gnome.Loupe.desktop;
|
||||
image/tiff=org.gnome.Loupe.desktop;
|
||||
image/svg+xml=org.gnome.Loupe.desktop;
|
||||
application/pdf=org.gnome.Evince.desktop;
|
||||
x-scheme-handler/http=org.mozilla.firefox.desktop;
|
||||
x-scheme-handler/https=org.mozilla.firefox.desktop;
|
||||
text/html=org.mozilla.firefox.desktop;
|
||||
@@ -0,0 +1,107 @@
|
||||
{
|
||||
"layer": "top",
|
||||
"position": "bottom",
|
||||
"height": 34,
|
||||
"spacing": 3,
|
||||
"exclusive": true,
|
||||
"reload_style_on_change": true,
|
||||
|
||||
"modules-left": [
|
||||
"custom/launcher",
|
||||
"wlr/taskbar"
|
||||
],
|
||||
|
||||
"modules-center": [],
|
||||
|
||||
"modules-right": [
|
||||
"tray",
|
||||
"network",
|
||||
"wireplumber",
|
||||
"cpu",
|
||||
"memory",
|
||||
"custom/session",
|
||||
"clock"
|
||||
],
|
||||
|
||||
"custom/launcher": {
|
||||
"format": "☰",
|
||||
"tooltip": true,
|
||||
"tooltip-format": "Anwendungen (Super+D)",
|
||||
"on-click": "fuzzel"
|
||||
},
|
||||
|
||||
"wlr/taskbar": {
|
||||
"all-outputs": true,
|
||||
"format": "{icon}",
|
||||
"icon-size": 16,
|
||||
"sort-by-app-id": true,
|
||||
"icon-theme": ["Qogir-Manjaro-Dark", "Adwaita"],
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{name}\n{title}",
|
||||
"on-click": "minimize-raise",
|
||||
"on-click-middle": "close",
|
||||
"on-click-right": "minimize-raise"
|
||||
},
|
||||
|
||||
"clock": {
|
||||
"interval": 30,
|
||||
"format": "{:%H:%M}",
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{:%d.%m.%Y}"
|
||||
},
|
||||
|
||||
"tray": {
|
||||
"icon-size": 16,
|
||||
"spacing": 8,
|
||||
"show-passive-items": true
|
||||
},
|
||||
|
||||
"network": {
|
||||
"interval": 5,
|
||||
"align": 0.5,
|
||||
"justify": "center",
|
||||
"format-wifi": "\uf1eb {signalStrength}%",
|
||||
"format-ethernet": "\udb80\udf17 LAN",
|
||||
"format-disconnected": "\uf05e offline",
|
||||
"tooltip": true,
|
||||
"tooltip-format-wifi": "{ifname} · {essid} · {signalStrength}%",
|
||||
"tooltip-format-ethernet": "{ifname} · {ipaddr}",
|
||||
"tooltip-format-disconnected": "Keine Verbindung"
|
||||
},
|
||||
|
||||
"cpu": {
|
||||
"interval": 3,
|
||||
"align": 0.5,
|
||||
"justify": "center",
|
||||
"format": "\uf2db {usage}%",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"wireplumber": {
|
||||
"align": 0.5,
|
||||
"justify": "center",
|
||||
"format": "\uf028 {volume}%",
|
||||
"format-muted": "\uf026",
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{node_name} · {volume}%",
|
||||
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
|
||||
"scroll-step": 5.0,
|
||||
"max-volume": 100.0
|
||||
},
|
||||
|
||||
"memory": {
|
||||
"interval": 5,
|
||||
"align": 0.5,
|
||||
"justify": "center",
|
||||
"format": "\udb80\udf5b {percentage}%",
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{used:0.1f} GiB / {total:0.1f} GiB"
|
||||
},
|
||||
|
||||
"custom/session": {
|
||||
"format": "⚙",
|
||||
"tooltip": true,
|
||||
"tooltip-format": "Sitzung (Super+X)",
|
||||
"on-click": "session-menu"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
# labwc: gnome-keyring als Secret-Backend für Flatpak-Apps (z. B. Element)
|
||||
[preferred]
|
||||
default=wlr;*
|
||||
org.freedesktop.impl.portal.Inhibit=none
|
||||
org.freedesktop.impl.portal.Secret=gnome-keyring
|
||||
@@ -0,0 +1,5 @@
|
||||
# XFCE/exo – bevorzugte Anwendungen
|
||||
# Wird u. a. von Thunar („Ordner im Terminal öffnen“) und exo-open gelesen.
|
||||
# Kein [Default]-Header: exo setzt ihn selbst vor den Dateiinhalt.
|
||||
|
||||
TerminalEmulator=kitty
|
||||
Executable
+131
@@ -0,0 +1,131 @@
|
||||
#!/bin/sh
|
||||
# greeter-theme – trägt das tuigreet-Theme in /etc/greetd/config.toml ein.
|
||||
#
|
||||
# Aufruf:
|
||||
# greeter-theme nur schreiben, aktiv beim nächsten Login/Neustart
|
||||
# greeter-theme --restart greetd sofort neu starten (beendet ggf. die Sitzung!)
|
||||
#
|
||||
# Das Theme selbst steht in ~/.config/tuigreet/theme.conf.
|
||||
|
||||
set -eu
|
||||
|
||||
usage() {
|
||||
cat <<'EOF'
|
||||
Aufruf: greeter-theme [--restart]
|
||||
|
||||
Ohne --restart wird nur /etc/greetd/config.toml geschrieben und ein Backup
|
||||
der alten Datei angelegt. Das neue Theme greift nach dem nächsten Neustart
|
||||
(oder nach einem Neustart von greetd).
|
||||
EOF
|
||||
}
|
||||
|
||||
restart=0
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--restart) restart=1 ;;
|
||||
-h|--help) usage; exit 0 ;;
|
||||
*) echo "Unbekannte Option: $arg" >&2; usage >&2; exit 2 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Ohne Root automatisch über sudo erneut starten.
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
self=$(command -v "$0" 2>/dev/null || true)
|
||||
[ -n "$self" ] || self=$0
|
||||
self=$(readlink -f "$self")
|
||||
exec sudo -- "$self" "$@"
|
||||
fi
|
||||
|
||||
# Home des aufrufenden Benutzers ermitteln (auch unter sudo).
|
||||
user=${SUDO_USER:-$(id -un)}
|
||||
if [ "$user" = root ]; then
|
||||
home=/root
|
||||
else
|
||||
home=$(getent passwd "$user" | cut -d: -f6)
|
||||
fi
|
||||
|
||||
theme_file="$home/.config/tuigreet/theme.conf"
|
||||
conf=/etc/greetd/config.toml
|
||||
|
||||
if [ ! -r "$theme_file" ]; then
|
||||
echo "Fehlt: $theme_file" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
theme=$(tr -d '\n' < "$theme_file")
|
||||
|
||||
# Nur harmlose Zeichen für den TOML-String zulassen.
|
||||
if [ -z "$theme" ] || printf '%s' "$theme" | LC_ALL=C grep -q '[^A-Za-z0-9=;.#_-]'; then
|
||||
echo "Ungültiges Theme in $theme_file" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Backup der bestehenden Konfiguration
|
||||
stamp=$(date +%Y%m%d-%H%M%S)
|
||||
if [ -f "$conf" ]; then
|
||||
cp -a "$conf" "$conf.bak.$stamp"
|
||||
echo "Backup: $conf.bak.$stamp"
|
||||
fi
|
||||
|
||||
umask 022
|
||||
cat > "$conf" <<EOF
|
||||
# greetd – verwaltet von greeter-theme
|
||||
# Stand: $(date '+%Y-%m-%d %H:%M:%S')
|
||||
|
||||
[terminal]
|
||||
vt = 7
|
||||
|
||||
[default_session]
|
||||
command = "tuigreet --time --remember --remember-session --cmd labwc --power-shutdown '/usr/bin/systemctl poweroff' --power-reboot '/usr/bin/systemctl reboot' --theme '$theme'"
|
||||
user = "_greetd"
|
||||
EOF
|
||||
|
||||
chmod 644 "$conf"
|
||||
echo "Geschrieben: $conf"
|
||||
|
||||
# Shutdown/Reboot im Greeter.
|
||||
#
|
||||
# tuigreet startet die Standardbefehle "shutdown -h now" bzw.
|
||||
# "shutdown -r now". Beide liegen in /usr/sbin und rufen intern
|
||||
# systemctl auf. Der Greeter läuft als _greetd in keiner aktiven
|
||||
# logind-Sitzung; deshalb verweigert polkit die Aktion, obwohl
|
||||
# allow_active=yes gesetzt ist. Absolute Pfade umgehen das PATH-Problem,
|
||||
# die Regel erlaubt _greetd genau die beiden Power-Aktionen.
|
||||
polkit_rule=/etc/polkit-1/rules.d/49-greetd-power.rules
|
||||
if [ -d /etc/polkit-1/rules.d ]; then
|
||||
if [ -f "$polkit_rule" ]; then
|
||||
cp -a "$polkit_rule" "$polkit_rule.bak.$stamp"
|
||||
echo "Backup: $polkit_rule.bak.$stamp"
|
||||
fi
|
||||
cat > "$polkit_rule" <<'EOF'
|
||||
// Erlaubt dem Greeter-Benutzer _greetd, das System herunterzufahren
|
||||
// oder neu zu starten. Der Greeter läuft in keiner aktiven logind-
|
||||
// Sitzung; die Standardregel (allow_active=yes) greift daher nicht.
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (subject.user != "_greetd")
|
||||
return;
|
||||
|
||||
if (action.id == "org.freedesktop.login1.power-off" ||
|
||||
action.id == "org.freedesktop.login1.power-off-multiple-sessions" ||
|
||||
action.id == "org.freedesktop.login1.reboot" ||
|
||||
action.id == "org.freedesktop.login1.reboot-multiple-sessions") {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
EOF
|
||||
chmod 644 "$polkit_rule"
|
||||
echo "Geschrieben: $polkit_rule"
|
||||
else
|
||||
echo "Hinweis: /etc/polkit-1/rules.d fehlt – Power-Aktionen bleiben gesperrt." >&2
|
||||
fi
|
||||
|
||||
if [ "$restart" -eq 1 ]; then
|
||||
echo
|
||||
echo "WARNUNG: Ein Neustart von greetd kann die laufende Sitzung beenden."
|
||||
systemctl restart greetd
|
||||
else
|
||||
echo
|
||||
echo "Aktiv nach dem nächsten Neustart."
|
||||
echo "Sofort anwenden (beendet ggf. die laufende Sitzung):"
|
||||
echo " sudo systemctl restart greetd"
|
||||
fi
|
||||
Executable
+145
@@ -0,0 +1,145 @@
|
||||
#!/bin/sh
|
||||
# idle-action – Aktionen für swayidle, mit Rücksicht auf Medienwiedergabe.
|
||||
#
|
||||
# idle-action lock sperrt den Bildschirm, wartet aber, solange
|
||||
# Audio/Video über PipeWire läuft
|
||||
# idle-action lock-now sperrt sofort (für before-sleep/logind-Lock)
|
||||
# idle-action dpms-off schaltet den Monitor aus, ebenfalls erst wenn
|
||||
# keine Medienwiedergabe mehr läuft
|
||||
# idle-action suspend versetzt den Rechner in Ruhezustand (Suspend),
|
||||
# ebenfalls erst wenn keine Medienwiedergabe läuft
|
||||
# idle-action resume bricht wartende Aktionen ab und schaltet den
|
||||
# Monitor wieder ein
|
||||
# idle-action cancel bricht wartende Aktionen ab
|
||||
set -u
|
||||
|
||||
state_dir="${XDG_RUNTIME_DIR:-/tmp}/idle-action-$(id -u)"
|
||||
mkdir -p "$state_dir" 2>/dev/null || true
|
||||
|
||||
media_playing() {
|
||||
# Ist der Bildschirm bereits gesperrt, soll laufendes Audio den
|
||||
# Monitor nicht dauerhaft anlassen.
|
||||
pgrep -x swaylock >/dev/null 2>&1 && return 1
|
||||
|
||||
command -v pw-dump >/dev/null 2>&1 || return 1
|
||||
command -v python3 >/dev/null 2>&1 || return 1
|
||||
|
||||
pw-dump 2>/dev/null | python3 -c '
|
||||
import json, sys
|
||||
try:
|
||||
nodes = json.load(sys.stdin)
|
||||
except Exception:
|
||||
sys.exit(1)
|
||||
for node in nodes:
|
||||
if node.get("type") != "PipeWire:Interface:Node":
|
||||
continue
|
||||
info = node.get("info") or {}
|
||||
props = info.get("props") or {}
|
||||
if props.get("media.class", "").startswith("Stream/Output/") \
|
||||
and info.get("state") == "running":
|
||||
sys.exit(0)
|
||||
sys.exit(1)
|
||||
'
|
||||
}
|
||||
|
||||
cancel_pending() {
|
||||
for pidfile in "$state_dir"/*.pid; do
|
||||
[ -f "$pidfile" ] || continue
|
||||
kill "$(cat "$pidfile")" 2>/dev/null || true
|
||||
rm -f "$pidfile"
|
||||
done
|
||||
}
|
||||
|
||||
outputs() {
|
||||
wlr-randr --json 2>/dev/null | python3 -c '
|
||||
import json, sys
|
||||
try:
|
||||
data = json.load(sys.stdin)
|
||||
except Exception:
|
||||
sys.exit(0)
|
||||
for output in data:
|
||||
name = output.get("name")
|
||||
if name:
|
||||
print(name)
|
||||
'
|
||||
}
|
||||
|
||||
display_on() {
|
||||
if command -v wlopm >/dev/null 2>&1; then
|
||||
wlopm --on '*' >/dev/null 2>&1 || true
|
||||
elif command -v wlr-randr >/dev/null 2>&1; then
|
||||
outputs | while IFS= read -r output; do
|
||||
wlr-randr --output "$output" --on >/dev/null 2>&1 || true
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
display_off() {
|
||||
if command -v wlopm >/dev/null 2>&1; then
|
||||
wlopm --off '*' >/dev/null 2>&1 || true
|
||||
elif command -v wlr-randr >/dev/null 2>&1; then
|
||||
outputs | while IFS= read -r output; do
|
||||
wlr-randr --output "$output" --off >/dev/null 2>&1 || true
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
wait_for_media() {
|
||||
while media_playing; do
|
||||
sleep 5
|
||||
done
|
||||
# Kurze Schonfrist: startet die Wiedergabe gleich wieder, weiter warten.
|
||||
sleep 2
|
||||
media_playing && return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
lock_now() {
|
||||
# Nur eine Instanz starten. swaylock beendet sich bei
|
||||
# ext-session-lock ohnehin selbst, wenn bereits gesperrt ist.
|
||||
pgrep -x swaylock >/dev/null 2>&1 || swaylock -f
|
||||
}
|
||||
|
||||
run_action() {
|
||||
action=$1
|
||||
pidfile="$state_dir/$action.pid"
|
||||
|
||||
if [ -f "$pidfile" ]; then
|
||||
kill "$(cat "$pidfile")" 2>/dev/null || true
|
||||
rm -f "$pidfile"
|
||||
fi
|
||||
|
||||
(
|
||||
trap 'rm -f "$pidfile"' EXIT
|
||||
wait_for_media || exit 0
|
||||
rm -f "$pidfile"
|
||||
case "$action" in
|
||||
lock)
|
||||
lock_now
|
||||
;;
|
||||
dpms-off)
|
||||
display_off
|
||||
;;
|
||||
suspend)
|
||||
systemctl suspend
|
||||
;;
|
||||
esac
|
||||
) &
|
||||
echo $! > "$pidfile"
|
||||
}
|
||||
|
||||
case "${1:-}" in
|
||||
lock|dpms-off|suspend) run_action "$1" ;;
|
||||
lock-now) lock_now ;;
|
||||
resume)
|
||||
cancel_pending
|
||||
display_on
|
||||
;;
|
||||
cancel)
|
||||
cancel_pending
|
||||
;;
|
||||
*)
|
||||
echo "Aufruf: idle-action lock|lock-now|dpms-off|suspend|resume|cancel" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
Executable
+50
@@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
# screenshot – Bildschirmfoto unter labwc (Wayland)
|
||||
# Benötigt: grim, slurp, wl-clipboard (optional: libnotify-bin)
|
||||
|
||||
set -eu
|
||||
|
||||
mode="${1:-full}"
|
||||
dir="${XDG_PICTURES_DIR:-$HOME/Bilder}/Screenshots"
|
||||
mkdir -p "$dir"
|
||||
file="$dir/$(date +%Y-%m-%d_%H-%M-%S).png"
|
||||
|
||||
need() {
|
||||
if ! command -v "$1" >/dev/null 2>&1; then
|
||||
echo "screenshot: '$1' fehlt." >&2
|
||||
echo "Installieren mit: sudo apt install grim slurp wl-clipboard" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
need grim
|
||||
|
||||
case "$mode" in
|
||||
full)
|
||||
grim "$file"
|
||||
;;
|
||||
region)
|
||||
need slurp
|
||||
geom="$(slurp)" || exit 0
|
||||
grim -g "$geom" "$file"
|
||||
;;
|
||||
output)
|
||||
need slurp
|
||||
geom="$(slurp -o -r)" || exit 0
|
||||
grim -g "$geom" "$file"
|
||||
;;
|
||||
*)
|
||||
echo "Verwendung: screenshot [full|region|output]" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
# In die Zwischenablage kopieren
|
||||
if command -v wl-copy >/dev/null 2>&1; then
|
||||
wl-copy --type image/png < "$file"
|
||||
fi
|
||||
|
||||
# Kurze Benachrichtigung, falls libnotify vorhanden ist
|
||||
if command -v notify-send >/dev/null 2>&1; then
|
||||
notify-send -a Screenshot "Screenshot gespeichert" "$file"
|
||||
fi
|
||||
Executable
+54
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env bash
|
||||
# Sitzungsmenü für labwc (fuzzel --dmenu)
|
||||
|
||||
set -uo pipefail
|
||||
|
||||
if ! command -v fuzzel >/dev/null 2>&1; then
|
||||
echo "fuzzel ist nicht installiert." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
choice=$(
|
||||
printf '%s\n' \
|
||||
"Bildschirm sperren" \
|
||||
"Standby (Ruhezustand)" \
|
||||
"labwc neu laden" \
|
||||
"labwc beenden" \
|
||||
"Neu starten" \
|
||||
"Herunterfahren" \
|
||||
"Abbrechen" |
|
||||
fuzzel --dmenu --prompt='Sitzung ' --lines=7 --width=26 --anchor=center
|
||||
) || exit 0
|
||||
|
||||
lock_now() {
|
||||
if command -v idle-action >/dev/null 2>&1; then
|
||||
idle-action lock-now
|
||||
else
|
||||
pgrep -x swaylock >/dev/null 2>&1 || swaylock -f
|
||||
fi
|
||||
}
|
||||
|
||||
case "$choice" in
|
||||
"Bildschirm sperren")
|
||||
lock_now
|
||||
;;
|
||||
"Standby (Ruhezustand)")
|
||||
lock_now
|
||||
systemctl suspend
|
||||
;;
|
||||
"labwc neu laden")
|
||||
pkill -HUP -x labwc
|
||||
;;
|
||||
"labwc beenden")
|
||||
pkill -TERM -x labwc
|
||||
;;
|
||||
"Neu starten")
|
||||
systemctl reboot
|
||||
;;
|
||||
"Herunterfahren")
|
||||
systemctl poweroff
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
Executable
+165
@@ -0,0 +1,165 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Setzt Icon-, GTK-, Cursor- und Schrift-Einstellungen über GSettings.
|
||||
|
||||
Aufruf:
|
||||
set-gtk-settings [dark|light]
|
||||
|
||||
Standard ist ``dark``. Hintergrund: Unter Wayland (labwc/sway) liest GDK/GTK
|
||||
die Einstellungen über das XDG-Desktop-Portal aus
|
||||
``org.gnome.desktop.interface``. Eine ``~/.config/gtk-3.0/settings.ini``
|
||||
allein wird von GDK überschrieben, sobald das Portal erreichbar ist.
|
||||
|
||||
Das Skript braucht keine ``gsettings``-CLI; es nutzt libgio direkt über
|
||||
ctypes. Es ist idempotent und kann jederzeit erneut ausgeführt werden.
|
||||
"""
|
||||
|
||||
import ctypes as C
|
||||
import sys
|
||||
|
||||
SCHEMA = b"org.gnome.desktop.interface"
|
||||
WM_SCHEMA = b"org.gnome.desktop.wm.preferences"
|
||||
BUTTON_LAYOUT = "appmenu:minimize,maximize,close"
|
||||
|
||||
THEMES = {
|
||||
"dark": {
|
||||
"icon-theme": "Qogir-Manjaro-Dark",
|
||||
"gtk-theme": "Arc-Darker",
|
||||
"cursor-theme": "Qogir-Manjaro-Dark",
|
||||
"color-scheme": "prefer-dark",
|
||||
},
|
||||
"light": {
|
||||
"icon-theme": "Qogir-Manjaro",
|
||||
"gtk-theme": "Arc",
|
||||
"cursor-theme": "Qogir-Manjaro",
|
||||
"color-scheme": "prefer-light",
|
||||
},
|
||||
}
|
||||
|
||||
STRINGS = {
|
||||
"font-name": "DejaVu Sans 9",
|
||||
"monospace-font-name": "JetBrains Mono 10",
|
||||
}
|
||||
INTS = {
|
||||
"cursor-size": 24,
|
||||
}
|
||||
BOOLS = {
|
||||
"enable-animations": True,
|
||||
}
|
||||
|
||||
|
||||
def load_libs():
|
||||
gio = C.CDLL("libgio-2.0.so.0")
|
||||
glib = C.CDLL("libglib-2.0.so.0")
|
||||
|
||||
gio.g_settings_new.argtypes = [C.c_char_p]
|
||||
gio.g_settings_new.restype = C.c_void_p
|
||||
|
||||
gio.g_settings_get_string.argtypes = [C.c_void_p, C.c_char_p]
|
||||
gio.g_settings_get_string.restype = C.c_void_p
|
||||
gio.g_settings_set_string.argtypes = [C.c_void_p, C.c_char_p, C.c_char_p]
|
||||
gio.g_settings_set_string.restype = C.c_int
|
||||
|
||||
gio.g_settings_get_int.argtypes = [C.c_void_p, C.c_char_p]
|
||||
gio.g_settings_get_int.restype = C.c_int
|
||||
gio.g_settings_set_int.argtypes = [C.c_void_p, C.c_char_p, C.c_int]
|
||||
gio.g_settings_set_int.restype = C.c_int
|
||||
|
||||
gio.g_settings_get_boolean.argtypes = [C.c_void_p, C.c_char_p]
|
||||
gio.g_settings_get_boolean.restype = C.c_int
|
||||
gio.g_settings_set_boolean.argtypes = [C.c_void_p, C.c_char_p, C.c_int]
|
||||
gio.g_settings_set_boolean.restype = C.c_int
|
||||
|
||||
gio.g_settings_sync.argtypes = []
|
||||
gio.g_settings_sync.restype = None
|
||||
|
||||
glib.g_free.argtypes = [C.c_void_p]
|
||||
glib.g_free.restype = None
|
||||
|
||||
return gio, glib
|
||||
|
||||
|
||||
def get_string(gio, glib, settings, key):
|
||||
ptr = gio.g_settings_get_string(settings, key.encode())
|
||||
if not ptr:
|
||||
return None
|
||||
value = C.cast(ptr, C.c_char_p).value.decode()
|
||||
glib.g_free(ptr)
|
||||
return value
|
||||
|
||||
|
||||
def main():
|
||||
mode = sys.argv[1] if len(sys.argv) > 1 else "dark"
|
||||
if mode in ("-h", "--help"):
|
||||
print("Aufruf: set-gtk-settings [dark|light]", file=sys.stderr)
|
||||
return 0
|
||||
if mode not in THEMES:
|
||||
print(f"Unbekanntes Design: {mode!r} (erlaubt: dark, light)", file=sys.stderr)
|
||||
return 2
|
||||
|
||||
strings = dict(STRINGS)
|
||||
strings.update(THEMES[mode])
|
||||
|
||||
gio, glib = load_libs()
|
||||
settings = gio.g_settings_new(SCHEMA)
|
||||
if not settings:
|
||||
print(f"FEHLER: Schema {SCHEMA.decode()} nicht gefunden.", file=sys.stderr)
|
||||
return 1
|
||||
|
||||
wm_settings = gio.g_settings_new(WM_SCHEMA)
|
||||
if not wm_settings:
|
||||
print(f"FEHLER: Schema {WM_SCHEMA.decode()} nicht gefunden.", file=sys.stderr)
|
||||
return 1
|
||||
|
||||
failed = False
|
||||
|
||||
print(f"== Design: {mode} ==")
|
||||
print("== Vorher ==")
|
||||
for key in strings:
|
||||
print(f" {key:22} = {get_string(gio, glib, settings, key)!r}")
|
||||
for key in INTS:
|
||||
print(f" {key:22} = {gio.g_settings_get_int(settings, key.encode())}")
|
||||
for key in BOOLS:
|
||||
print(f" {key:22} = {bool(gio.g_settings_get_boolean(settings, key.encode()))}")
|
||||
print(f" {'button-layout':22} = {get_string(gio, glib, wm_settings, 'button-layout')!r}")
|
||||
|
||||
print("\n== Setzen ==")
|
||||
for key, value in strings.items():
|
||||
ok = bool(gio.g_settings_set_string(settings, key.encode(), value.encode()))
|
||||
print(f" {key:22} = {value!r} {'OK' if ok else 'FEHLER'}")
|
||||
failed |= not ok
|
||||
for key, value in INTS.items():
|
||||
ok = bool(gio.g_settings_set_int(settings, key.encode(), value))
|
||||
print(f" {key:22} = {value} {'OK' if ok else 'FEHLER'}")
|
||||
failed |= not ok
|
||||
for key, value in BOOLS.items():
|
||||
ok = bool(gio.g_settings_set_boolean(settings, key.encode(), int(value)))
|
||||
print(f" {key:22} = {value} {'OK' if ok else 'FEHLER'}")
|
||||
failed |= not ok
|
||||
|
||||
ok = bool(gio.g_settings_set_string(wm_settings, b"button-layout",
|
||||
BUTTON_LAYOUT.encode()))
|
||||
print(f" {'button-layout':22} = {BUTTON_LAYOUT!r} {'OK' if ok else 'FEHLER'}")
|
||||
failed |= not ok
|
||||
|
||||
gio.g_settings_sync()
|
||||
|
||||
print("\n== Nachher ==")
|
||||
for key in strings:
|
||||
print(f" {key:22} = {get_string(gio, glib, settings, key)!r}")
|
||||
for key in INTS:
|
||||
print(f" {key:22} = {gio.g_settings_get_int(settings, key.encode())}")
|
||||
for key in BOOLS:
|
||||
print(f" {key:22} = {bool(gio.g_settings_get_boolean(settings, key.encode()))}")
|
||||
print(f" {'button-layout':22} = {get_string(gio, glib, wm_settings, 'button-layout')!r}")
|
||||
|
||||
if failed:
|
||||
print("\nMindestens ein Wert konnte nicht gesetzt werden.", file=sys.stderr)
|
||||
return 1
|
||||
|
||||
print("\nFertig. Waybar/Thunar neu starten, damit die Icons sofort aktualisiert werden:")
|
||||
print(" killall waybar thunar 2>/dev/null; waybar & thunar --daemon &")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Executable
+67
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env bash
|
||||
# update-gtk4-dark-css – erzeugt die GTK4-User-CSS für Arc-Dark.
|
||||
#
|
||||
# GTK3 bleibt auf Arc-Darker (dunkle Kopfleisten, helle Inhaltsflächen).
|
||||
# GTK4-Programme (inkl. libadwaita) laden dagegen Arc-Dark über
|
||||
# ~/.config/gtk-4.0/gtk.css. Die CSS wird aus dem installierten
|
||||
# Arc-Theme extrahiert, damit sie bei Theme-Updates mitwandert.
|
||||
set -Eeuo pipefail
|
||||
|
||||
config_home=${XDG_CONFIG_HOME:-$HOME/.config}
|
||||
dest="$config_home/gtk-4.0/arc-dark"
|
||||
gtk_css="$config_home/gtk-4.0/gtk.css"
|
||||
|
||||
theme=""
|
||||
for candidate in /usr/share/themes/Arc-Dark/gtk-4.0 \
|
||||
/usr/share/themes/Arc-Darker/gtk-4.0; do
|
||||
if [ -f "$candidate/gtk.gresource" ]; then
|
||||
theme=$candidate
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$theme" ]; then
|
||||
echo "Fehler: Arc-Dark/Arc-Darker (GTK4) nicht gefunden." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
command -v gresource >/dev/null 2>&1 || {
|
||||
echo "Fehler: gresource fehlt (Paket libglib2.0-bin)." >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
resource=/org/gnome/arc-theme/gtk-main-dark.css
|
||||
if ! gresource list "$theme/gtk.gresource" | grep -Fqx "$resource"; then
|
||||
echo "Fehler: $resource fehlt in $theme/gtk.gresource." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tmp=$(mktemp -d)
|
||||
trap 'rm -rf "$tmp"' EXIT
|
||||
mkdir -p "$tmp/assets"
|
||||
|
||||
gresource extract "$theme/gtk.gresource" "$resource" > "$tmp/gtk-main-dark.css"
|
||||
while IFS= read -r r; do
|
||||
case "$r" in
|
||||
*/assets/*)
|
||||
gresource extract "$theme/gtk.gresource" "$r" > "$tmp/assets/${r##*/}"
|
||||
;;
|
||||
esac
|
||||
done < <(gresource list "$theme/gtk.gresource")
|
||||
|
||||
install -d "$config_home/gtk-4.0"
|
||||
rm -rf "$dest"
|
||||
mv "$tmp" "$dest"
|
||||
trap - EXIT
|
||||
|
||||
cat > "$gtk_css" <<'EOF'
|
||||
/* GTK4: Arc-Dark für alle GTK4-Programme.
|
||||
* GTK3 bleibt bewusst auf Arc-Darker (siehe gtk-3.0/settings.ini).
|
||||
* Die Datei arc-dark/gtk-main-dark.css wird von
|
||||
* ~/.local/bin/update-gtk4-dark-css aus dem Arc-Theme erzeugt.
|
||||
*/
|
||||
@import url("arc-dark/gtk-main-dark.css");
|
||||
EOF
|
||||
|
||||
echo "GTK4-User-CSS geschrieben: $gtk_css"
|
||||
echo "Arc-Dark-CSS: $dest/gtk-main-dark.css (aus $theme)"
|
||||
Reference in new issue
Block a user