summaryrefslogtreecommitdiff
path: root/bmenu
diff options
context:
space:
mode:
authorxAlpharax <42233094+xAlpharax@users.noreply.github.com>2023-09-24 20:36:04 +0300
committerxAlpharax <42233094+xAlpharax@users.noreply.github.com>2023-09-24 20:36:04 +0300
commit805c951522bc5063849b51a729b08bfdf16168df (patch)
tree302b1842142b6b451a7b0a2124e0e1769dbc4816 /bmenu
parentc702b3c1d5420be981f67cdc40d62052df87563c (diff)
Adding X11, zsh, nvtop, dmenu and some other tools for wallpapers,
power menus, uploading simple text/binary files. Changes to be committed: new file: X11/Xresources new file: X11/xinit new file: bmenu new file: dmenu.conf new file: nvtop/interface.ini new file: pmenu new file: upload new file: zsh/aliases new file: zsh/env new file: zsh/zshrc
Diffstat (limited to 'bmenu')
-rwxr-xr-xbmenu16
1 files changed, 16 insertions, 0 deletions
diff --git a/bmenu b/bmenu
new file mode 100755
index 0000000..d91312c
--- /dev/null
+++ b/bmenu
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+backgrounds=/home/$USER/.config/backgrounds
+config=$(bash ~/.config/dmenu.conf)
+
+n_files=$(($(ls -l $backgrounds | wc -l) - 1))
+
+# Use dmenu to prompt the user to select a file
+selected_file=$(find $backgrounds -maxdepth 1 -type f -printf '%f\n' | $config -i -l $n_files)
+
+# If the user selected a file, execute it
+if [ -n "$selected_file" ]; then
+ feh --bg-fill --no-fehbg "${backgrounds}/${selected_file}"
+fi