Compare commits
8 Commits
92b9d417fb
...
638fc47dc2
| Author | SHA1 | Date | |
|---|---|---|---|
| 638fc47dc2 | |||
| 145e652380 | |||
| 53c80ab6f8 | |||
| e6ff6f6c48 | |||
| 0c014eb08d | |||
| 088a46cced | |||
| 88f7edf1a6 | |||
| 66c886130e |
@ -15,23 +15,23 @@ background {
|
||||
input-field {
|
||||
monitor =
|
||||
size = 200, 50
|
||||
position = 0, -80
|
||||
position = 0, -60
|
||||
dots_center = true
|
||||
fade_on_empty = false
|
||||
font_color = rgb(202, 211, 245)
|
||||
inner_color = rgb(91, 96, 120)
|
||||
outer_color = rgb(24, 25, 38)
|
||||
outline_thickness = 5
|
||||
placeholder_text = <i>Input Password...</i>
|
||||
font_color = rgb(221, 194, 160) # Rose Pine text
|
||||
inner_color = rgb(38, 35, 58) # Rose Pine base
|
||||
outer_color = rgb(56, 51, 80) # Rose Pine overlay
|
||||
outline_thickness = 4
|
||||
placeholder_text = <i>Enter password…</i>
|
||||
shadow_passes = 2
|
||||
}
|
||||
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "$TIME"
|
||||
color = rgb(200, 200, 200)
|
||||
color = rgb(221, 194, 160) # Rose Pine text
|
||||
font_size = 55
|
||||
font_family = Noto Sans
|
||||
font_family = JetBrainsMono
|
||||
position = -40, 40
|
||||
halign = right
|
||||
valign = bottom
|
||||
@ -42,9 +42,9 @@ label {
|
||||
label {
|
||||
monitor =
|
||||
text = $USER
|
||||
color = rgb(200, 200, 200)
|
||||
color = rgb(221, 194, 160) # Rose Pine text
|
||||
font_size = 20
|
||||
font_family = Noto Sans
|
||||
font_family = JetBrainsMono
|
||||
position = -100, 160
|
||||
halign = right
|
||||
valign = bottom
|
||||
@ -54,11 +54,11 @@ label {
|
||||
|
||||
image {
|
||||
monitor =
|
||||
path = ~/.face
|
||||
path = ~/.local/share/avatar.jpg
|
||||
size = 280
|
||||
rounding = -1
|
||||
border_size = 4
|
||||
border_color = rgb(221, 221, 221)
|
||||
border_color = rgb(221, 194, 160) # Rose Pine highlight
|
||||
rotate = 0
|
||||
reload_time = -1
|
||||
reload_cmd =
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
env = XCURSOR_SIZE,36
|
||||
env = HYPRCURSOR_SIZE,36
|
||||
env = HYPRCURSOR_THEME,rose-pine-hyprcursor
|
||||
env = XCURSOR_THEME,rose-pine-hyprcursor
|
||||
env = QT_QPA_PLATFORMTHEME,qt6ct
|
||||
env = QT_QPA_PLATFORM,wayland
|
||||
|
||||
|
||||
@ -16,9 +16,11 @@
|
||||
"temperature",
|
||||
"pulseaudio",
|
||||
"network",
|
||||
"custom/logitech-battery",
|
||||
"tray",
|
||||
"custom/wlogout"
|
||||
], "hyprland/workspaces": {
|
||||
],
|
||||
"hyprland/workspaces": {
|
||||
"format": "{icon}",
|
||||
"on-click": "activate",
|
||||
"on-scroll-up": "hyprctl dispatch workspace e-1",
|
||||
@ -97,12 +99,20 @@
|
||||
},
|
||||
"scroll-step": 5,
|
||||
"on-click": "pavucontrol",
|
||||
"on-click-right": "pactl set-default-sink alsa_output.usb-FiiO_DigiHug_USB_Audio-01.iec958-stereo",
|
||||
"on-click-middle": "pactl set-default-sink alsa_output.pci-0000_0c_00.1.hdmi-stereo"
|
||||
"on-click-right": "~/.local/bin/switch-audio-sink"
|
||||
},
|
||||
"tray": {
|
||||
"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": {
|
||||
"format": "⏻",
|
||||
"tooltip": "Logout/Shutdown",
|
||||
|
||||
@ -18,9 +18,11 @@
|
||||
"pulseaudio",
|
||||
"network",
|
||||
"battery",
|
||||
"custom/logitech-battery",
|
||||
"tray",
|
||||
"custom/wlogout"
|
||||
], "hyprland/workspaces": {
|
||||
],
|
||||
"hyprland/workspaces": {
|
||||
"format": "{icon}",
|
||||
"on-click": "activate",
|
||||
"on-scroll-up": "hyprctl dispatch workspace e-1",
|
||||
@ -105,8 +107,7 @@
|
||||
},
|
||||
"scroll-step": 5,
|
||||
"on-click": "pavucontrol",
|
||||
"on-click-right": "pactl set-default-sink alsa_output.usb-FiiO_DigiHug_USB_Audio-01.iec958-stereo",
|
||||
"on-click-middle": "pactl set-default-sink alsa_output.pci-0000_0c_00.1.hdmi-stereo"
|
||||
"on-click-right": "~/.local/bin/switch-audio-sink"
|
||||
},
|
||||
"battery": {
|
||||
"states": {
|
||||
@ -136,6 +137,15 @@
|
||||
"tray": {
|
||||
"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": {
|
||||
"format": "⏻",
|
||||
"tooltip": "Logout/Shutdown",
|
||||
|
||||
@ -36,7 +36,7 @@ window#waybar {
|
||||
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;
|
||||
margin: 0 2px;
|
||||
border-radius: 6px;
|
||||
@ -69,3 +69,4 @@ window#waybar {
|
||||
color: #1e1e2e;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.18);
|
||||
}
|
||||
|
||||
|
||||
52
.local/bin/logitech_battery.sh
Executable file
52
.local/bin/logitech_battery.sh
Executable 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
49
.local/bin/switch-audio-sink
Executable 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
BIN
.local/share/avatar.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
@ -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`).
|
||||
- **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.
|
||||
- **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.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@ -26,4 +26,17 @@ PACKAGES=(
|
||||
# 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
|
||||
|
||||
@ -26,8 +26,31 @@ for file in $(find "$DOTFILES_DIR" -maxdepth 1 -name ".*"); do
|
||||
ln -sf "$file" "$HOME/$basefile"
|
||||
echo "Linked $basefile"
|
||||
fi
|
||||
|
||||
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
|
||||
CONFIG_DIR="$DOTFILES_DIR/.config"
|
||||
if [ -d "$CONFIG_DIR" ]; then
|
||||
@ -102,17 +125,4 @@ echo "====================="
|
||||
echo "Dotfiles symlinking complete!"
|
||||
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
|
||||
|
||||
|
||||
@ -7,7 +7,12 @@ fi
|
||||
|
||||
# Set German nodeadkeys layout for TTY/console
|
||||
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..."
|
||||
sudo localectl set-keymap de-latin1-nodeadkeys
|
||||
else
|
||||
echo "TTY keyboard layout already set to de-latin1-nodeadkeys."
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@ -14,7 +14,21 @@ SOUND_PACKAGES=(
|
||||
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
|
||||
systemctl --user enable --now pipewire pipewire-pulse wireplumber
|
||||
|
||||
@ -19,8 +19,21 @@ HYPR_PACKAGES=(
|
||||
ttf-nerd-fonts-symbols
|
||||
noto-fonts
|
||||
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
|
||||
|
||||
@ -8,6 +8,18 @@ BROWSERS=(google-chrome firefox brave-bin)
|
||||
|
||||
# Install browsers with paru (AUR helper)
|
||||
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
|
||||
|
||||
@ -17,6 +17,18 @@ DEVTOOLS_PACKAGES=(
|
||||
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
|
||||
|
||||
@ -2,15 +2,11 @@
|
||||
# Post-install steps for dotfiles setup
|
||||
|
||||
# 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..."
|
||||
sudo pkgfile --update
|
||||
fi
|
||||
|
||||
# Rehash zsh command hash table so new executables are found
|
||||
if command -v zsh &>/dev/null; then
|
||||
echo "Running zsh rehash..."
|
||||
zsh -c 'rehash'
|
||||
else
|
||||
echo "Skipping pkgfile update (no packages installed)."
|
||||
fi
|
||||
|
||||
# Add other post-install steps here as needed
|
||||
|
||||
Loading…
Reference in New Issue
Block a user