feat: restore rofi instead of wofi

This commit is contained in:
2025-11-02 03:00:57 +01:00
parent 4658b8392e
commit 9105831fbb
9 changed files with 124 additions and 4845 deletions

View File

@@ -1,3 +1,3 @@
{pkgs, ...}:
pkgs.writeShellScriptBin "askpass" ''
${pkgs.wofi}/bin/wofi -d -P -L 1 -p "$(printf $1 | sed s/://)"''
${pkgs.rofi}/bin/rofi -dmenu -password -no-fixed-num-lines -p $(printf \"$*\" | sed 's/://')''

View File

@@ -1,18 +0,0 @@
{pkgs, ...}:
pkgs.writeShellScriptBin "rofi-emoji" ''
SELECTED_EMOJI=$(grep -v "#" ~/.config/emoji | ${pkgs.wofi}/bin/wofi --dmenu -p "Select emoji" -i | awk '{print $1}' | tr -d '\n')
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
printf "%s" "$SELECTED_EMOJI" | ${pkgs.wl-clipboard-rs}/bin/wl-copy
else
printf "%s" "$SELECTED_EMOJI" | ${pkgs.xclip}/bin/xclip -sel clip
fi
if [ "$XDG_SESSION_TYPE" = "wayland" ]
then EMOJI=$(${pkgs.wl-clipboard-rs}/bin/wl-paste)
else EMOJI=$(${pkgs.xclip}/bin/xclip -o)
fi
test -z "$EMOJI" && notify-send "No emoji copied" -u low && exit
EMOJI="$EMOJI copied to clipboard"
${pkgs.libnotify}/bin/notify-send -u low "$EMOJI"
''

View File

@@ -1,6 +1,6 @@
{pkgs, ...}:
pkgs.writeShellScriptBin "ytplay" ''
URL=$(${pkgs.wofi}/bin/wofi --dmenu -i -p "Video URL")
URL=$(rofi -dmenu -i -p "Video URL")
if [ -z "$URL" ]; then
echo "You need to provide a URL"
exit 1
@@ -9,7 +9,7 @@ pkgs.writeShellScriptBin "ytplay" ''
grep -E "webm.*[0-9]+x[0-9]" | \
awk '{print $3 " " $1}' | \
sort -gu | \
${pkgs.wofi}/bin/wofi --dmenu -i -p "Resolution")
rofi -dmenu -i -p "Resolution")
mapfile -t RESOLUTION <<< "$RESOLUTION_CHOICE"
RESOLUTION_CODE=''${RESOLUTION[0]}
${pkgs.mpv}/bin/mpv --ytdl-format="''${RESOLUTION_CODE}+bestaudio/best" "$URL"