.config/dmenu
This commit is contained in:
parent
12a4bd5651
commit
9ed8a1eff7
@ -40,7 +40,7 @@ function load_session_options() {
|
||||
i3_session=$(ps -ef | grep " i3" | grep -v "grep")
|
||||
sessions_check="${dwm_session}${spectrwm_session}${qtile_session}${sway_session}${i3_session}"
|
||||
if [ ! -z "${sessions_check}" ] ; then
|
||||
echo " Logout"
|
||||
echo " Logout"
|
||||
fi
|
||||
generate_spaces 75
|
||||
}
|
||||
|
@ -51,9 +51,9 @@ function list_desktop_files() {
|
||||
}
|
||||
|
||||
function list_desktop_icons() {
|
||||
echo " Scan New Desktop Files"
|
||||
echo " Scan New Desktop Files"
|
||||
ls -1 "${load_desktop_files}/" | while read current_desktop ; do
|
||||
echo " ${current_desktop}"
|
||||
echo " ${current_desktop}"
|
||||
done
|
||||
generate_spaces 75
|
||||
}
|
||||
@ -104,8 +104,9 @@ fi
|
||||
|
||||
load_theme
|
||||
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:")
|
||||
run_output=$(echo ${list_output} | cut -c 5-999)
|
||||
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 6-999)
|
||||
echo "${run_output}"
|
||||
if [ ! -z "${run_output}" ] ; then
|
||||
if [ "${run_output}" == "Scan New Desktop Files" ] ; then
|
||||
echo "0" > ${HOME}/.dmenu/read_list
|
||||
|
@ -41,9 +41,9 @@ function generate_spaces() {
|
||||
function show_icon_tree() {
|
||||
ls -1 | while read current ; do
|
||||
if [ -f "${current}" ] ; then
|
||||
echo " ${current}"
|
||||
echo " ${current}"
|
||||
elif [ -d "${current}" ] ; then
|
||||
echo " ${current}"
|
||||
echo " ${current}"
|
||||
else
|
||||
echo " ${current}"
|
||||
fi
|
||||
@ -54,11 +54,11 @@ function show_icon_tree() {
|
||||
function remove_icon() {
|
||||
entry="${@}"
|
||||
remove_icon_space=0
|
||||
read_entry=$(echo "${entry}" | grep " ")
|
||||
read_entry=$(echo "${entry}" | grep " ")
|
||||
if ! [ -z "${read_entry}" ] ; then
|
||||
remove_icon_space=1
|
||||
fi
|
||||
read_entry=$(echo "${entry}" | grep " ")
|
||||
read_entry=$(echo "${entry}" | grep " ")
|
||||
if ! [ -z "${read_entry}" ] ; then
|
||||
remove_icon_space=1
|
||||
fi
|
||||
@ -77,7 +77,7 @@ function remove_icon() {
|
||||
load_theme
|
||||
file=1
|
||||
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}")
|
||||
echo "# ${file} #"
|
||||
if [ -e "${file}" ]; then
|
||||
|
@ -67,6 +67,6 @@ function list_binaries_icons() {
|
||||
}
|
||||
|
||||
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}
|
||||
|
@ -42,7 +42,7 @@ function check_wmctrl() {
|
||||
wmctrl -h &> /dev/null
|
||||
error=$?
|
||||
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
|
||||
fi
|
||||
}
|
||||
@ -56,7 +56,7 @@ function list_applications_icons() {
|
||||
|
||||
load_theme
|
||||
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)
|
||||
echo "# Selected: ${run_output}"
|
||||
run_output=$(echo "${run_output}" | cut -d " " -f 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user