Initial ThinkPad Hyprland dotfiles

This commit is contained in:
Pascal
2026-04-28 03:59:07 +02:00
commit 6eb922c417
56 changed files with 6587 additions and 0 deletions

174
config/waybar/config.jsonc Normal file
View File

@@ -0,0 +1,174 @@
{
"layer": "top",
"position": "top",
"height": 42,
"margin-top": 8,
"margin-left": 12,
"margin-right": 12,
"spacing": 6,
"modules-left": [
"hyprland/workspaces"
],
"modules-center": [
"group/dynamic-island"
],
"modules-right": [
"cpu",
"memory",
"temperature",
"pulseaudio",
"network",
"battery",
"custom/notifications",
"tray"
],
"hyprland/workspaces": {
"format": "{icon}",
"format-icons": {
"1": "1",
"2": "2",
"3": "3",
"4": "4",
"5": "5",
"6": "6",
"7": "7",
"8": "8",
"9": "9",
"10": "10",
"urgent": "!",
"active": "●",
"default": "○"
},
"on-click": "activate"
},
"hyprland/window": {
"format": "{}",
"max-length": 28,
"separate-outputs": true
},
"group/dynamic-island": {
"orientation": "horizontal",
"drawer": {
"transition-duration": 350,
"children-class": "island-drawer",
"transition-left-to-right": true
},
"modules": [
"custom/dynamic-island",
"custom/media-prev",
"custom/media-toggle",
"custom/media-next",
"hyprland/window"
]
},
"custom/dynamic-island": {
"exec": "/home/pascal/.config/waybar/scripts/island-media.sh",
"return-type": "json",
"interval": 1,
"format": "{}",
"on-click": "playerctl play-pause",
"on-click-middle": "playerctl previous",
"on-click-right": "playerctl next"
},
"custom/media-prev": {
"format": "󰒮",
"tooltip-format": "Zurück",
"on-click": "playerctl previous"
},
"custom/media-toggle": {
"exec": "playerctl status 2>/dev/null | grep -q Playing && echo 󰏤 || echo 󰐊",
"interval": 1,
"format": "{}",
"tooltip-format": "Start/Pause",
"on-click": "playerctl play-pause"
},
"custom/media-next": {
"format": "󰒭",
"tooltip-format": "Weiter",
"on-click": "playerctl next"
},
"clock": {
"format": " {:%H:%M}",
"tooltip-format": "{:%A, %d. %B %Y}"
},
"cpu": {
"format": " {usage}%",
"tooltip": true
},
"memory": {
"format": " {}%",
"tooltip": true
},
"temperature": {
"hwmon-path-abs": "/sys/devices/platform/coretemp.0/hwmon",
"input-filename": "temp1_input",
"critical-threshold": 85,
"format": " {temperatureC}°C",
"format-critical": " {temperatureC}°C",
"tooltip": true
},
"battery": {
"format": "{icon} {capacity}%",
"format-icons": ["", "", "", "", ""],
"states": {
"warning": 30,
"critical": 15
}
},
"network": {
"format-wifi": " {signalStrength}%",
"format-ethernet": "󰈀 LAN",
"format-disconnected": "󰤮 Offline",
"tooltip-format-wifi": "{essid} ({signalStrength}%)",
"tooltip-format-ethernet": "{ifname}: {ipaddr}/{cidr}"
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": "󰖁 Muted",
"format-icons": {
"default": ["", "", ""]
}
},
"custom/notifications": {
"tooltip": true,
"format": "{icon}",
"format-icons": {
"notification": "󱅫",
"none": "",
"dnd-notification": "",
"dnd-none": "󰂛",
"inhibited-notification": "",
"inhibited-none": "",
"dnd-inhibited-notification": "",
"dnd-inhibited-none": "󰂛"
},
"return-type": "json",
"exec-if": "which swaync-client",
"exec": "swaync-client -swb",
"on-click": "swaync-client -t",
"on-click-right": "swaync-client -d",
"escape": true
},
"tray": {
"spacing": 10
}
}

View File

