update scripts
add statusline script add fuzzel_do script remove fuzzel_mount script remove fuzzel_find script
parent
61e6d60b47
commit
e9606cc097
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
cmd=$(/usr/bin/fuzzel --dmenu --prompt "\$ ") || exit
|
||||
sel=$($cmd | /usr/bin/fuzzel --dmenu) || exit
|
||||
|
||||
exec $(/usr/bin/fuzzel --dmenu --prompt "\$1 $sel < ") "$sel" || exit
|
|
@ -1,13 +0,0 @@
|
|||
#!/usr/bin/sh
|
||||
#
|
||||
# fuzzel_find_and_open.sh
|
||||
#
|
||||
# Search for file and open it. Requires fuzzel, find and xdg-open.
|
||||
|
||||
args=$(/usr/bin/fuzzel --dmenu --prompt "$ find ") || exit
|
||||
# shellcheck disable=SC2086
|
||||
selection=$(find $args | /usr/bin/fuzzel --dmenu --prompt "$ xdg-open ")
|
||||
|
||||
if [ -n "$selection" ]; then
|
||||
exec /usr/bin/xdg-open "$selection"
|
||||
fi
|
|
@ -1,35 +0,0 @@
|
|||
#!/usr/bin/sh
|
||||
#
|
||||
# fuzzel_mount.sh
|
||||
#
|
||||
# Mount devices. Requires fuzzel and udisksctl.
|
||||
|
||||
LSBLK_PART_TYPE="part"
|
||||
LSBLK_LIST=$(lsblk -Ppo name,type,mountpoint)
|
||||
|
||||
while read -r line; do
|
||||
while read -r keyval; do
|
||||
eval "$keyval"
|
||||
done <<- EOF
|
||||
$line
|
||||
EOF
|
||||
|
||||
expr "$NAME" : "/dev/sda." && continue
|
||||
[ "$TYPE" = "$LSBLK_PART_TYPE" ] || continue
|
||||
|
||||
if [ -n "$MOUNTPOINT" ]; then
|
||||
option_list=$(printf %s\\n "udisksctl unmount -b $NAME" "$option_list")
|
||||
else
|
||||
option_list=$(printf %s\\n "udisksctl mount -b $NAME" "$option_list")
|
||||
fi
|
||||
|
||||
done <<- EOF
|
||||
$LSBLK_LIST
|
||||
EOF
|
||||
|
||||
selection=$(printf %s "$option_list" | fuzzel --dmenu --prompt "$ ")
|
||||
|
||||
if [ -n "$selection" ]; then
|
||||
# TODO: notification and error reporting
|
||||
exec $selection
|
||||
fi
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
printf "{\"version\":1}\n"
|
||||
printf "[\n"
|
||||
while true
|
||||
do
|
||||
printf "["
|
||||
printf "{\"full_text\":\"%s\"}," "$(makoctl list | jq -r '.data[][0].summary.data | select(type == "string")')"
|
||||
printf "{\"full_text\":\"%s\"}," "$(swaymsg -t get_inputs | jq -r '[.[] | select(.type == "keyboard")][0] | .xkb_active_layout_name')"
|
||||
printf "{\"full_text\":\"%s\"}," "$(cat /sys/class/power_supply/BAT0/capacity)"
|
||||
printf "{\"full_text\":\"%s\"}," "$(date +%c)"
|
||||
printf "],"
|
||||
sleep 0.1
|
||||
done
|
Loading…
Reference in New Issue