Add dmenu_cmd
This commit is contained in:
parent
1904895a0f
commit
2369a0455f
33
dmenu_cmd
Executable file
33
dmenu_cmd
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
# dmenu_run - dmenu script that simulates 'rofi -show run' #
|
||||||
|
# #
|
||||||
|
# Author: q3aql <q3aql@duck.com> #
|
||||||
|
# Last update: 10-07-2022 #
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
# Configuration variables
|
||||||
|
load_theme_path="${HOME}/.dmenu"
|
||||||
|
load_themes="${load_theme_path}/themes"
|
||||||
|
load_theme_file="${load_theme_path}/load_theme"
|
||||||
|
|
||||||
|
function load_theme() {
|
||||||
|
if [ -f "${load_theme_file}" ] ; then
|
||||||
|
source "${load_theme_file}"
|
||||||
|
else
|
||||||
|
mkdir -p "${load_theme_path}"
|
||||||
|
mkdir -p "${load_themes}"
|
||||||
|
echo "#!/bin/bash" > ${load_theme_file}
|
||||||
|
echo "" >> ${load_theme_file}
|
||||||
|
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_theme_file}
|
||||||
|
echo "NBCOLOR=\"#1f1f35\"" >> ${load_theme_file}
|
||||||
|
echo "SFCOLOR=\"#eeeeee\"" >> ${load_theme_file}
|
||||||
|
echo "SBCOLOR=\"#664477\"" >> ${load_theme_file}
|
||||||
|
source "${load_theme_file}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
load_theme
|
||||||
|
command_run=$(echo > /dev/null | dmenu -i -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -p " command:")
|
||||||
|
${command_run}
|
Loading…
Reference in New Issue
Block a user