Skip to content

Commit a9a4294

Browse files
committed
feat(desktop): add laptop profile with greetd, waybar, hyprlock, ghostty
- Add greetd + tuigreet setup (replaces sddm) - Add waybar configuration - Add hyprlock configuration - Add ghostty terminal config - Add hypr-scale utility script - Add claude code installation script - Update hyprland config for laptop - Update packages and profiles for laptop support
1 parent 525dd5f commit a9a4294

18 files changed

Lines changed: 478 additions & 58 deletions

.chezmoi.toml.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
{{- $profile := promptString "profile" -}}
22
{{- $include_defaults := true -}}
33
{{- $is_desktop := false -}}
4+
{{- $is_laptop := false -}}
45
{{- if eq $profile "default" -}}
56
{{- $include_defaults = true -}}
67
{{- else if eq $profile "onXmaps" -}}
78
{{- $include_defaults = true -}}
89
{{- else if eq $profile "desktop" -}}
910
{{- $include_defaults = true -}}
1011
{{- $is_desktop = true -}}
12+
{{- else if eq $profile "laptop" -}}
13+
{{- $include_defaults = true -}}
14+
{{- $is_desktop = true -}}
15+
{{- $is_laptop = true -}}
1116
{{- end -}}
1217
[data]
1318
profile = {{ $profile | quote }}
1419
include_defaults = {{ $include_defaults }}
1520
is_desktop = {{ $is_desktop }}
21+
is_laptop = {{ $is_laptop }}
1622

1723
[diff]
1824
pager = "less"

.chezmoidata/packages.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,25 @@ common:
1212
- bind # dig
1313
- whois
1414

15-
npm:
16-
global:
17-
- "@anthropic-ai/claude-code"
18-
1915
# Arch Linux packages (desktop profile only)
2016
arch:
2117
packages:
18+
# Core Hyprland desktop
19+
- ghostty
20+
- rofi-wayland
21+
- waybar
22+
- hyprlock
23+
- dolphin
24+
- polkit-kde-agent
25+
# Login manager
26+
- greetd
27+
- greetd-tuigreet
28+
# Fonts
29+
- ttf-hack-nerd
30+
# Media/brightness controls
31+
- playerctl
32+
- brightnessctl
33+
# System
2234
- tailscale
2335
- hyprshot
2436
- flatpak
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
# Install Claude Code via native installer
3+
# This script runs when its content changes
4+
5+
{{ if .include_defaults -}}
6+
set -e
7+
8+
CLAUDE_BIN="$HOME/.local/bin/claude"
9+
10+
# Check if Claude is already installed
11+
if [ -x "$CLAUDE_BIN" ]; then
12+
echo "✓ Claude Code already installed"
13+
exit 0
14+
fi
15+
16+
echo "📦 Installing Claude Code..."
17+
curl -fsSL https://claude.ai/install.sh | bash
18+
19+
if [ -x "$CLAUDE_BIN" ]; then
20+
echo "✓ Claude Code installed successfully"
21+
else
22+
echo "⚠️ Claude Code installation may have failed"
23+
exit 1
24+
fi
25+
{{ end -}}

.chezmoiscripts/run_onchange_after_install-npm-packages.sh.tmpl

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
# Configure greetd + tuigreet as display manager
3+
# This script runs when the config changes
4+
# Only runs on desktop profile
5+
6+
{{ if .is_desktop -}}
7+
set -e
8+
9+
# Check if greetd is installed
10+
if ! command -v greetd >/dev/null 2>&1; then
11+
echo "greetd not installed yet, skipping setup"
12+
exit 0
13+
fi
14+
15+
if ! command -v tuigreet >/dev/null 2>&1; then
16+
echo "tuigreet not installed yet, skipping setup"
17+
exit 0
18+
fi
19+
20+
echo "Configuring greetd + tuigreet..."
21+
22+
# Create greetd config
23+
sudo tee /etc/greetd/config.toml > /dev/null << 'EOF'
24+
[terminal]
25+
vt = 1
26+
27+
[default_session]
28+
command = "tuigreet --sessions /usr/share/wayland-sessions --time --remember --remember-session --asterisks --window-padding 2 --theme 'border=#282828;text=#c8c8c8;prompt=#c8c8c8;time=#c8c8c8;action=#c8c8c8;button=#282828;container=#0a0a0a;input=#c8c8c8'"
29+
user = "greeter"
30+
EOF
31+
32+
# Disable sddm first if it's enabled (don't fail if not present)
33+
if systemctl is-enabled sddm >/dev/null 2>&1; then
34+
echo "Disabling sddm service..."
35+
sudo systemctl disable sddm
36+
fi
37+
38+
# Enable greetd service
39+
if ! systemctl is-enabled greetd >/dev/null 2>&1; then
40+
echo "Enabling greetd service..."
41+
sudo systemctl enable greetd
42+
fi
43+
44+
echo "greetd configured. Changes take effect on next boot."
45+
echo "To switch now: sudo systemctl stop sddm && sudo systemctl start greetd"
46+
47+
{{ else -}}
48+
# Not desktop profile, skip
49+
{{ end -}}

