From 077e852b3bcd709b1e27657d4e2b2db320861b9e Mon Sep 17 00:00:00 2001 From: nevaforget Date: Tue, 31 Mar 2026 10:27:53 +0200 Subject: [PATCH] Use system zsh plugins, remove redundant waybar network modules - Source zsh-autosuggestions and zsh-syntax-highlighting from /usr/share/zsh/plugins/ instead of oh-my-zsh custom dir - Add both as official packages - Remove waybar network and custom/vpn modules (nm-applet covers this) - Move tray from modules-left to first position in modules-right --- defaults/shell/zshrc | 10 +++++----- defaults/xdg/waybar/config | 37 ++--------------------------------- defaults/xdg/waybar/style.css | 2 -- packages/official.txt | 2 ++ 4 files changed, 9 insertions(+), 42 deletions(-) diff --git a/defaults/shell/zshrc b/defaults/shell/zshrc index 4a62786..23d61a6 100644 --- a/defaults/shell/zshrc +++ b/defaults/shell/zshrc @@ -117,12 +117,12 @@ if command -v fzf &>/dev/null; then export FZF_ALT_C_OPTS="--preview 'eza --tree --color=always {} | head -200'" fi -# --- Plugins (oh-my-zsh) --- -if [[ -d "${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting" ]]; then - source "${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" +# --- Plugins (system packages) --- +if [[ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]]; then + source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh fi -if [[ -d "${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions" ]]; then - source "${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" +if [[ -f /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh ]]; then + source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh ZSH_AUTOSUGGEST_STRATEGY=(history completion) fi diff --git a/defaults/xdg/waybar/config b/defaults/xdg/waybar/config index 1ee0689..66d21db 100644 --- a/defaults/xdg/waybar/config +++ b/defaults/xdg/waybar/config @@ -8,7 +8,6 @@ "modules-left": [ "group/sys", "niri/workspaces", - "tray", "wlr/taskbar", "niri/window" ], @@ -16,9 +15,10 @@ ], "modules-right": [ + "tray", "mpris", "custom/cpugov", - "group/net", + "bluetooth", "group/sound", "backlight", "battery", @@ -34,14 +34,6 @@ "privacy" ] }, - "group/net": { - "orientation": "inherit", - "modules": [ - "custom/vpn", - "network", - "bluetooth" - ] - }, "group/stats": { "orientation": "inherit", "modules": [ @@ -73,23 +65,6 @@ "clock" ] }, - "network": { - "format-wifi": "{icon}", - "format-ethernet": " {ifname}", - "format-disconnected": "󰱟 Offline", - "tooltip-format": "󰊗 {ifname} via {gwaddr}", - "tooltip-format-wifi": " WiFi {essid} ({signalStrength}%)", - "tooltip-format-ethernet": "󰱔 {ifname}", - "tooltip-format-disconnected": "Disconnected", - "on-click": "nm-connection-editor", - "format-icons": [ - "󱛅", - "󱛂", - "󱛃", - "󱚽" - ], - "max-length": 5 - }, "tray": { "icon-size": 15, "spacing": 10 @@ -364,14 +339,6 @@ "tooltip-format-activated": "󱎴 No Lockscreen on idle", "tooltip-format-deactivated": "󰷛 Lockscreen on idle" }, - "custom/vpn": { - "format": "󰖂", - "exec": "echo '{\"class\": \"connected\", \"tooltip\": \"VPN Connected\"}'", - "exec-if": "nmcli -t -f TYPE,STATE connection show --active | grep -qE '^(vpn|wireguard):'", - "return-type": "json", - "interval": 5, - "signal": 9 - }, "power-profiles-daemon": { "format": "{icon}", "tooltip-format": "Power profile: {profile}\nDriver: {driver}", diff --git a/defaults/xdg/waybar/style.css b/defaults/xdg/waybar/style.css index 02c919a..b1fa8b1 100644 --- a/defaults/xdg/waybar/style.css +++ b/defaults/xdg/waybar/style.css @@ -42,7 +42,6 @@ window#waybar { #memory, #bluetooth, #temperature, -#network, #pulseaudio, #tray, #mode, @@ -59,7 +58,6 @@ window#waybar { #custom-gpu-usage, #custom-cpugov, #custom-dnd, -#custom-vpn.connected, #power-profiles-daemon, #privacy, #gamemode, diff --git a/packages/official.txt b/packages/official.txt index 0d81a97..f3b3039 100644 --- a/packages/official.txt +++ b/packages/official.txt @@ -14,6 +14,8 @@ zip # Shell & Terminal zsh +zsh-autosuggestions +zsh-syntax-highlighting foot foot-terminfo bat