Skip to content

Commit e31b6a4

Browse files
unhappychoiceclaude
andcommitted
docs: add screensaver integration examples for Hyprland, Sway, i3, and X11
Add comprehensive screensaver integration section with configuration examples for: - Hyprland with hypridle - Sway with swayidle - i3 with xautolock - X11 with xidlehook - Standalone screensaver script for any setup Includes window rules, idle timeouts, DPMS control, and pro tips. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 047d7ca commit e31b6a4

1 file changed

Lines changed: 127 additions & 0 deletions

File tree

docs/usage.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,133 @@ Then use:
360360
gitlogue-menu
361361
```
362362

363+
### Screensaver Integration
364+
365+
gitlogue can be integrated with idle daemons to automatically start when your system is idle.
366+
367+
#### Hyprland with hypridle
368+
369+
Add to `~/.config/hypr/hypridle.conf`:
370+
371+
```bash
372+
general {
373+
lock_cmd = pidof gitlogue || alacritty --class gitlogue-screensaver -e gitlogue
374+
before_sleep_cmd = loginctl lock-session
375+
after_sleep_cmd = hyprctl dispatch dpms on
376+
}
377+
378+
listener {
379+
timeout = 300 # 5 minutes
380+
on-timeout = loginctl lock-session
381+
}
382+
383+
listener {
384+
timeout = 600 # 10 minutes
385+
on-timeout = hyprctl dispatch dpms off
386+
on-resume = hyprctl dispatch dpms on
387+
}
388+
```
389+
390+
And in `~/.config/hypr/hyprland.conf`:
391+
392+
```bash
393+
# Window rules for gitlogue screensaver
394+
windowrulev2 = float,class:^(gitlogue-screensaver)$
395+
windowrulev2 = fullscreen,class:^(gitlogue-screensaver)$
396+
windowrulev2 = noblur,class:^(gitlogue-screensaver)$
397+
398+
# Start hypridle
399+
exec-once = hypridle
400+
```
401+
402+
Exit with Esc or any key to unlock.
403+
404+
#### Sway with swayidle
405+
406+
Add to `~/.config/sway/config`:
407+
408+
```bash
409+
# Screensaver with swayidle
410+
exec swayidle -w \
411+
timeout 300 'alacritty --class gitlogue-screensaver -e gitlogue' \
412+
timeout 600 'swaymsg "output * dpms off"' \
413+
resume 'swaymsg "output * dpms on"' \
414+
before-sleep 'swaylock -f'
415+
416+
# Window rules for gitlogue screensaver
417+
for_window [app_id="gitlogue-screensaver"] fullscreen enable, floating enable
418+
```
419+
420+
#### i3 with xautolock
421+
422+
Add to `~/.config/i3/config`:
423+
424+
```bash
425+
# Screensaver with xautolock
426+
exec --no-startup-id xautolock -time 5 -locker 'alacritty --class gitlogue-screensaver -e gitlogue'
427+
428+
# Window rules for gitlogue screensaver
429+
for_window [class="gitlogue-screensaver"] fullscreen enable, floating enable
430+
```
431+
432+
#### X11 with xidlehook
433+
434+
For more advanced idle detection:
435+
436+
```bash
437+
# Install xidlehook
438+
# Arch: pacman -S xidlehook
439+
# Ubuntu: cargo install xidlehook
440+
441+
# Add to your WM startup or ~/.xinitrc
442+
xidlehook \
443+
--not-when-fullscreen \
444+
--not-when-audio \
445+
--timer 300 \
446+
'alacritty --class gitlogue-screensaver -e gitlogue' \
447+
'pkill gitlogue' \
448+
--timer 600 \
449+
'xset dpms force off' \
450+
'xset dpms force on'
451+
```
452+
453+
#### Standalone Screensaver Script
454+
455+
For any setup, create a simple script:
456+
457+
```bash
458+
#!/bin/bash
459+
# ~/.local/bin/gitlogue-screensaver
460+
461+
# Pick a random repository from your projects
462+
REPOS=(
463+
~/Projects/my-project
464+
~/Projects/another-project
465+
~/work/important-repo
466+
)
467+
REPO="${REPOS[$RANDOM % ${#REPOS[@]}]}"
468+
469+
# Launch gitlogue in fullscreen
470+
cd "$REPO"
471+
alacritty --class gitlogue-screensaver --title "Screensaver" \
472+
-o "window.opacity=0.95" \
473+
-e gitlogue --theme tokyo-night --speed 20
474+
```
475+
476+
Make it executable:
477+
478+
```bash
479+
chmod +x ~/.local/bin/gitlogue-screensaver
480+
```
481+
482+
Use with any idle daemon by calling `gitlogue-screensaver` instead of `alacritty -e gitlogue`.
483+
484+
**Pro tips**:
485+
- Use `--speed 15-20` for more dynamic screensaver effect
486+
- Match the theme with your desktop environment
487+
- Consider using `--background=false` for transparent terminals
488+
- Add multiple repositories to randomly cycle through different projects
489+
363490
### Desktop Ricing
364491

365492
gitlogue is perfect for r/unixporn-style desktop customization and tiling window manager setups.

0 commit comments

Comments
 (0)