Compare commits

...

8 Commits

18 changed files with 260 additions and 51 deletions

View File

@ -15,23 +15,23 @@ background {
input-field { input-field {
monitor = monitor =
size = 200, 50 size = 200, 50
position = 0, -80 position = 0, -60
dots_center = true dots_center = true
fade_on_empty = false fade_on_empty = false
font_color = rgb(202, 211, 245) font_color = rgb(221, 194, 160) # Rose Pine text
inner_color = rgb(91, 96, 120) inner_color = rgb(38, 35, 58) # Rose Pine base
outer_color = rgb(24, 25, 38) outer_color = rgb(56, 51, 80) # Rose Pine overlay
outline_thickness = 5 outline_thickness = 4
placeholder_text = <i>Input Password...</i> placeholder_text = <i>Enter password…</i>
shadow_passes = 2 shadow_passes = 2
} }
label { label {
monitor = monitor =
text = cmd[update:1000] echo "$TIME" text = cmd[update:1000] echo "$TIME"
color = rgb(200, 200, 200) color = rgb(221, 194, 160) # Rose Pine text
font_size = 55 font_size = 55
font_family = Noto Sans font_family = JetBrainsMono
position = -40, 40 position = -40, 40
halign = right halign = right
valign = bottom valign = bottom
@ -42,9 +42,9 @@ label {
label { label {
monitor = monitor =
text = $USER text = $USER
color = rgb(200, 200, 200) color = rgb(221, 194, 160) # Rose Pine text
font_size = 20 font_size = 20
font_family = Noto Sans font_family = JetBrainsMono
position = -100, 160 position = -100, 160
halign = right halign = right
valign = bottom valign = bottom
@ -54,11 +54,11 @@ label {
image { image {
monitor = monitor =
path = ~/.face path = ~/.local/share/avatar.jpg
size = 280 size = 280
rounding = -1 rounding = -1
border_size = 4 border_size = 4
border_color = rgb(221, 221, 221) border_color = rgb(221, 194, 160) # Rose Pine highlight
rotate = 0 rotate = 0
reload_time = -1 reload_time = -1
reload_cmd = reload_cmd =

View File

@ -9,6 +9,7 @@
env = XCURSOR_SIZE,36 env = XCURSOR_SIZE,36
env = HYPRCURSOR_SIZE,36 env = HYPRCURSOR_SIZE,36
env = HYPRCURSOR_THEME,rose-pine-hyprcursor env = HYPRCURSOR_THEME,rose-pine-hyprcursor
env = XCURSOR_THEME,rose-pine-hyprcursor
env = QT_QPA_PLATFORMTHEME,qt6ct env = QT_QPA_PLATFORMTHEME,qt6ct
env = QT_QPA_PLATFORM,wayland env = QT_QPA_PLATFORM,wayland

View File

@ -16,9 +16,11 @@
"temperature", "temperature",
"pulseaudio", "pulseaudio",
"network", "network",
"custom/logitech-battery",
"tray", "tray",
"custom/wlogout" "custom/wlogout"
], "hyprland/workspaces": { ],
"hyprland/workspaces": {
"format": "{icon}", "format": "{icon}",
"on-click": "activate", "on-click": "activate",
"on-scroll-up": "hyprctl dispatch workspace e-1", "on-scroll-up": "hyprctl dispatch workspace e-1",
@ -97,12 +99,20 @@
}, },
"scroll-step": 5, "scroll-step": 5,
"on-click": "pavucontrol", "on-click": "pavucontrol",
"on-click-right": "pactl set-default-sink alsa_output.usb-FiiO_DigiHug_USB_Audio-01.iec958-stereo", "on-click-right": "~/.local/bin/switch-audio-sink"
"on-click-middle": "pactl set-default-sink alsa_output.pci-0000_0c_00.1.hdmi-stereo"
}, },
"tray": { "tray": {
"icon-size": 20 "icon-size": 20
}, },
"custom/logitech-battery": {
"exec": "~/.local/bin/logitech_battery.sh",
"interval": 60,
"return-type": "json",
"format": "{text}",
"tooltip": "{tooltip}",
"class": "logitech-battery",
"on-click": "solaar gui"
},
"custom/wlogout": { "custom/wlogout": {
"format": "⏻", "format": "⏻",
"tooltip": "Logout/Shutdown", "tooltip": "Logout/Shutdown",

View File

@ -18,9 +18,11 @@
"pulseaudio", "pulseaudio",
"network", "network",
"battery", "battery",
"custom/logitech-battery",
"tray", "tray",
"custom/wlogout" "custom/wlogout"
], "hyprland/workspaces": { ],
"hyprland/workspaces": {
"format": "{icon}", "format": "{icon}",
"on-click": "activate", "on-click": "activate",
"on-scroll-up": "hyprctl dispatch workspace e-1", "on-scroll-up": "hyprctl dispatch workspace e-1",
@ -105,8 +107,7 @@
}, },
"scroll-step": 5, "scroll-step": 5,
"on-click": "pavucontrol", "on-click": "pavucontrol",
"on-click-right": "pactl set-default-sink alsa_output.usb-FiiO_DigiHug_USB_Audio-01.iec958-stereo", "on-click-right": "~/.local/bin/switch-audio-sink"
"on-click-middle": "pactl set-default-sink alsa_output.pci-0000_0c_00.1.hdmi-stereo"
}, },
"battery": { "battery": {
"states": { "states": {
@ -136,6 +137,15 @@
"tray": { "tray": {
"icon-size": 20 "icon-size": 20
}, },
"custom/logitech-battery": {
"exec": "~/.local/bin/logitech_battery.sh",
"interval": 60,
"return-type": "json",
"format": "{text}",
"tooltip": "{tooltip}",
"class": "logitech-battery",
"on-click": "solaar gui"
},
"custom/wlogout": { "custom/wlogout": {
"format": "⏻", "format": "⏻",
"tooltip": "Logout/Shutdown", "tooltip": "Logout/Shutdown",

View File

@ -36,7 +36,7 @@ window#waybar {
color: #1e1e2e; color: #1e1e2e;
} }
#clock, #cpu, #memory, #temperature, #pulseaudio, #network, #battery, #tray, #backlight, #disk, #idle_inhibitor { #clock, #cpu, #memory, #temperature, #pulseaudio, #network, #battery, #tray, #backlight, #disk, #idle_inhibitor, #custom-logitech-battery {
padding: 0 10px; padding: 0 10px;
margin: 0 2px; margin: 0 2px;
border-radius: 6px; border-radius: 6px;
@ -69,3 +69,4 @@ window#waybar {
color: #1e1e2e; color: #1e1e2e;
box-shadow: 0 2px 8px rgba(0,0,0,0.18); box-shadow: 0 2px 8px rgba(0,0,0,0.18);
} }

52
.local/bin/logitech_battery.sh Executable file
View File

@ -0,0 +1,52 @@
#!/bin/bash
# Helper: map percent to icon and color
get_icon() {
local percent=$1
if ! [[ "$percent" =~ ^[0-9]+$ ]]; then percent=0; fi
if [ "$percent" -ge 90 ]; then echo ""; elif [ "$percent" -ge 60 ]; then echo ""; elif [ "$percent" -ge 40 ]; then echo ""; elif [ "$percent" -ge 20 ]; then echo ""; else echo ""; fi
}
get_color() {
local percent=$1
if ! [[ "$percent" =~ ^[0-9]+$ ]]; then percent=0; fi
if [ "$percent" -ge 90 ]; then echo "#00ff00"; elif [ "$percent" -ge 60 ]; then echo "#aaff00"; elif [ "$percent" -ge 40 ]; then echo "#ffff00"; elif [ "$percent" -ge 20 ]; then echo "#ff8800"; else echo "#ff0000"; fi
}
KEYBOARD_NAME="G915"
MOUSE_NAME="G903"
# Use actual Unicode icons
KEYBOARD_ICON=""
MOUSE_ICON="🖱️"
# Parse keyboard info
kb_line=$(solaar show 2>/dev/null | awk '/G915/ {dev=1} /Battery:/ && dev==1 {print; dev=0}')
kb_percent=$(echo "$kb_line" | awk '{print $2}' | tr -d '%' | grep -E '^[0-9]+$' || echo "N/A")
kb_voltage=$(echo "$kb_line" | grep -o '[0-9]*mV' | grep -o '[0-9]*' || echo "N/A")
kb_status=$(echo "$kb_line" | awk '{print $3}' || echo "N/A")
# Parse mouse info, handle offline/unknown
mouse_line=$(solaar show 2>/dev/null | awk '/G903/ {dev=1} /Battery:/ && dev==1 {print; dev=0}')
if echo "$mouse_line" | grep -qi "unknown"; then
mouse_percent="N/A"
mouse_voltage="N/A"
mouse_status="offline"
else
mouse_percent=$(echo "$mouse_line" | awk '{print $2}' | tr -d '%' | grep -E '^[0-9]+$' || echo "N/A")
mouse_voltage=$(echo "$mouse_line" | grep -o '[0-9]*mV' | grep -o '[0-9]*' || echo "N/A")
mouse_status=$(echo "$mouse_line" | awk '{print $3}' || echo "N/A")
fi
kb_icon=$(get_icon "$kb_percent")
kb_color=$(get_color "$kb_percent")
kb_tooltip="${KEYBOARD_NAME}: ${kb_percent:-N/A}% @ ${kb_voltage:-N/A}mV (${kb_status:-N/A})"
mouse_icon=$(get_icon "$mouse_percent")
mouse_tooltip="${MOUSE_NAME}: ${mouse_percent:-N/A}% @ ${mouse_voltage:-N/A}mV (${mouse_status:-N/A})"
# Escape newlines for JSON
tooltip=$(echo -e "$kb_tooltip\n$mouse_tooltip" | sed ':a;N;$!ba;s/\n/\\n/g')
cat <<EOF
{"text": "$KEYBOARD_ICON $kb_icon | $MOUSE_ICON $mouse_icon ","tooltip": "$tooltip","class": "logitech-battery","color": "$kb_color"}
EOF

49
.local/bin/switch-audio-sink Executable file
View File

@ -0,0 +1,49 @@
#!/usr/bin/env zsh
# Minimal PipeWire sink cycler using starred lines from wpctl status.
# Deps: pw-dump, jq, wpctl
set -euo pipefail
# Collect sink IDs (Audio/Sink nodes)
sinks=($(pw-dump | jq -r '.[] | select(.info.props."media.class"=="Audio/Sink") | .id'))
(( ${#sinks} )) || exit 0
# Get all lines containing a star (default indicators for various classes)
starred=$(wpctl status | grep -F '*') || true
# Extract numbers (IDs) from starred lines (the number before the first dot after the star)
typeset -a star_ids
while IFS= read -r line; do
# Match: * <spaces> <number>.
if [[ $line =~ [*][[:space:]]*([0-9]+)\. ]]; then
star_ids+=("${match[1]}")
fi
done <<< "$starred"
# Find first starred ID that is actually one of our sinks
current=""
for cid in "${star_ids[@]}"; do
for s in "${sinks[@]}"; do
if [[ $cid == $s ]]; then
current=$cid
break 2
fi
done
done
# Fallback if no starred sink matched
[[ -z $current ]] && current=${sinks[1]}
# Locate index of current in sinks (zsh arrays are 1-based)
idx=1
for i in {1..${#sinks[@]}}; do
[[ ${sinks[$i]} == "$current" ]] && { idx=$i; break; }
done
# Compute next sink (wrap)
next=${sinks[$(( (idx % ${#sinks}) + 1 ))]}
# Switch default
wpctl set-default "$next" >/dev/null 2>&1 || exit 1
echo "Switched to sink $next"

BIN
.local/share/avatar.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -98,6 +98,10 @@ The script will install all required packages and symlink dotfiles and configs (
- **TTY Keymap:** Console uses German nodeadkeys layout for all users (system-wide via `localectl`). - **TTY Keymap:** Console uses German nodeadkeys layout for all users (system-wide via `localectl`).
- **No official Teams/Outlook client:** Use the web app or AUR wrappers for best compatibility. - **No official Teams/Outlook client:** Use the web app or AUR wrappers for best compatibility.
- **TortoiseGit alternative:** Use GitKraken, Sublime Merge, SmartGit, or lazygit for graphical Git workflows. - **TortoiseGit alternative:** Use GitKraken, Sublime Merge, SmartGit, or lazygit for graphical Git workflows.
- **Logitech Battery Status:**
If you have Logitech G915 (keyboard) or G903 (mouse), battery status is shown in Waybar via the `custom/logitech-battery` module.
The script at `.local/bin/logitech_battery.sh` uses `solaar` to report battery and status for both devices.
To use, ensure `solaar` is installed and your devices are paired. The module appears in the Waybar right section on both desktop and laptop profiles.
--- ---

View File

@ -26,4 +26,17 @@ PACKAGES=(
# Add more packages here # Add more packages here
) )
paru -S --needed --noconfirm "${PACKAGES[@]}" to_install=()
for pkg in "${PACKAGES[@]}"; do
if ! paru -Q "$pkg" &>/dev/null; then
to_install+=("$pkg")
fi
done
if [ "${#to_install[@]}" -gt 0 ]; then
paru -S --noconfirm "${to_install[@]}"
export DOTFILES_PACKAGES_UPDATED=1
else
echo "All packages already installed."
fi

View File

@ -26,8 +26,31 @@ for file in $(find "$DOTFILES_DIR" -maxdepth 1 -name ".*"); do
ln -sf "$file" "$HOME/$basefile" ln -sf "$file" "$HOME/$basefile"
echo "Linked $basefile" echo "Linked $basefile"
fi fi
done done
# Symlink .local/bin and .local/share files recursively
for SUBDIR in bin share; do
LOCAL_REPO="$DOTFILES_DIR/.local/$SUBDIR"
LOCAL_HOME="$HOME/.local/$SUBDIR"
if [ -d "$LOCAL_REPO" ]; then
mkdir -p "$LOCAL_HOME"
echo "Symlinking .local/$SUBDIR files (recursive)..."
find "$LOCAL_REPO" -type f | while read -r srcfile; do
relpath="${srcfile#$LOCAL_REPO/}"
targetfile="$LOCAL_HOME/$relpath"
targetdir="$(dirname "$targetfile")"
mkdir -p "$targetdir"
[ -L "$targetfile" ] && rm "$targetfile"
[ -f "$targetfile" ] && rm "$targetfile"
ln -sf "$srcfile" "$targetfile"
echo "Linked $srcfile -> $targetfile"
done
fi
done
# Symlink .config directory contents # Symlink .config directory contents
CONFIG_DIR="$DOTFILES_DIR/.config" CONFIG_DIR="$DOTFILES_DIR/.config"
if [ -d "$CONFIG_DIR" ]; then if [ -d "$CONFIG_DIR" ]; then
@ -102,17 +125,4 @@ echo "====================="
echo "Dotfiles symlinking complete!" echo "Dotfiles symlinking complete!"
echo "=====================" echo "====================="
# Symlink .local/bin scripts
LOCAL_BIN_REPO="$DOTFILES_DIR/.local/bin"
LOCAL_BIN_HOME="$HOME/.local/bin"
if [ -d "$LOCAL_BIN_REPO" ]; then
mkdir -p "$LOCAL_BIN_HOME"
echo "Symlinking .local/bin scripts..."
for script in "$LOCAL_BIN_REPO"/*; do
[ -e "$script" ] || continue
base_script="$(basename "$script")"
ln -sf "$script" "$LOCAL_BIN_HOME/$base_script"
echo "Linked .local/bin/$base_script"
done
fi

View File

@ -7,7 +7,12 @@ fi
# Set German nodeadkeys layout for TTY/console # Set German nodeadkeys layout for TTY/console
if command -v localectl >/dev/null 2>&1; then if command -v localectl >/dev/null 2>&1; then
current_keymap=$(localectl status | awk -F': ' '/VC Keymap/ {print $2}' | xargs)
if [ "$current_keymap" != "de-latin1-nodeadkeys" ]; then
echo "Setting TTY keyboard layout to de-latin1-nodeadkeys..." echo "Setting TTY keyboard layout to de-latin1-nodeadkeys..."
sudo localectl set-keymap de-latin1-nodeadkeys sudo localectl set-keymap de-latin1-nodeadkeys
else
echo "TTY keyboard layout already set to de-latin1-nodeadkeys."
fi
fi fi

View File

@ -14,7 +14,21 @@ SOUND_PACKAGES=(
sof-firmware sof-firmware
) )
paru -S --needed --noconfirm "${SOUND_PACKAGES[@]}" to_install=()
for pkg in "${SOUND_PACKAGES[@]}"; do
if ! paru -Q "$pkg" &>/dev/null; then
to_install+=("$pkg")
fi
done
if [ "${#to_install[@]}" -gt 0 ]; then
paru -S --noconfirm "${to_install[@]}"
echo "Sound packages installed."
export DOTFILES_PACKAGES_UPDATED=1
else
echo "All sound packages already installed."
fi
# Enable and start PipeWire services # Enable and start PipeWire services
systemctl --user enable --now pipewire pipewire-pulse wireplumber systemctl --user enable --now pipewire pipewire-pulse wireplumber

View File

@ -19,8 +19,21 @@ HYPR_PACKAGES=(
ttf-nerd-fonts-symbols ttf-nerd-fonts-symbols
noto-fonts noto-fonts
noto-fonts-emoji noto-fonts-emoji
rose-pine-hyprcursor
) )
paru -S --needed --noconfirm "${HYPR_PACKAGES[@]}" to_install=()
for pkg in "${HYPR_PACKAGES[@]}"; do
if ! paru -Q "$pkg" &>/dev/null; then
to_install+=("$pkg")
fi
echo "Hyprland and related tools installed and configured." done
if [ "${#to_install[@]}" -gt 0 ]; then
paru -S --noconfirm "${to_install[@]}"
echo "Hyprland and related tools installed and configured."
export DOTFILES_PACKAGES_UPDATED=1
else
echo "All Hyprland and related tools already installed."
fi

View File

@ -8,6 +8,18 @@ BROWSERS=(google-chrome firefox brave-bin)
# Install browsers with paru (AUR helper) # Install browsers with paru (AUR helper)
echo "Installing browsers: ${BROWSERS[*]}" echo "Installing browsers: ${BROWSERS[*]}"
paru -S --needed --noconfirm "${BROWSERS[@]}" to_install=()
for pkg in "${BROWSERS[@]}"; do
if ! paru -Q "$pkg" &>/dev/null; then
to_install+=("$pkg")
fi
echo "Browsers installed." done
if [ "${#to_install[@]}" -gt 0 ]; then
paru -S --noconfirm "${to_install[@]}"
echo "Browsers installed."
export DOTFILES_PACKAGES_UPDATED=1
else
echo "All browsers already installed."
fi

View File

@ -17,6 +17,18 @@ DEVTOOLS_PACKAGES=(
opencode opencode
) )
paru -S --needed --noconfirm "${DEVTOOLS_PACKAGES[@]}" to_install=()
for pkg in "${DEVTOOLS_PACKAGES[@]}"; do
if ! paru -Q "$pkg" &>/dev/null; then
to_install+=("$pkg")
fi
echo "Development tools installed." done
if [ "${#to_install[@]}" -gt 0 ]; then
paru -S --noconfirm "${to_install[@]}"
echo "Development tools installed."
export DOTFILES_PACKAGES_UPDATED=1
else
echo "All development tools already installed."
fi

View File

@ -2,15 +2,11 @@
# Post-install steps for dotfiles setup # Post-install steps for dotfiles setup
# Update pkgfile database for command-not-found suggestions # Update pkgfile database for command-not-found suggestions
if command -v pkgfile &>/dev/null; then if command -v pkgfile &>/dev/null && [ "$DOTFILES_PACKAGES_UPDATED" = "1" ]; then
echo "Updating pkgfile database..." echo "Updating pkgfile database..."
sudo pkgfile --update sudo pkgfile --update
fi else
echo "Skipping pkgfile update (no packages installed)."
# Rehash zsh command hash table so new executables are found
if command -v zsh &>/dev/null; then
echo "Running zsh rehash..."
zsh -c 'rehash'
fi fi
# Add other post-install steps here as needed # Add other post-install steps here as needed

View File

@ -31,3 +31,10 @@ for i in "${!MODULES[@]}"; do
echo "[$STEP/$COUNT] Running $BASENAME..." echo "[$STEP/$COUNT] Running $BASENAME..."
source "$MODULE" source "$MODULE"
done done
if pgrep -x Hyprland >/dev/null; then
echo "Reloading Hyprland config..."
hyprctl reload
else
echo "Hyprland is not running; skipping reload."
fi