.config/dmenu

This commit is contained in:
q3aql 2025-08-11 13:12:09 +02:00
parent 12a4bd5651
commit 9ed8a1eff7
5 changed files with 14 additions and 13 deletions

View File

@ -40,7 +40,7 @@ function load_session_options() {
i3_session=$(ps -ef | grep " i3" | grep -v "grep") i3_session=$(ps -ef | grep " i3" | grep -v "grep")
sessions_check="${dwm_session}${spectrwm_session}${qtile_session}${sway_session}${i3_session}" sessions_check="${dwm_session}${spectrwm_session}${qtile_session}${sway_session}${i3_session}"
if [ ! -z "${sessions_check}" ] ; then if [ ! -z "${sessions_check}" ] ; then
echo " Logout" echo "󰍃 Logout"
fi fi
generate_spaces 75 generate_spaces 75
} }

View File

@ -51,9 +51,9 @@ function list_desktop_files() {
} }
function list_desktop_icons() { function list_desktop_icons() {
echo " Scan New Desktop Files" echo "󰑓 Scan New Desktop Files"
ls -1 "${load_desktop_files}/" | while read current_desktop ; do ls -1 "${load_desktop_files}/" | while read current_desktop ; do
echo " ${current_desktop}" echo "󰀻 ${current_desktop}"
done done
generate_spaces 75 generate_spaces 75
} }
@ -104,8 +104,9 @@ fi
load_theme load_theme
create_list_files create_list_files
list_output=$(list_desktop_icons | dmenu -i -fn "${font_dmenu}" -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -l 18 -p " drun:") list_output=$(list_desktop_icons | dmenu -i -fn "${font_dmenu}" -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -l 18 -p "󰈞 drun:")
run_output=$(echo ${list_output} | cut -c 5-999) run_output=$(echo ${list_output} | cut -c 6-999)
echo "${run_output}"
if [ ! -z "${run_output}" ] ; then if [ ! -z "${run_output}" ] ; then
if [ "${run_output}" == "Scan New Desktop Files" ] ; then if [ "${run_output}" == "Scan New Desktop Files" ] ; then
echo "0" > ${HOME}/.dmenu/read_list echo "0" > ${HOME}/.dmenu/read_list

View File

@ -41,9 +41,9 @@ function generate_spaces() {
function show_icon_tree() { function show_icon_tree() {
ls -1 | while read current ; do ls -1 | while read current ; do
if [ -f "${current}" ] ; then if [ -f "${current}" ] ; then
echo " ${current}" echo " ${current}"
elif [ -d "${current}" ] ; then elif [ -d "${current}" ] ; then
echo " ${current}" echo " ${current}"
else else
echo " ${current}" echo " ${current}"
fi fi
@ -54,11 +54,11 @@ function show_icon_tree() {
function remove_icon() { function remove_icon() {
entry="${@}" entry="${@}"
remove_icon_space=0 remove_icon_space=0
read_entry=$(echo "${entry}" | grep " ") read_entry=$(echo "${entry}" | grep " ")
if ! [ -z "${read_entry}" ] ; then if ! [ -z "${read_entry}" ] ; then
remove_icon_space=1 remove_icon_space=1
fi fi
read_entry=$(echo "${entry}" | grep " ") read_entry=$(echo "${entry}" | grep " ")
if ! [ -z "${read_entry}" ] ; then if ! [ -z "${read_entry}" ] ; then
remove_icon_space=1 remove_icon_space=1
fi fi
@ -77,7 +77,7 @@ function remove_icon() {
load_theme load_theme
file=1 file=1
while [ "${file}" ]; do while [ "${file}" ]; do
file_icon=$(show_icon_tree | dmenu -i -fn "${font_dmenu}" -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -l 18 -p " filebrowser: $(basename $(pwd))") file_icon=$(show_icon_tree | dmenu -i -fn "${font_dmenu}" -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -l 18 -p "󰈞 filebrowser: $(basename $(pwd))")
file=$(remove_icon "${file_icon}") file=$(remove_icon "${file_icon}")
echo "# ${file} #" echo "# ${file} #"
if [ -e "${file}" ]; then if [ -e "${file}" ]; then

View File

@ -67,6 +67,6 @@ function list_binaries_icons() {
} }
load_theme load_theme
list_output=$(list_binaries_icons | dmenu -i -fn "${font_dmenu}" -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -l 18 -p " run:") list_output=$(list_binaries_icons | dmenu -i -fn "${font_dmenu}" -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -l 18 -p "󰈞 run:")
run_output=$(echo "${list_output}" | cut -c4-999) run_output=$(echo "${list_output}" | cut -c4-999)
${run_output} ${run_output}

View File

@ -42,7 +42,7 @@ function check_wmctrl() {
wmctrl -h &> /dev/null wmctrl -h &> /dev/null
error=$? error=$?
if [ ${error} -ne 0 ] ; then if [ ${error} -ne 0 ] ; then
echo " Error: You need install 'wmctrl'" | dmenu -i -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -l 18 -p " window:" echo " Error: You need install 'wmctrl'" | dmenu -i -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -l 18 -p "󰈞 window:"
exit exit
fi fi
} }
@ -56,7 +56,7 @@ function list_applications_icons() {
load_theme load_theme
check_wmctrl check_wmctrl
list_output=$(list_applications_icons | dmenu -i -fn "${font_dmenu}" -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -l 18 -p " window:") list_output=$(list_applications_icons | dmenu -i -fn "${font_dmenu}" -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -l 18 -p "󰈞 window:")
run_output=$(echo ${list_output} | cut -c 5-999) run_output=$(echo ${list_output} | cut -c 5-999)
echo "# Selected: ${run_output}" echo "# Selected: ${run_output}"
run_output=$(echo "${run_output}" | cut -d " " -f 1) run_output=$(echo "${run_output}" | cut -d " " -f 1)