.chezmoiscripts/run_onchange_after_setup-home-assistant.sh.tmpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
{{ if and .include_defaults .is_desktop -}}
66
set -e
77

8+
# Only run if Stream Deck is connected
9+
if ! lsusb 2>/dev/null | grep -q "0fd9:"; then
10+
exit 0
11+
fi
12+
813
CREDS_DIR="$HOME/.config/home-assistant"
914
CREDS_FILE="$CREDS_DIR/credentials"
1015

CLAUDE.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,58 @@ chmod 600 ~/.config/home-assistant/credentials
257257
- Never commit credentials to any repository
258258
- The token grants full API access to your HA instance - keep it secure
259259

260+
## Nerd Font Icons (Desktop Profile)
261+
262+
When adding icons to waybar, scripts, or other desktop tools, **always use Nerd Font icons** (monochrome glyphs) instead of standard Unicode emoji.
263+
264+
### Resources
265+
266+
- **Cheat Sheet**: https://www.nerdfonts.com/cheat-sheet
267+
- **Installed Font**: `ttf-hack-nerd` (in packages.yaml)
268+
269+
### Common Icons
270+
271+
| Purpose | Icon | Codepoint | Name |
272+
|---------|------|-----------|------|
273+
| Volume high | | U+F028 | nf-fa-volume_high |
274+
| Volume low | | U+F027 | nf-fa-volume_low |
275+
| Volume muted | | U+F026 | nf-fa-volume_off |
276+
| Wifi | | U+F1EB | nf-fa-wifi |
277+
| Ethernet | | U+F796 | nf-fa-ethernet |
278+
| Warning | | U+F071 | nf-fa-warning |
279+
| Battery full | | U+F240 | nf-fa-battery_full |
280+
| Battery 3/4 | | U+F241 | nf-fa-battery_three_quarters |
281+
| Battery 1/2 | | U+F242 | nf-fa-battery_half |
282+
| Battery 1/4 | | U+F243 | nf-fa-battery_quarter |
283+
| Battery empty | | U+F244 | nf-fa-battery_empty |
284+
| Charging/bolt | | U+F0E7 | nf-fa-bolt |
285+
| Plug | | U+F1E6 | nf-fa-plug |
286+
| Search/magnify | | U+F002 | nf-fa-search |
287+
288+
### Writing Nerd Font Icons in Files
289+
290+
**IMPORTANT**: The Edit/Write tools may strip special Unicode characters. Use `printf` with escaped codepoints via Bash instead:
291+
292+
```bash
293+
# Single icon
294+
printf '\uf028' # Volume high
295+
296+
# In a file (e.g., JSON config)
297+
printf ' "format-wifi": "%s {essid}",\n' "$(printf '\uf1eb')" >> config.json
298+
299+
# Multiple icons in an array
300+
printf ' "format-icons": ["%s", "%s", "%s"]\n' \
301+
"$(printf '\uf244')" "$(printf '\uf243')" "$(printf '\uf240')" >> config.json
302+
```
303+
304+
### Verifying Icons
305+
306+
Check that bytes were written correctly:
307+
```bash
308+
grep "format-wifi" config.json | xxd | head -5
309+
# Should see bytes like: ef87ab (UTF-8 for U+F1EB)
310+
```
311+
260312
## Audio Toggle (Desktop Profile)
261313

262314
The `audio-toggle` script switches between two audio outputs (e.g., HDMI speakers and USB headphones). Device names are machine-specific and configured locally.

dot_bashrc.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ alias grep='grep --color=auto'
1010
# Default prompt
1111
PS1='[\u@\h \W]\$ '
1212

13+
# Add local bin to PATH (where Claude and other tools are installed)
14+
export PATH="$HOME/.local/bin:$PATH"
15+
1316
# Mise activation
1417
if command -v mise &> /dev/null; then
1518
eval "$(mise activate bash)"

dot_config/fish/config.fish.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# ~/.config/fish/config.fish - managed by chezmoi
2+
3+
# Disable greeting
4+
set -g fish_greeting
5+
26
{{ if eq .profile "desktop" -}}
37
# CachyOS fish configuration
48
source /usr/share/cachyos-fish-config/cachyos-config.fish

dot_config/ghostty/config.tmpl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{ if .is_desktop -}}
2+
# Font
3+
font-family = Hack Nerd Font
4+
font-size = 11
5+
6+
# Minimal monochrome theme
7+
background = #0a0a0a
8+
foreground = #c8c8c8
9+
10+
# No titlebar
11+
gtk-titlebar = false
12+
13+
# Padding
14+
window-padding-x = 8
15+
window-padding-y = 8
16+
{{ end -}}

0 commit comments

Comments
 (0)