Compare commits
8 Commits
v2.0.0
...
de250099c2
| Author | SHA1 | Date | |
|---|---|---|---|
| de250099c2 | |||
|
|
dba9a719d5 | ||
| 49a3d29ca1 | |||
|
|
bdad1fa3f8 | ||
| 27be8a7ced | |||
|
41a0f8697e
|
|||
|
|
a84d83ab29 | ||
| aa2feb3462 |
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*.gif filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
4
Makefile
@@ -36,7 +36,9 @@ lidm: $(OBJ)
|
|||||||
$(CC) -o $@ $^ $(ALLFLAGS) $(LIBS) $(LDFLAGS)
|
$(CC) -o $@ $^ $(ALLFLAGS) $(LIBS) $(LDFLAGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(ODIR)/*.o lidm
|
rm -f \
|
||||||
|
$(ODIR)/* \
|
||||||
|
lidm
|
||||||
|
|
||||||
install: lidm
|
install: lidm
|
||||||
mkdir -p ${DESTDIR}${PREFIX}/bin ${DESTDIR}${PREFIX}/share/man/man{1,5}
|
mkdir -p ${DESTDIR}${PREFIX}/bin ${DESTDIR}${PREFIX}/share/man/man{1,5}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 205 KiB After Width: | Height: | Size: 131 B |
@@ -11,7 +11,7 @@ let
|
|||||||
dmcfg = config.services.displayManager;
|
dmcfg = config.services.displayManager;
|
||||||
desktops = dmcfg.sessionData.desktops;
|
desktops = dmcfg.sessionData.desktops;
|
||||||
|
|
||||||
version = "1.2.3";
|
version = "2.0.0";
|
||||||
lidmPkg = pkgs.callPackage ./lidm.nix {
|
lidmPkg = pkgs.callPackage ./lidm.nix {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
config = {
|
config = {
|
||||||
@@ -21,7 +21,7 @@ let
|
|||||||
owner = "javalsai";
|
owner = "javalsai";
|
||||||
repo = "lidm";
|
repo = "lidm";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-eKgBoh+bRcl2Y7oOxW77Kjtb9Ws2Xln1SenknIsGxD4=";
|
sha256 = "sha256-dI1OGndbT6wFAhuGmsPZPqLFvtPREfO/3HqhmlSMpN4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
xsessions = "${desktops}/share/xsessions";
|
xsessions = "${desktops}/share/xsessions";
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ install-service:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
install-service-systemd:
|
install-service-systemd:
|
||||||
install -Dm644 ./assets/services/systemd.service ${DESTDIR}${PREFIX}/lib/systemd/system/lidm.service
|
@sed -e 's|ExecStart=/usr/bin/lidm|ExecStart=${DESTDIR}${PREFIX}/bin/lidm|' ./assets/services/systemd.service > ./dist/lidm.service
|
||||||
|
install -Dm644 ./dist/lidm.service ${DESTDIR}${PREFIX}/lib/systemd/system/lidm.service
|
||||||
@printf '\033[1m%s\033[0m\n\n' " don't forget to run 'systemctl enable lidm'"
|
@printf '\033[1m%s\033[0m\n\n' " don't forget to run 'systemctl enable lidm'"
|
||||||
install-service-dinit:
|
install-service-dinit:
|
||||||
install -m644 ./assets/services/dinit ${DESTDIR}/etc/dinit.d/lidm
|
install -m644 ./assets/services/dinit ${DESTDIR}/etc/dinit.d/lidm
|
||||||
|
|||||||
5
src/ui.c
@@ -472,8 +472,9 @@ void print_user(struct user user, bool multiple) {
|
|||||||
toprint += get_render_pos_offset(&of_session, maxlen);
|
toprint += get_render_pos_offset(&of_session, maxlen);
|
||||||
size_t printlen = utf8seekn(toprint, maxlen) - toprint;
|
size_t printlen = utf8seekn(toprint, maxlen) - toprint;
|
||||||
|
|
||||||
printf("\r\x1b[%dC< \x1b[%sm%.*s\x1b[%sm >", box_start.x + VALUES_COL - 1,
|
printf("\r\x1b[%dC%s\x1b[%sm%.*s\x1b[%sm%s", box_start.x + VALUES_COL - 1,
|
||||||
user_color, (int)printlen, toprint, g_config->colors.fg);
|
g_config->strings.opts_pre, user_color, (int)printlen, toprint,
|
||||||
|
g_config->colors.fg, g_config->strings.opts_post);
|
||||||
} else {
|
} else {
|
||||||
toprint += get_render_pos_offset(&of_user, VALUE_MAXLEN);
|
toprint += get_render_pos_offset(&of_user, VALUE_MAXLEN);
|
||||||
size_t printlen = utf8seekn(toprint, VALUE_MAXLEN) - toprint;
|
size_t printlen = utf8seekn(toprint, VALUE_MAXLEN) - toprint;
|
||||||
|
|||||||
@@ -1,5 +1,21 @@
|
|||||||
# Themes
|
# Themes
|
||||||
|
|
||||||
|
## catppuccin-frappe.ini
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## catppuccin-latte.ini
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## catppuccin-macchiato.ini
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## catppuccin-mocha.ini
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## cherry.ini
|
## cherry.ini
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
24
themes/catppuccin-frappe.ini
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
##############################################
|
||||||
|
# #
|
||||||
|
# Catppuccin Theme #
|
||||||
|
# #
|
||||||
|
##############################################
|
||||||
|
|
||||||
|
# Catppuccin Frappé
|
||||||
|
# This theme was created by: Catppuccin Org! <3
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
bg = "23;24;25;48;2;48;52;70"
|
||||||
|
fg = "22;23;24;25;29;38;2;198;208;245"
|
||||||
|
err = "1;4;23;24;25;38;2;231;130;132"
|
||||||
|
s_wayland = "3;22;24;25;38;2;202;158;230"
|
||||||
|
s_xorg = "3;22;24;25;38;2;202;158;230"
|
||||||
|
s_shell = "3;22;24;25;38;2;244;184;228"
|
||||||
|
e_hostname = "1;3;24;25;29;38;2;242;213;207"
|
||||||
|
e_date = "3;22;24;25;29;38;2;165;173;206"
|
||||||
|
e_box = "1;23;24;25;29;38;2;115;121;148"
|
||||||
|
e_header = "1;3;24;25;29;38;2;239;159;118"
|
||||||
|
e_user = "3;22;24;25;29;38;2;140;170;238"
|
||||||
|
e_passwd = "1;23;24;25;29;38;2;166;209;137"
|
||||||
|
e_badpasswd = "1;9;23;24;25;38;2;231;130;132"
|
||||||
|
e_key = "22;23;24;25;38;2;129;200;190"
|
||||||
24
themes/catppuccin-latte.ini
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
##############################################
|
||||||
|
# #
|
||||||
|
# Catppuccin Theme #
|
||||||
|
# #
|
||||||
|
##############################################
|
||||||
|
|
||||||
|
# Catppuccin Latte
|
||||||
|
# This theme was created by: Catppuccin Org! <3
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
bg = "23;24;25;48;2;239;241;245"
|
||||||
|
fg = "22;23;24;25;29;38;2;76;79;105"
|
||||||
|
err = "1;4;23;24;25;38;2;210;15;57"
|
||||||
|
s_wayland = "3;22;24;25;38;2;136;57;239"
|
||||||
|
s_xorg = "3;22;24;25;38;2;136;57;239"
|
||||||
|
s_shell = "3;22;24;25;38;2;234;118;203"
|
||||||
|
e_hostname = "1;3;24;25;29;38;2;220;138;120"
|
||||||
|
e_date = "3;22;24;25;29;38;2;108;111;133"
|
||||||
|
e_box = "1;23;24;25;29;38;2;156;160;176"
|
||||||
|
e_header = "1;3;24;25;29;38;2;254;100;11"
|
||||||
|
e_user = "3;22;24;25;29;38;2;30;102;245"
|
||||||
|
e_passwd = "1;23;24;25;29;38;2;64;160;43"
|
||||||
|
e_badpasswd = "1;9;23;24;25;38;2;210;15;57"
|
||||||
|
e_key = "22;23;24;25;38;2;23;146;153"
|
||||||
24
themes/catppuccin-macchiato.ini
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
##############################################
|
||||||
|
# #
|
||||||
|
# Catppuccin Theme #
|
||||||
|
# #
|
||||||
|
##############################################
|
||||||
|
|
||||||
|
# Catppuccin Macchiato
|
||||||
|
# This theme was created by: Catppuccin Org! <3
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
bg = "23;24;25;48;2;36;39;58"
|
||||||
|
fg = "22;23;24;25;29;38;2;202;211;245"
|
||||||
|
err = "1;4;23;24;25;38;2;237;135;150"
|
||||||
|
s_wayland = "3;22;24;25;38;2;198;160;246"
|
||||||
|
s_xorg = "3;22;24;25;38;2;198;160;246"
|
||||||
|
s_shell = "3;22;24;25;38;2;245;189;230"
|
||||||
|
e_hostname = "1;3;24;25;29;38;2;244;219;214"
|
||||||
|
e_date = "3;22;24;25;29;38;2;165;173;203"
|
||||||
|
e_box = "1;23;24;25;29;38;2;110;115;141"
|
||||||
|
e_header = "1;3;24;25;29;38;2;245;169;127"
|
||||||
|
e_user = "3;22;24;25;29;38;2;138;173;244"
|
||||||
|
e_passwd = "1;23;24;25;29;38;2;166;218;149"
|
||||||
|
e_badpasswd = "1;9;23;24;25;38;2;237;135;150"
|
||||||
|
e_key = "22;23;24;25;38;2;139;213;202"
|
||||||
24
themes/catppuccin-mocha.ini
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
##############################################
|
||||||
|
# #
|
||||||
|
# Catppuccin Theme #
|
||||||
|
# #
|
||||||
|
##############################################
|
||||||
|
|
||||||
|
# Catppuccin Mocha
|
||||||
|
# This theme was created by: Catppuccin Org! <3
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
bg = "23;24;25;48;2;30;30;46"
|
||||||
|
fg = "22;23;24;25;29;38;2;205;214;244"
|
||||||
|
err = "1;4;23;24;25;38;2;243;139;168"
|
||||||
|
s_wayland = "3;22;24;25;38;2;203;166;247"
|
||||||
|
s_xorg = "3;22;24;25;38;2;203;166;247"
|
||||||
|
s_shell = "3;22;24;25;38;2;245;194;231"
|
||||||
|
e_hostname = "1;3;24;25;29;38;2;245;224;220"
|
||||||
|
e_date = "3;22;24;25;29;38;2;166;173;200"
|
||||||
|
e_box = "1;23;24;25;29;38;2;108;112;134"
|
||||||
|
e_header = "1;3;24;25;29;38;2;250;179;135"
|
||||||
|
e_user = "3;22;24;25;29;38;2;137;180;250"
|
||||||
|
e_passwd = "1;23;24;25;29;38;2;166;227;161"
|
||||||
|
e_badpasswd = "1;9;23;24;25;38;2;243;139;168"
|
||||||
|
e_key = "22;23;24;25;38;2;148;226;213"
|
||||||
35
themes/catppuccin.tera
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
whiskers:
|
||||||
|
version: ^2.5.1
|
||||||
|
matrix:
|
||||||
|
- flavor
|
||||||
|
filename: catppuccin-{{ flavor.identifier }}.ini
|
||||||
|
---
|
||||||
|
{%- macro rgb(col) -%}
|
||||||
|
2;{{ col.rgb.r }};{{ col.rgb.g }};{{ col.rgb.b }}
|
||||||
|
{%- endmacro rgb -%}
|
||||||
|
|
||||||
|
##############################################
|
||||||
|
# #
|
||||||
|
# Catppuccin Theme #
|
||||||
|
# #
|
||||||
|
##############################################
|
||||||
|
|
||||||
|
# Catppuccin {{flavor.name}}
|
||||||
|
# This theme was created by: Catppuccin Org! <3
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
bg = "23;24;25;48;{{ self::rgb(col=base) }}"
|
||||||
|
fg = "22;23;24;25;29;38;{{ self::rgb(col=text) }}"
|
||||||
|
err = "1;4;23;24;25;38;{{ self::rgb(col=red) }}"
|
||||||
|
s_wayland = "3;22;24;25;38;{{ self::rgb(col=mauve) }}"
|
||||||
|
s_xorg = "3;22;24;25;38;{{ self::rgb(col=mauve) }}"
|
||||||
|
s_shell = "3;22;24;25;38;{{ self::rgb(col=pink) }}"
|
||||||
|
e_hostname = "1;3;24;25;29;38;{{ self::rgb(col=rosewater) }}"
|
||||||
|
e_date = "3;22;24;25;29;38;{{ self::rgb(col=subtext0) }}"
|
||||||
|
e_box = "1;23;24;25;29;38;{{ self::rgb(col=overlay0) }}"
|
||||||
|
e_header = "1;3;24;25;29;38;{{ self::rgb(col=peach) }}"
|
||||||
|
e_user = "3;22;24;25;29;38;{{ self::rgb(col=blue) }}"
|
||||||
|
e_passwd = "1;23;24;25;29;38;{{ self::rgb(col=green) }}"
|
||||||
|
e_badpasswd = "1;9;23;24;25;38;{{ self::rgb(col=red) }}"
|
||||||
|
e_key = "22;23;24;25;38;{{ self::rgb(col=teal) }}"
|
||||||
3
themes/screenshots/catppuccin-frappe.png
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0704a1aadffee71bc0753c861d8ac8b8588aae76ad8cdcb4f2c2700b98ec095c
|
||||||
|
size 23814
|
||||||
3
themes/screenshots/catppuccin-latte.png
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:58d56d6e16e14f0eddaa8a11e8bf238f2056e784b9c7c46d88aa8ff2d948355e
|
||||||
|
size 23110
|
||||||
3
themes/screenshots/catppuccin-macchiato.png
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:225dba8cf87de1ae7118bfd98a1966fdb92cc826418dd9ef7dda5ee77ae8d0f3
|
||||||
|
size 23886
|
||||||
3
themes/screenshots/catppuccin-mocha.png
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0c8269cc55fdc26bfff240b3dccd94ffab6400b33c049af23912b74a62247943
|
||||||
|
size 23826
|
||||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 130 B |
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
MYSELF=$(realpath "$0")
|
MYSELF=$(realpath "$0")
|
||||||
@@ -16,7 +17,7 @@ if [[ -z "$IM_FLOATING" ]]; then
|
|||||||
# 12 pts ≈ 16 px
|
# 12 pts ≈ 16 px
|
||||||
exec hyprctl dispatch exec \
|
exec hyprctl dispatch exec \
|
||||||
"[float; size $((COLS*16)) $((ROWS*16))]" \
|
"[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
|
fi
|
||||||
|
|
||||||
LIDM_PATH=${LIDM_PATH:-$(command which lidm)}
|
LIDM_PATH=${LIDM_PATH:-$(command which lidm)}
|
||||||
@@ -44,23 +45,26 @@ 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)
|
PRAD=$(hyprctl getoption decoration:rounding | rg int | cut -d' ' -f2)
|
||||||
hyprctl keyword decoration:rounding 0
|
hyprctl keyword decoration:rounding 0
|
||||||
|
|
||||||
tty=$(tty)
|
|
||||||
for theme in "$MYDIR"/*.ini; do
|
for theme in "$MYDIR"/*.ini; do
|
||||||
LIDM_CONF="$theme" "$LIDM_PATH" <"$tty" &
|
LIDM_CONF="$theme" "$LIDM_PATH" &
|
||||||
LIDM_PID=$!
|
LIDM_PID=$!
|
||||||
|
|
||||||
sleep .2
|
(
|
||||||
for n in $(seq "$LIDM_SESSIONS_N"); do
|
sleep .2
|
||||||
GEOMETRY=$(
|
for n in $(seq "$LIDM_SESSIONS_N"); do
|
||||||
hyprctl -j activewindow | \
|
GEOMETRY=$(
|
||||||
jq -r '(.at[0]|tostring) + "," + (.at[1]|tostring) + " " + (.size[0]|tostring) + "x" + (.size[1]|tostring)'
|
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"
|
grim -g "$GEOMETRY" - > "$MYDIR/screenshots/$(basename "$theme" | cut -d. -f1)-$n.png"
|
||||||
wtype -k right
|
notify-send "$n taken"
|
||||||
sleep .5
|
wtype -k right
|
||||||
done
|
sleep .5
|
||||||
kill -15 $LIDM_PID
|
done
|
||||||
|
kill -15 $LIDM_PID
|
||||||
|
) &
|
||||||
|
|
||||||
|
fg %-
|
||||||
sleep .5
|
sleep .5
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -68,9 +72,9 @@ gifski \
|
|||||||
-Q 95 --fps 4 \
|
-Q 95 --fps 4 \
|
||||||
-W $((COLS*32)) \
|
-W $((COLS*32)) \
|
||||||
-o "$MYDIR/../assets/media/lidm.gif" \
|
-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
|
# shellcheck disable=SC2001
|
||||||
mv "$screenshot" "$(sed 's/-[0-9]\.png/.png/' <<<"$screenshot")"
|
mv "$screenshot" "$(sed 's/-[0-9]\.png/.png/' <<<"$screenshot")"
|
||||||
|
|
||||||
|
|||||||