Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
Jacob | c5699bd8d7 | ||
Jacob | d8eada8a7b | ||
Jacob | 73ac9c5658 | ||
38e180c0b3 |
2
Makefile
2
Makefile
|
@ -17,7 +17,7 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
VER = 1.0
|
VER = 1.1
|
||||||
DESTDIR = "/usr"
|
DESTDIR = "/usr"
|
||||||
NAME = spmenuify
|
NAME = spmenuify
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
|
48
spmenuify
48
spmenuify
|
@ -18,7 +18,7 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
VERSION="${VERSION:-1.0}"
|
VERSION="${VERSION:-1.1}"
|
||||||
THEME_DIR="${THEME_DIR:-$HOME/.config/spmenu/themes}"
|
THEME_DIR="${THEME_DIR:-$HOME/.config/spmenu/themes}"
|
||||||
REPO_DIR="${REPO_DIR:-${XDG_CACHE_DIR:-$HOME/.cache}/spmenuify/repo}"
|
REPO_DIR="${REPO_DIR:-${XDG_CACHE_DIR:-$HOME/.cache}/spmenuify/repo}"
|
||||||
CONFIG_FILE="${CONFIG_FILE:-$HOME/.config/spmenu/spmenuify/spmenuify.conf}"
|
CONFIG_FILE="${CONFIG_FILE:-$HOME/.config/spmenu/spmenuify/spmenuify.conf}"
|
||||||
|
@ -50,19 +50,19 @@ print_theme_list() {
|
||||||
print_theme_list_t() {
|
print_theme_list_t() {
|
||||||
find "$THEME_DIR" -type f > /tmp/list
|
find "$THEME_DIR" -type f > /tmp/list
|
||||||
|
|
||||||
if [ -z "$(cat /tmp/list)" ]; then
|
while read -r l; do
|
||||||
printf "%b%s\n" "\033[0;31m" "No themes installed."
|
file="$(basename "$l")"
|
||||||
else
|
printf "%s" "$l" | grep -qE "[.]desc|[.]png" && continue
|
||||||
while read -r l; do
|
if [ -f "${l}.png" ] && [ "$ENABLE_IMAGE_PREVIEW" = "true" ]; then
|
||||||
file="$(basename "$l")"
|
printf "img://%s\t%s\n" "${l}.png" "${file}"
|
||||||
printf "%s" "$l" | grep -qE "[.]desc|[.]png" && continue
|
set=true
|
||||||
if [ -f "${l}.png" ] && [ "$ENABLE_IMAGE_PREVIEW" = "true" ]; then
|
else
|
||||||
printf "img://%s\t%s\n" "${l}.png" "${file}"
|
printf "%s\n" "${file}"
|
||||||
else
|
set=true
|
||||||
printf "%s\n" "${file}"
|
fi
|
||||||
fi
|
done < "/tmp/list"; rm -f /tmp/list
|
||||||
done < "/tmp/list"; rm -f /tmp/list
|
|
||||||
fi
|
[ "$set" != "true" ] && printf "%b%s\n" "\033[0;31m" "No themes installed."
|
||||||
}
|
}
|
||||||
|
|
||||||
check_spmenu_ver() {
|
check_spmenu_ver() {
|
||||||
|
@ -114,7 +114,7 @@ opt_theme() {
|
||||||
case "$o" in
|
case "$o" in
|
||||||
"Remove")
|
"Remove")
|
||||||
[ "$(printf "Yes\nNo\n" | spmenu --require-match --lines 40 --columns 1 --prompt "Remove themes?" --no-allow-typing --hide-mode --hide-input --hide-match-count --hide-left-arrow --hide-right-arrow --hide-highlighting --hide-caps --normal)" != "Yes" ] && main && exit 0
|
[ "$(printf "Yes\nNo\n" | spmenu --require-match --lines 40 --columns 1 --prompt "Remove themes?" --no-allow-typing --hide-mode --hide-input --hide-match-count --hide-left-arrow --hide-right-arrow --hide-highlighting --hide-caps --normal)" != "Yes" ] && main && exit 0
|
||||||
rm -f "$THEME_DIR/$output"
|
rm -f "$THEME_DIR/$output" "$THEME_DIR/$output*"
|
||||||
main && exit 0
|
main && exit 0
|
||||||
;;
|
;;
|
||||||
"View")
|
"View")
|
||||||
|
@ -155,22 +155,32 @@ opt_theme() {
|
||||||
|
|
||||||
print_about() {
|
print_about() {
|
||||||
printf "\033[0;31ms" > /tmp/spmenuify_about_out
|
printf "\033[0;31ms" > /tmp/spmenuify_about_out
|
||||||
|
sleep 0.1; printf "update" > /tmp/spmenu.fifo
|
||||||
printf "\033[0;32mp" >> /tmp/spmenuify_about_out
|
printf "\033[0;32mp" >> /tmp/spmenuify_about_out
|
||||||
|
sleep 0.1; printf "update" > /tmp/spmenu.fifo
|
||||||
printf "\033[0;33mm" >> /tmp/spmenuify_about_out
|
printf "\033[0;33mm" >> /tmp/spmenuify_about_out
|
||||||
|
sleep 0.1; printf "update" > /tmp/spmenu.fifo
|
||||||
printf "\033[0;34me" >> /tmp/spmenuify_about_out
|
printf "\033[0;34me" >> /tmp/spmenuify_about_out
|
||||||
|
sleep 0.1; printf "update" > /tmp/spmenu.fifo
|
||||||
printf "\033[0;35mn" >> /tmp/spmenuify_about_out
|
printf "\033[0;35mn" >> /tmp/spmenuify_about_out
|
||||||
|
sleep 0.1; printf "update" > /tmp/spmenu.fifo
|
||||||
printf "\033[0;36mu" >> /tmp/spmenuify_about_out
|
printf "\033[0;36mu" >> /tmp/spmenuify_about_out
|
||||||
|
sleep 0.1; printf "update" > /tmp/spmenu.fifo
|
||||||
printf "\033[0;37mi" >> /tmp/spmenuify_about_out
|
printf "\033[0;37mi" >> /tmp/spmenuify_about_out
|
||||||
|
sleep 0.1; printf "update" > /tmp/spmenu.fifo
|
||||||
printf "\033[0;38mf" >> /tmp/spmenuify_about_out
|
printf "\033[0;38mf" >> /tmp/spmenuify_about_out
|
||||||
|
sleep 0.1; printf "update" > /tmp/spmenu.fifo
|
||||||
printf "\033[1;31my " >> /tmp/spmenuify_about_out
|
printf "\033[1;31my " >> /tmp/spmenuify_about_out
|
||||||
sleep 1
|
sleep 0.1; printf "update" > /tmp/spmenu.fifo
|
||||||
printf "\033[1;32m %s\n" "$VERSION" >> /tmp/spmenuify_about_out
|
printf "\033[1;32m%s\n" "$VERSION" >> /tmp/spmenuify_about_out
|
||||||
|
sleep 0.1
|
||||||
|
printf "update" > /tmp/spmenu.fifo
|
||||||
sleep 1
|
sleep 1
|
||||||
printf "Written by speedie & contributors\n" >> /tmp/spmenuify_about_out
|
printf "Written by speedie & contributors\n" >> /tmp/spmenuify_about_out
|
||||||
[ -x "$(command -v xdotool)" ] && [ -n "$DISPLAY" ] && xdotool key control
|
printf "update" > /tmp/spmenu.fifo
|
||||||
sleep 1
|
sleep 1
|
||||||
printf "\033[0;34mLicensed under the GNU General Public License version 3.0.\n\n" >> /tmp/spmenuify_about_out
|
printf "\033[0;34mLicensed under the GNU General Public License version 3.0.\n\n" >> /tmp/spmenuify_about_out
|
||||||
[ -x "$(command -v xdotool)" ] && [ -n "$DISPLAY" ] && xdotool key control
|
printf "update" > /tmp/spmenu.fifo
|
||||||
}
|
}
|
||||||
|
|
||||||
about() {
|
about() {
|
||||||
|
|
Loading…
Reference in a new issue