.config/sway/wofi
This commit is contained in:
parent
9a88942f99
commit
51632bd232
@ -40,9 +40,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
|
||||||
}
|
}
|
||||||
@ -105,8 +105,9 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
create_list_files
|
create_list_files
|
||||||
list_output=$(list_desktop_icons | wofi -s ~/.config/wofi/wofi.css --dmenu -i -p " drun")
|
list_output=$(list_desktop_icons | wofi -s ~/.config/wofi/wofi.css --dmenu -i -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
|
||||||
|
@ -22,9 +22,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
|
||||||
@ -35,11 +35,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
|
||||||
@ -57,7 +57,7 @@ function remove_icon() {
|
|||||||
|
|
||||||
file=1
|
file=1
|
||||||
while [ "${file}" ]; do
|
while [ "${file}" ]; do
|
||||||
file_icon=$(show_icon_tree | wofi -s ~/.config/wofi/wofi.css --dmenu -i -p " filebrowser: $(basename $(pwd))")
|
file_icon=$(show_icon_tree | wofi -s ~/.config/wofi/wofi.css --dmenu -i -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
|
||||||
|
@ -47,6 +47,6 @@ function list_binaries_icons() {
|
|||||||
generate_spaces 75
|
generate_spaces 75
|
||||||
}
|
}
|
||||||
|
|
||||||
list_output=$(list_binaries_icons | wofi -s ~/.config/wofi/wofi.css --dmenu -i -p " run")
|
list_output=$(list_binaries_icons | wofi -s ~/.config/wofi/wofi.css --dmenu -i -p " run")
|
||||||
run_output=$(echo "${list_output}" | cut -c4-999)
|
run_output=$(echo "${list_output}" | cut -c4-999)
|
||||||
${run_output}
|
${run_output}
|
||||||
|
@ -23,7 +23,7 @@ function check_dependencies() {
|
|||||||
swaymsg &> /dev/null
|
swaymsg &> /dev/null
|
||||||
error=$?
|
error=$?
|
||||||
if [ ${error} -ne 0 ] ; then
|
if [ ${error} -ne 0 ] ; then
|
||||||
echo " Error: You need install 'swaymsg'" | wofi --dmenu -p " window"
|
echo " Error: You need install 'swaymsg'" | wofi --dmenu -p " window"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -36,7 +36,7 @@ function list_applications_icons() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_dependencies
|
check_dependencies
|
||||||
list_output=$(list_applications_icons | wofi -s ~/.config/wofi/wofi.css --dmenu -i -p " window")
|
list_output=$(list_applications_icons | wofi -s ~/.config/wofi/wofi.css --dmenu -i -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user