Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.gif filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
Binary file modified assets/media/lidm.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions themes/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Themes

## catppuccin-frappe.ini

![catppuccin-frappe.ini theme](./screenshots/catppuccin-frappe.png)

## catppuccin-latte.ini

![catppuccin-latte.ini theme](./screenshots/catppuccin-latte.png)

## catppuccin-macchiato.ini

![catppuccin-macchiato.ini theme](./screenshots/catppuccin-macchiato.png)

## catppuccin-mocha.ini

![catppuccin-mocha.ini theme](./screenshots/catppuccin-mocha.png)

## cherry.ini

![cherry.ini theme](./screenshots/cherry.png)
Expand Down
3 changes: 3 additions & 0 deletions themes/screenshots/catppuccin-frappe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions themes/screenshots/catppuccin-latte.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions themes/screenshots/catppuccin-macchiato.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions themes/screenshots/catppuccin-mocha.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified themes/screenshots/cherry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified themes/screenshots/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified themes/screenshots/kanagawa-dragon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified themes/screenshots/kanagawa-wave.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified themes/screenshots/minimal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified themes/screenshots/nature.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified themes/screenshots/nord.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified themes/screenshots/nothing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified themes/screenshots/old-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified themes/screenshots/tasteless.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 21 additions & 17 deletions themes/take-screenshots.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash

set -e

MYSELF=$(realpath "$0")
Expand All @@ -16,7 +17,7 @@ if [[ -z "$IM_FLOATING" ]]; then
# 12 pts ≈ 16 px
exec hyprctl dispatch exec \
"[float; size $((COLS*16)) $((ROWS*16))]" \
"kitty --override font_size=12.0 --override background_opacity=1 --override cursor_trail=0 --override cursor_shape=beam --override cursor_blink_interval=0 bash -c 'cd \"$PWD\" && IM_FLOATING=1 LIDM_PATH=\"$LIDM_PATH\" LIDM_SCR_TTY=\"$(tty)\" LIDM_SESSIONS_N=\"$LIDM_SESSIONS_N\" \"$MYSELF\"'"
"kitty --override font_size=12.0 --override background_opacity=1 --override cursor_trail=0 --override cursor_shape=beam --override cursor_blink_interval=0 bash -c 'cd \"$PWD\" && IM_FLOATING=1 LIDM_PATH=\"$LIDM_PATH\" LIDM_SCR_TTY=\"$(tty)\" LIDM_SESSIONS_N=\"$LIDM_SESSIONS_N\" bash -i \"$MYSELF\"'"
fi

LIDM_PATH=${LIDM_PATH:-$(command which lidm)}
Expand Down Expand Up @@ -44,33 +45,36 @@ printf '\033]4;0;rgb:%s\007' "${BG:0:2}/${BG:2:2}/${BG:4:2}"
PRAD=$(hyprctl getoption decoration:rounding | rg int | cut -d' ' -f2)
hyprctl keyword decoration:rounding 0

tty=$(tty)
for theme in "$MYDIR"/*.ini; do
LIDM_CONF="$theme" "$LIDM_PATH" <"$tty" &
LIDM_CONF="$theme" "$LIDM_PATH" &
LIDM_PID=$!

sleep .2
for n in $(seq "$LIDM_SESSIONS_N"); do
GEOMETRY=$(
hyprctl -j activewindow | \
jq -r '(.at[0]|tostring) + "," + (.at[1]|tostring) + " " + (.size[0]|tostring) + "x" + (.size[1]|tostring)'
)
grim -g "$GEOMETRY" - > "$MYDIR/screenshots/$(basename "$theme" | cut -d. -f1)-$n.png"
notify-send "$n taken"
wtype -k right
sleep .5
done
kill -15 $LIDM_PID
(
sleep .2
for n in $(seq "$LIDM_SESSIONS_N"); do
GEOMETRY=$(
hyprctl -j activewindow | \
jq -r '(.at[0]|tostring) + "," + (.at[1]|tostring) + " " + (.size[0]|tostring) + "x" + (.size[1]|tostring)'
)
grim -g "$GEOMETRY" - > "$MYDIR/screenshots/$(basename "$theme" | cut -d. -f1)-$n.png"
notify-send "$n taken"
wtype -k right
sleep .5
done
kill -15 $LIDM_PID
) &

fg %-
sleep .5
done

gifski \
-Q 95 --fps 4 \
-W $((COLS*32)) \
-o "$MYDIR/../assets/media/lidm.gif" \
"$MYDIR"/screenshots/*.png &> "$LIDM_SCR_TTY"
"$MYDIR"/screenshots/*-?.png &> "$LIDM_SCR_TTY"

for screenshot in "$MYDIR"/screenshots/*"-1.png"; do
for screenshot in "$MYDIR"/screenshots/*"-2.png"; do
# shellcheck disable=SC2001
mv "$screenshot" "$(sed 's/-[0-9]\.png/.png/' <<<"$screenshot")"

Expand Down
Loading