@@ -0,0 +1,39 @@
#!/usr/bin/env bash
json() {
jq -Rn --arg value "$1" '$value'
}
status="$(playerctl status 2>/dev/null || true)"
time_now="$(date +%H:%M)"
if [[ "$status" == "Playing" || "$status" == "Paused" ]]; then
title="$(playerctl metadata --format '{{ title }}' 2>/dev/null || true)"
artist="$(playerctl metadata --format '{{ artist }}' 2>/dev/null || true)"
player="$(playerctl metadata --format '{{ playerName }}' 2>/dev/null || true)"
[[ -z "$title" ]] && title="Media"
if [[ "$status" == "Playing" ]]; then
icon="󰏤"
class="playing"
else
icon="󰐊"
class="paused"
fi
text="$icon $title"
[[ -n "$artist" ]] && text="$text · $artist"
text="$text$time_now"
tooltip="${player:-Player} (${status})"
[[ -n "$artist$title" ]] && tooltip="$tooltip"$'\n'"$artist - $title"
else
text="$time_now"
tooltip="$(date '+%A, %d. %B %Y')"
class="idle"
fi
printf '{"text":%s,"tooltip":%s,"class":%s}\n' \
"$(json "$text")" \
"$(json "$tooltip")" \
"$(json "$class")"

206
config/waybar/style.css Normal file
View File

@@ -0,0 +1,206 @@
* {
min-height: 0;
font-family: "JetBrainsMono Nerd Font", "JetBrains Mono", sans-serif;
font-size: 13px;
font-weight: 700;
border: none;
border-radius: 0;
}
window#waybar {
background: transparent;
color: #cdd6f4;
}
tooltip {
background: rgba(20, 20, 30, 0.95);
border: 1px solid #00ff9c;
border-radius: 10px;
}
tooltip label {
color: #cdd6f4;
padding: 6px 8px;
}
#workspaces {
margin: 0 0 0 2px;
padding: 4px;
background: rgba(24, 24, 37, 0.72);
border: 1px solid rgba(40, 40, 55, 0.8);
border-radius: 18px;
}
#workspaces button {
min-width: 26px;
margin: 0 2px;
padding: 0 7px;
color: #7f849c;
background: transparent;
border-radius: 14px;
transition: all 180ms ease;
}
#workspaces button.active {
min-width: 34px;
color: #000000;
background: linear-gradient(135deg, #00ff9c, #00cc88);
box-shadow: 0 0 14px rgba(40, 40, 55, 0.8);
}
#workspaces button.urgent {
color: #000000;
background: #f38ba8;
}
#workspaces button:hover {
color: #cdd6f4;
background: rgba(40, 40, 55, 0.8);
}
#dynamic-island {
margin: 0;
padding: 0;
background: rgba(5, 5, 9, 0.88);
border-top: 1px solid rgba(40, 40, 55, 0.8);
border-bottom: 1px solid #00ff9c;
border-radius: 21px;
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.36);
}
#custom-dynamic-island,
#custom-media-prev,
#custom-media-toggle,
#custom-media-next,
#window,
#clock {
margin: 0;
padding: 0 11px;
background: transparent;
color: #cdd6f4;
}
#custom-dynamic-island {
min-width: 142px;
padding-left: 16px;
padding-right: 14px;
color: #cdd6f4;
border-radius: 21px;
}
#custom-dynamic-island.playing {
color: #a6e3a1;
}
#custom-dynamic-island.paused {
color: #f9e2af;
}
#custom-dynamic-island.idle {
color: #7f849c;
}
#custom-media-prev,
#custom-media-toggle,
#custom-media-next {
min-width: 20px;
padding: 0 9px;
color: #cdd6f4;
border-radius: 14px;
}
#custom-media-prev:hover,
#custom-media-toggle:hover,
#custom-media-next:hover {
color: #000000;
background: #00ff9c;
}
#window {
min-width: 90px;
color: #cccccc;
}
window#waybar.empty #window {
min-width: 0;
padding: 0;
color: transparent;
}
#clock {
padding-right: 16px;
color: #a6e3a1;
}
.island-drawer {
color: #7f849c;
}
#cpu,
#memory,
#temperature,
#pulseaudio,
#network,
#battery,
#custom-notifications,
#tray {
margin: 0 2px;
padding: 0 10px;
background: rgba(24, 24, 37, 0.72);
border: 1px solid rgba(40, 40, 55, 0.8);
border-radius: 16px;
}
#cpu {
color: #89b4fa;
}
#memory {
color: #f9e2af;
}
#temperature {
color: #a6e3a1;
}
#temperature.critical {
color: #f38ba8;
background: rgba(40, 40, 55, 0.8);
}
#pulseaudio {
color: #fab387;
}
#pulseaudio.muted {
color: #7f849c;
}
#network {
color: #89dceb;
}
#network.disconnected {
color: #f38ba8;
}
#battery {
color: #a6e3a1;
}
#battery.warning {
color: #f9e2af;
}
#battery.critical {
color: #f38ba8;
background: rgba(40, 40, 55, 0.8);
}
#custom-notifications {
color: #cba6f7;
}
#tray {
padding-right: 12px;
}