Dotfiles config update (2022-05-26)

This commit is contained in:
q3aql 2022-05-26 23:26:07 +02:00
parent 331da17daa
commit c87cc70c08
3 changed files with 35 additions and 16 deletions

View File

@ -9,8 +9,9 @@ Xft.hintstyle: hintfull
Xft.lcdfilter: lcdfilter
XTerm*renderFont: true
!XTerm*faceName: xft:Mononoki Nerd Font
XTerm*faceName: xft:Monospace
!XTerm*faceName: xft:Liberation Mono
!XTerm*faceName: xft:Mononoki Nerd Font
XTerm*faceSize: 10
XTerm*utf8: 2
XTerm*locale: true

View File

@ -5,13 +5,19 @@ desktop_files_home="${HOME}/.local/share/applications"
list_desktop_files() {
if [ -d "${desktop_files}" ] ; then
ls -1 "${desktop_files}"
ls -1 "${desktop_files}/" | grep ".desktop"
fi
if [ -d "${desktop_files_home}" ] ; then
ls -1 "${desktop_files_home}"
ls -1 "${desktop_files_home}/" | grep ".desktop"
fi
}
list_desktop_icons() {
list_desktop_files | while read desktop_file ; do
echo " ${desktop_file}"
done
}
rundesk () {
if [ -z ${1} ] ; then
echo "No file entry"
@ -30,7 +36,8 @@ else
runDesktop="rundesk"
fi
list_output=$(list_desktop_files | dmenu "$@")
#list_output=$(list_desktop_files | dmenu "$@")
list_output=$(list_desktop_icons | dmenu "$@")
if [ -f "${desktop_files}/${list_output}" ] ; then
${runDesktop} "${desktop_files}/${list_output}"
elif [ -f "${desktop_files_home}/${list_output}" ] ; then

View File

@ -1,15 +1,26 @@
#!/bin/sh
#!/bin/bash
dmenu_path_output() {
cachedir="${XDG_CACHE_HOME:-"$HOME/.cache"}"
cache="$cachedir/dmenu_run"
[ ! -e "$cachedir" ] && mkdir -p "$cachedir"
IFS=:
if stest -dqr -n "$cache" $PATH; then
stest -flx $PATH | sort -u | tee "$cache"
else
cat "$cache"
fi
list_binaries() {
binaries=0
path_binaries=${PATH}
count_path=1
while [ ${binaries} -eq 0 ] ; do
current_path=$(echo ${path_binaries} | cut -d ":" -f ${count_path})
if [ -z "${current_path}" ] ; then
binaries=1
else
ls -1 ${current_path}/
count_path=$(expr ${count_path} + 1)
fi
done
}
dmenu_path_output | dmenu "$@" | ${SHELL:-"/bin/sh"} &
list_binaries_icons() {
list_binaries | while read current_binary ; do
echo " ${current_binary}"
done
}
#list_output=$(list_binaries | dmenu "$@")
list_output=$(list_binaries_icons | dmenu "$@")
${list_output}