aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorawy <awy@awy.one>2025-07-30 20:30:23 +0300
committerawy <awy@awy.one>2025-07-30 20:30:23 +0300
commit6a42018cf2d55f9a8e8f9809415556cd50028590 (patch)
tree93e6871b100832b6fd0942e4586729c7580270a3
parentbd77fbce81efc16fc91dd7cc9d9807e27d70d064 (diff)
downloadhyprdots-6a42018cf2d55f9a8e8f9809415556cd50028590.tar.gz
rofi
-rwxr-xr-x.local/bin/dmenuhandler6
-rwxr-xr-x.local/bin/dmenumountcifs6
-rwxr-xr-x.local/bin/dmenupass2
-rwxr-xr-x.local/bin/dmenurecord8
-rwxr-xr-x.local/bin/dmenuunicode4
-rwxr-xr-x.local/bin/maimpick2
-rwxr-xr-x.local/bin/mounter10
-rwxr-xr-x.local/bin/singboxwrap2
-rwxr-xr-x.local/bin/sysact4
-rwxr-xr-x.local/bin/unmounter2
10 files changed, 23 insertions, 23 deletions
diff --git a/.local/bin/dmenuhandler b/.local/bin/dmenuhandler
index 875bbc2..d2c6f83 100755
--- a/.local/bin/dmenuhandler
+++ b/.local/bin/dmenuhandler
@@ -1,10 +1,10 @@
#!/bin/sh
-# Feed this script a link and it will give mew
+# Feed this script a link and it will give rofi -dmenu
# some choice programs to use to open it.
-feed="${1:-$(true | mew -p 'Paste URL or file path')}"
+feed="${1:-$(true | rofi -dmenu -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" | mew -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" | rofi -dmenu -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
index 4832213..4b0590b 100755
--- a/.local/bin/dmenumountcifs
+++ b/.local/bin/dmenumountcifs
@@ -1,12 +1,12 @@
#!/bin/sh
-# Gives a mew prompt to mount unmounted local NAS shares for read/write.
+# Gives a rofi -dmenu 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}' | mew -i -p "Which NAS?") || exit 1
+srvname=$(avahi-browse _smb._tcp -t | awk '{print $4}' | rofi -dmenu -i -p "Which NAS?") || exit 1
notify-send "Searching for network shares..." "Please wait..."
# Choose share disk...
-share=$(smbclient -L "$srvname" -N | rg Disk | awk '{print $1}' | mew -i -p "Mount which share?") || exit 1
+share=$(smbclient -L "$srvname" -N | rg Disk | awk '{print $1}' | rofi -dmenu -i -p "Mount which share?") || exit 1
# Format URL...
share2mnt=//"$srvname".local/"$share"
diff --git a/.local/bin/dmenupass b/.local/bin/dmenupass
index bea2ad9..b29b536 100755
--- 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.
-mew -P -p "password:" <&-
+rofi -dmenu -P -p "password:" <&-
diff --git a/.local/bin/dmenurecord b/.local/bin/dmenurecord
index 6f51f5f..6d6af9c 100755
--- a/.local/bin/dmenurecord
+++ b/.local/bin/dmenurecord
@@ -1,7 +1,7 @@
#!/bin/sh
# Usage:
-# `$0`: Ask for recording type via mew
+# `$0`: Ask for recording type via rofi -dmenu
# `$0 screencast`: Record both audio and screen
# `$0 video`: Record only screen
# `$0 audio`: Record only audio
@@ -11,7 +11,7 @@
getdim() {
screens=$(hyprctl monitors | grep Monitor | cut -d' ' -f2)
- choice=$(printf "$screens\nExit\n" | mew)
+ choice=$(printf "$screens\nExit\n" | rofi -dmenu)
[ "${choice}" != "Exit" ] || [ -z "${choice}" ] || exit &&
echo $choice
}
@@ -77,7 +77,7 @@ audio() { \
}
askrecording() { \
- choice=$(printf "screencast\\nvideo\\nvideo selected\\naudio\\nwebcam\\nwebcam (hi-def)" | mew -i -p "Select recording style:")
+ choice=$(printf "screencast\\nvideo\\nvideo selected\\naudio\\nwebcam\\nwebcam (hi-def)" | rofi -dmenu -i -p "Select recording style:")
case "$choice" in
screencast) screencast;;
audio) audio;;
@@ -89,7 +89,7 @@ askrecording() { \
}
asktoend() { \
- response=$(printf "No\\nYes" | mew -i -p "Recording still active. End recording?") &&
+ response=$(printf "No\\nYes" | rofi -dmenu -i -p "Recording still active. End recording?") &&
[ "$response" = "Yes" ] && killrecording
}
diff --git a/.local/bin/dmenuunicode b/.local/bin/dmenuunicode
index 2c09c80..a9d94e9 100755
--- 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 mew from emoji file.
-chosen=$(cut -d ';' -f1 ~/.local/share/larbs/chars/* | mew -i -l 30 | sed "s/ .*//")
+# Get user selection via rofi -dmenu from emoji file.
+chosen=$(cut -d ';' -f1 ~/.local/share/larbs/chars/* | rofi -dmenu -i -l 30 | sed "s/ .*//")
# Exit if none chosen.
[ -z "$chosen" ] && exit
diff --git a/.local/bin/maimpick b/.local/bin/maimpick
index 29cf327..390d5e2 100755
--- a/.local/bin/maimpick
+++ b/.local/bin/maimpick
@@ -13,7 +13,7 @@ get_active_window() {
hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"'
}
-case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)\\na selected area (swappy)\\ncurrent window (swappy)\\nfull screen (swappy)\\ncopy selected image to text" | mew -l 10 -i -p "Screenshot which area?")" in
+case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)\\na selected area (swappy)\\ncurrent window (swappy)\\nfull screen (swappy)\\ncopy selected image to text" | rofi -dmenu -l 10 -i -p "Screenshot which area?")" in
"a selected area") geometry=$(slurp) && sleep 0.2 && grim -g "$geometry" pic-selected-"${output}" && notify-send "📸 maimpick" "Screenshot saved as pic-selected-$output." ;;
"current window")
geometry=$(get_active_window)
diff --git a/.local/bin/mounter b/.local/bin/mounter
index 6d65c2c..b8b3ab2 100755
--- a/.local/bin/mounter
+++ b/.local/bin/mounter
@@ -23,7 +23,7 @@ lsblkoutput="$(doas lsblk -rpo "uuid,name,type,size,label,mountpoint,fstype")"
allluks="$(echo "$lsblkoutput" | rg 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 mew:
+# Functioning for formatting drives correctly for rofi -dmenu:
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.
@@ -49,15 +49,15 @@ set -e
test -n "$alldrives"
-# Feed all found drives to mew and get user choice.
-chosen="$(echo "$alldrives" | mew -p "Mount which drive?" -i)"
+# Feed all found drives to rofi -dmenu and get user choice.
+chosen="$(echo "$alldrives" | rofi -dmenu -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 | mew -i -p "Mount this drive where?")"
+ mp="$(find /mnt /media /mount /home -maxdepth 1 -type d 2>/dev/null | rofi -dmenu -i -p "Mount this drive where?")"
test -n "$mp"
if [ ! -d "$mp" ]; then
- mkdiryn=$(printf "No\\nYes" | mew -i -p "$mp does not exist. Create it?")
+ mkdiryn=$(printf "No\\nYes" | rofi -dmenu -i -p "$mp does not exist. Create it?")
[ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || doas_askpass mkdir -p "$mp")
fi
}
diff --git a/.local/bin/singboxwrap b/.local/bin/singboxwrap
index e52db36..ef74597 100755
--- a/.local/bin/singboxwrap
+++ b/.local/bin/singboxwrap
@@ -16,7 +16,7 @@ run_singbox () {
}
choose_menu () {
- choose="$(fd . $config_dir -d 1 -t f | mew -p "Config to use")"
+ choose="$(fd . $config_dir -d 1 -t f | rofi -dmenu -p "Config to use")"
[ -n "$choose" ] || exit 1
ln -sf "$choose" "$default_path"
echo "$default_path"
diff --git a/.local/bin/sysact b/.local/bin/sysact
index 44a3868..bb2d400 100755
--- a/.local/bin/sysact
+++ b/.local/bin/sysact
@@ -1,6 +1,6 @@
#!/bin/sh
-# A mew wrapper script for system functions.
+# A rofi -dmenu wrapper script for system functions.
export WM="Hyprland"
case "$(readlink -f /sbin/init)" in
*systemd*) ctl='systemctl' ;;
@@ -23,7 +23,7 @@ lock(){
kill -44 $(pidof waybar)
}
-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
+case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥 shutdown\n💤 sleep\n📺 display off" | rofi -dmenu -i -p 'Action: ')" in
'🔒 lock') lock ;;
"🚪 leave $WM") hyprctl dispatch exit ;;
"♻️ renew $WM") hyprctl reload ;;
diff --git a/.local/bin/unmounter b/.local/bin/unmounter
index fe1d01a..d43089f 100755
--- a/.local/bin/unmounter
+++ b/.local/bin/unmounter
@@ -10,7 +10,7 @@ allunmountable="$(echo "$mounteddroids
$mounteddrives" | sed "/^$/d;s/ *$//")"
test -n "$allunmountable"
-chosen="$(echo "$allunmountable" | mew -i -p "Unmount which drive?")"
+chosen="$(echo "$allunmountable" | rofi -dmenu -i -p "Unmount which drive?")"
chosen="${chosen%% *}"
test -n "$chosen"