diff options
Diffstat (limited to 'wayland')
-rwxr-xr-x | wayland/.local/bin/wmenu | 10 | ||||
-rwxr-xr-x | wayland/.local/bin/wmenu-run | 34 |
2 files changed, 44 insertions, 0 deletions
diff --git a/wayland/.local/bin/wmenu b/wayland/.local/bin/wmenu new file mode 100755 index 0000000..0f5c0f1 --- /dev/null +++ b/wayland/.local/bin/wmenu @@ -0,0 +1,10 @@ +#!/bin/sh + +exec $(command -pv wmenu) -i -f 'monospace 12' \ + -n"#$BASE16_COLOR_06_HEX" \ + -N"#$BASE16_COLOR_00_HEX" \ + -S"#$BASE16_COLOR_00_HEX" \ + -s"#$BASE16_COLOR_09_HEX" \ + -m"#$BASE16_COLOR_06_HEX" \ + -M"#$BASE16_COLOR_0C_HEX" \ + "$@" diff --git a/wayland/.local/bin/wmenu-run b/wayland/.local/bin/wmenu-run new file mode 100755 index 0000000..fd1f669 --- /dev/null +++ b/wayland/.local/bin/wmenu-run @@ -0,0 +1,34 @@ +#!/bin/sh + +cache_dir="${XDG_CACHE_HOME:-"$HOME/.cache"}" +cache="$cache_dir/wmenu-run" + +uptodate() { + IFS=: + for path in $PATH; do + if test "$path" -nt "$cache"; then + return 1 + fi + done + + return 0 +} + +get_bin() { + IFS=: + for path in $PATH; do + for bin in "$path"/*; do + if [ -x "$bin" ]; then + echo "${bin##*/}" + fi + done + done +} + +[ ! -e "$cache_dir" ] && mkdir -p "$cache_dir" + +if [ ! -e "$cache" ] || ! uptodate; then + get_bin | sort -u | tee "$cache" | sway-menu +else + cat "$cache" +fi |