commit 28947f43730aeb43983eb697debae6267b58abe6
parent b87d7247110a5460e1f2889413b4c95a310e0201
Author: awy <awy@awy.one>
Date: Sat, 19 Jul 2025 19:16:04 +0300
move to mew
Diffstat:
19 files changed, 44 insertions(+), 53 deletions(-)
diff --git a/.config/sway/config b/.config/sway/config
@@ -4,7 +4,7 @@ exec xrandr --output DP-3 --primary
set $mod Mod4
set $term footclient
set $browser firefox
-set $menu wmenu-run
+set $menu mew-run
font pango:monospace 10
@@ -99,7 +99,7 @@ bindsym $mod+Shift+q exec sysact
bindsym $mod+w exec $browser
bindsym $mod+e exec 'sh -c "$term -e neomutt; pkill -RTMIN+12 i3blocks"'
bindsym $mod+r exec $term -e yazi
-bindsym $mod+Shift+r exec $term -e htop
+bindsym $mod+Shift+r exec $term -e btop
bindsym $mod+d exec $menu
bindsym $mod+Shift+d exec tessen
bindsym $mod+Return exec $term
@@ -110,7 +110,7 @@ bindsym $mod+comma exec mpc prev
bindsym $mod+Shift+comma exec mpc seek 0%
bindsym $mod+period exec mpc next
bindsym $mod+Shift+period exec mpc repeat
-bindsym $mod+insert exec wtype $(grep -v '^#' ~/.local/share/larbs/snippets | wmenu -i -l 50 | cut -d' ' -f1)
+bindsym $mod+insert exec wtype $(grep -v '^#' ~/.local/share/larbs/snippets | mew -i -l 50 | cut -d' ' -f1)
bindsym $mod+f1 exec singboxwrap menu
bindsym $mod+f4 exec '$term -e pulsemixer; kill -44 $(pidof i3blocks)'
bindsym $mod+f6 exec torwrap
diff --git a/.config/swayimg/key-handler b/.config/swayimg/key-handler
@@ -1,17 +1,17 @@
#!/bin/sh
file=$1
[ -z "$selection" ] && selection=$(printf "w - Set as wallpaper\nc - Copy to dir\nm - Move to dir\nr - Rotate 90°\nR - Rotate -90°\nf - Flip horizontal\ny - Copy filename to clipboard\nY - Copy full path to clipboard\nd - Delete\ng - Open in GIMP\ni - Show media info" |
- wmenu -i -l 12 -p "Choose action for selected files:")
+ mew -i -l 12 -p "Choose action for selected files:")
action=$(printf "%s" "$selection" | cut -d'-' -f1 | tr -d ' ')
case "$action" in
"w") setbg "$file" & ;;
"c")
- [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | wmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
+ [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | mew -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." &
;;
"m")
- [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | wmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
+ [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | mew -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." &
;;
@@ -28,7 +28,7 @@ file=$1
readlink -f "$file" | tr -d '\n' | wl-copy &&
notify-send "$(readlink -f "$file") copied to clipboard" & ;;
"d")
- [ "$(printf "No\\nYes" | wmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
+ [ "$(printf "No\\nYes" | mew -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
"g") ifinstalled gimp && setsid -f gimp "$file" ;;
"i") notify-send "File information" "$(mediainfo "$file" | sed "s/[ ]\+:/:/g;s/: /: <b>/;s/$/<\/b>/" | grep "<b>")" ;;
*) notify-send "No keybind for that key" ;;
diff --git a/.local/bin/bookmarks b/.local/bin/bookmarks
@@ -8,7 +8,7 @@ CLIPBOARD() {
}
DMENU() {
- wmenu -i -l "${1}" -p "${2}"
+ mew -i -l "${1}" -p "${2}"
}
error_notify() {
diff --git a/.local/bin/dmenuhandler b/.local/bin/dmenuhandler
@@ -1,10 +1,10 @@
#!/bin/sh
-# Feed this script a link and it will give wmenu
+# Feed this script a link and it will give mew
# some choice programs to use to open it.
-feed="${1:-$(true | wmenu -p 'Paste URL or file path')}"
+feed="${1:-$(true | mew -p 'Paste URL or file path')}"
-case "$(printf "copy url\\nswayimg\\nsetbg\\nPDF\\nbrowser\\nlynx\\nvim\\nmpv\\nmpv loop\\nmpv float\\nqueue download\\nqueue yt-dlp\\nqueue yt-dlp audio" | wmenu -i -p "Open it with?")" in
+case "$(printf "copy url\\nswayimg\\nsetbg\\nPDF\\nbrowser\\nlynx\\nvim\\nmpv\\nmpv loop\\nmpv float\\nqueue download\\nqueue yt-dlp\\nqueue yt-dlp audio" | mew -i -p "Open it with?")" in
"copy url") echo "$feed" | wl-copy ;;
mpv) setsid -f mpv -quiet "$feed" >/dev/null 2>&1 ;;
"mpv loop") setsid -f mpv -quiet --loop "$feed" >/dev/null 2>&1 ;;
diff --git a/.local/bin/dmenumountcifs b/.local/bin/dmenumountcifs
@@ -1,12 +1,12 @@
#!/bin/sh
-# Gives a wmenu prompt to mount unmounted local NAS shares for read/write.
+# Gives a mew prompt to mount unmounted local NAS shares for read/write.
# Requirements - "%wheel ALL=(ALL) NOPASSWD: ALL"
#
# Browse for mDNS/DNS-SD services using the Avahi daemon...
-srvname=$(avahi-browse _smb._tcp -t | awk '{print $4}' | wmenu -i -p "Which NAS?") || exit 1
+srvname=$(avahi-browse _smb._tcp -t | awk '{print $4}' | mew -i -p "Which NAS?") || exit 1
notify-send "Searching for network shares..." "Please wait..."
# Choose share disk...
-share=$(smbclient -L "$srvname" -N | grep Disk | awk '{print $1}' | wmenu -i -p "Mount which share?") || exit 1
+share=$(smbclient -L "$srvname" -N | grep Disk | awk '{print $1}' | mew -i -p "Mount which share?") || exit 1
# Format URL...
share2mnt=//"$srvname".local/"$share"
diff --git a/.local/bin/dmenupass b/.local/bin/dmenupass
@@ -3,4 +3,4 @@
# This script is the SUDO_ASKPASS variable, meaning that it will be used as a
# password prompt if needed.
-wmenu -P -p "$1" <&-
+mew -P -p "$1" <&-
diff --git a/.local/bin/dmenurecord b/.local/bin/dmenurecord
@@ -1,7 +1,7 @@
#!/bin/sh
# Usage:
-# `$0`: Ask for recording type via wmenu
+# `$0`: Ask for recording type via mew
# `$0 screencast`: Record both audio and screen
# `$0 video`: Record only screen
# `$0 audio`: Record only audio
@@ -11,7 +11,7 @@
getdim() {
screens=$(swaymsg -t get_outputs | grep name | awk -F'"' '{print $4}')
- choice=$(printf "$screens\nExit\n" | wmenu)
+ choice=$(printf "$screens\nExit\n" | mew)
[ "${choice}" != "Exit" ] || [ -z "${choice}" ] || exit &&
echo $choice
}
@@ -77,7 +77,7 @@ audio() { \
}
askrecording() { \
- choice=$(printf "screencast\\nvideo\\nvideo selected\\naudio\\nwebcam\\nwebcam (hi-def)" | wmenu -i -p "Select recording style:")
+ choice=$(printf "screencast\\nvideo\\nvideo selected\\naudio\\nwebcam\\nwebcam (hi-def)" | mew -i -p "Select recording style:")
case "$choice" in
screencast) screencast;;
audio) audio;;
@@ -89,7 +89,7 @@ askrecording() { \
}
asktoend() { \
- response=$(printf "No\\nYes" | wmenu -i -p "Recording still active. End recording?") &&
+ response=$(printf "No\\nYes" | mew -i -p "Recording still active. End recording?") &&
[ "$response" = "Yes" ] && killrecording
}
diff --git a/.local/bin/dmenuunicode b/.local/bin/dmenuunicode
@@ -2,8 +2,8 @@
# The famous "get a menu of emojis to copy" script.
-# Get user selection via wmenu from emoji file.
-chosen=$(cut -d ';' -f1 ~/.local/share/larbs/chars/* | wmenu -i -l 30 | sed "s/ .*//")
+# Get user selection via mew from emoji file.
+chosen=$(cut -d ';' -f1 ~/.local/share/larbs/chars/* | mew -i -l 30 | sed "s/ .*//")
# Exit if none chosen.
[ -z "$chosen" ] && exit
diff --git a/.local/bin/doas_askpass b/.local/bin/doas_askpass
@@ -1,7 +1,7 @@
#!/usr/bin/expect --
# askpass implementation for doas
-# example usage: DOAS_ASKPASS="wmenu -P -p password:" doas_askpass echo working
+# example usage: DOAS_ASKPASS="mew -P -p password:" doas_askpass echo working
# don't mind the man behind the curtain
log_user 0
diff --git a/.local/bin/mounter b/.local/bin/mounter
@@ -1,11 +1,5 @@
#!/bin/bash
-# Mounts Android Phones and USB drives (encrypted or not). This script will
-# replace the older `wmenumount` which had extra steps and couldn't handle
-# encrypted drives.
-# TODO: Try decrypt for drives in crtypttab
-# TODO: Add some support for connecting iPhones (although they are annoying).
-
IFS='
'
# Function for escaping cell-phone names.
@@ -29,7 +23,7 @@ lsblkoutput="$(lsblk -rpo "uuid,name,type,size,label,mountpoint,fstype")"
allluks="$(echo "$lsblkoutput" | grep crypto_LUKS)"
# Get a list of the LUKS drive UUIDs already decrypted.
decrypted="$(find /dev/disk/by-id/dm-uuid-CRYPT-LUKS2-* | sed "s|.*LUKS2-||;s|-.*||")"
-# Functioning for formatting drives correctly for wmenu:
+# Functioning for formatting drives correctly for mew:
filter() { sed "s/ /:/g" | awk -F':' '$7==""{printf "%s%s (%s) %s\n",$1,$3,$5,$6}' ; }
# Get only LUKS drives that are not decrypted.
@@ -55,15 +49,15 @@ set -e
test -n "$alldrives"
-# Feed all found drives to wmenu and get user choice.
-chosen="$(echo "$alldrives" | wmenu -p "Mount which drive?" -i)"
+# Feed all found drives to mew and get user choice.
+chosen="$(echo "$alldrives" | mew -p "Mount which drive?" -i)"
# Function for prompting user for a mountpoint.
getmount(){
- mp="$(find /mnt /media /mount /home -maxdepth 1 -type d 2>/dev/null | wmenu -i -p "Mount this drive where?")"
+ mp="$(find /mnt /media /mount /home -maxdepth 1 -type d 2>/dev/null | mew -i -p "Mount this drive where?")"
test -n "$mp"
if [ ! -d "$mp" ]; then
- mkdiryn=$(printf "No\\nYes" | wmenu -i -p "$mp does not exist. Create it?")
+ mkdiryn=$(printf "No\\nYes" | mew -i -p "$mp does not exist. Create it?")
[ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || doas_askpass mkdir -p "$mp")
fi
}
diff --git a/.local/bin/rssget b/.local/bin/rssget
@@ -4,7 +4,7 @@
# also find hidden RSS feeds on various websites, namely Youtube, Reddit,
# Vimeo, Github, Gitlab and Medium. Gets site url as $1 or (if not present)
# from X clipboard. Gets tags as $2. If it finds more than one feed, calls
-# wmenu for the user to choose which one to add. I have bound it to a keyboard
+# mew for the user to choose which one to add. I have bound it to a keyboard
# shortcut so i copy a site link and easily add its feed to the reader.
# Inspired by and based on the logic of this extension:
@@ -109,7 +109,7 @@ else
list="$(getlink "$url")"
fi
-[ "$(echo "$list" | wc -l)" -eq 1 ] && chosen_link="$list" || chosen_link=$(printf '%s\n' "${list[@]}" | wmenu -p "Choose a feed:")
+[ "$(echo "$list" | wc -l)" -eq 1 ] && chosen_link="$list" || chosen_link=$(printf '%s\n' "${list[@]}" | mew -p "Choose a feed:")
tags="$2"
ifinstalled rssadd && rssadd "$chosen_link" "$tags"
echo "$chosen_link" "$tags"
diff --git a/.local/bin/singboxwrap b/.local/bin/singboxwrap
@@ -16,7 +16,7 @@ run_singbox () {
}
choose_menu () {
- choose="$(find $config_dir -maxdepth 1 -type f | wmenu -p "Config to use")"
+ choose="$(find $config_dir -maxdepth 1 -type f | mew -p "Config to use")"
[ -n "$choose" ] || exit 1
ln -sf "$choose" "$default_path"
echo "$default_path"
diff --git a/.local/bin/statusbar/sb-doppler b/.local/bin/statusbar/sb-doppler
@@ -199,7 +199,7 @@ DE: SHH: Schleswig-Holstein
DE: SHH: Hamburg
DE: THU: Thuringia
NL: The Netherlands
-RU: Russian Federation" | wmenu -i -l 50 -p "Select a radar to use as default:")"
+RU: Russian Federation" | mew -i -l 50 -p "Select a radar to use as default:")"
# Ensure user did not escape.
[ -z "$chosen" ] && exit 1
diff --git a/.local/bin/statusbar/sb-kbselect b/.local/bin/statusbar/sb-kbselect
@@ -1,6 +1,6 @@
#!/bin/sh
# works on any init system
-# requirements: wmenu
+# requirements: mew
kbquery()
{
@@ -13,7 +13,7 @@ kbquery()
kb=$(kbquery)
case $BLOCK_BUTTON in
- 1) kb_choice="$(awk '/! layout/{flag=1; next} /! variant/{flag=0} flag {print $2, "- " $1}' /usr/share/X11/xkb/rules/base.lst | wmenu -l 15)"
+ 1) kb_choice="$(awk '/! layout/{flag=1; next} /! variant/{flag=0} flag {print $2, "- " $1}' /usr/share/X11/xkb/rules/base.lst | mew -l 15)"
[ -z "$kb_choice" ] && exit 0
kb="$(echo "$kb_choice" | awk '{print $3}')"
swaymsg input "type:keyboard" xkb_layout "$kb" >/dev/null 2>&1
diff --git a/.local/bin/sysact b/.local/bin/sysact
@@ -1,6 +1,6 @@
#!/bin/sh
-# A wmenu wrapper script for system functions.
+# A mew wrapper script for system functions.
export WM="sway"
case "$(readlink -f /sbin/init)" in
*systemd*) ctl='systemctl' ;;
@@ -23,7 +23,7 @@ lock(){
kill -44 $(pidof i3blocks)
}
-case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥️shutdown\n💤 sleep\n📺 display off" | wmenu -i -p 'Action: ')" in
+case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥️shutdown\n💤 sleep\n📺 display off" | mew -i -p 'Action: ')" in
'🔒 lock') lock ;;
"🚪 leave $WM") swaymsg exit ;;
"♻️ renew $WM") swaymsg reload ;;
diff --git a/.local/bin/td-toggle b/.local/bin/td-toggle
@@ -4,9 +4,9 @@
if pidof transmission-daemon >/dev/null ;
then
- [ "$(printf "No\\nYes" | wmenu -i -p "Turn off transmission-daemon?")" = "Yes" ] && killall transmission-daemon && notify-send "transmission-daemon disabled."
+ [ "$(printf "No\\nYes" | mew -i -p "Turn off transmission-daemon?")" = "Yes" ] && killall transmission-daemon && notify-send "transmission-daemon disabled."
else
ifinstalled transmission-cli || exit
- [ "$(printf "No\\nYes" | wmenu -i -p "Turn on transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send "transmission-daemon enabled."
+ [ "$(printf "No\\nYes" | mew -i -p "Turn on transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send "transmission-daemon enabled."
fi
sleep 3 && pkill -RTMIN+7 "${STATUSBAR:-i3blocks}"
diff --git a/.local/bin/unmounter b/.local/bin/unmounter
@@ -1,8 +1,5 @@
#!/bin/sh
-# Unmount USB drives or Android phones. Replaces the older `wmenuumount`. Fewer
-# prompt and also de-decrypts LUKS drives that are unmounted.
-
set -e
mounteddroids="$(grep simple-mtpfs /etc/mtab | awk '{print "📱" $2}')"
@@ -13,7 +10,7 @@ allunmountable="$(echo "$mounteddroids
$mounteddrives" | sed "/^$/d;s/ *$//")"
test -n "$allunmountable"
-chosen="$(echo "$allunmountable" | wmenu -i -p "Unmount which drive?")"
+chosen="$(echo "$allunmountable" | mew -i -p "Unmount which drive?")"
chosen="${chosen%% *}"
test -n "$chosen"
diff --git a/dependencies.txt b/dependencies.txt
@@ -86,6 +86,7 @@ ntfs-3g
calcurse
cmake
wlrctl
+tllist
# TESSEN DEPS #
gopass
diff --git a/rice.sh b/rice.sh
@@ -144,15 +144,14 @@ cd autofox
run_as_user ./configure_firefox.sh
cd /home/"$PERMUSER"
-run_as_user git clone https://git.awy.one/wmenu
-cd /home/"$PERMUSER"/wmenu
-run_as_user meson build
-ninja -C build install
+run_as_user git clone https://git.awy.one/mew
+cd /home/"$PERMUSER"/mew
+make install
cd /home/"$PERMUSER"
rm -rf autofox
rm -rf mutt-wizard
-rm -rf wmenu
+rm -rf mew
# MPV
thumbfastlua_url=https://raw.githubusercontent.com/po5/thumbfast/refs/heads/master/thumbfast.lua
@@ -174,7 +173,7 @@ run_as_user curl -Ls -o "$config_dir/scripts/sponsorblock_minimal.lua" $sponsorb
# necessary symlinks (pass for mutt-wizard and bemenu for tessen)
ln -s /bin/gopass /bin/pass
-ln -s /usr/local/bin/wmenu /bin/bemenu
+ln -s /usr/local/bin/mew /bin/bemenu
# pam
sed -i '/auth[[:space:]]*include[[:space:]]*system-local-login/a auth optional pam_gnome_keyring.so' /etc/pam.d/login