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
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
VER = 1.0
|
||||
VER = 1.1
|
||||
DESTDIR = "/usr"
|
||||
NAME = spmenuify
|
||||
SHELL = /bin/sh
|
||||
|
|
28
spmenuify
28
spmenuify
|
@ -18,7 +18,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# 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}"
|
||||
REPO_DIR="${REPO_DIR:-${XDG_CACHE_DIR:-$HOME/.cache}/spmenuify/repo}"
|
||||
CONFIG_FILE="${CONFIG_FILE:-$HOME/.config/spmenu/spmenuify/spmenuify.conf}"
|
||||
|
@ -50,19 +50,19 @@ print_theme_list() {
|
|||
print_theme_list_t() {
|
||||
find "$THEME_DIR" -type f > /tmp/list
|
||||
|
||||
if [ -z "$(cat /tmp/list)" ]; then
|
||||
printf "%b%s\n" "\033[0;31m" "No themes installed."
|
||||
else
|
||||
while read -r l; do
|
||||
file="$(basename "$l")"
|
||||
printf "%s" "$l" | grep -qE "[.]desc|[.]png" && continue
|
||||
if [ -f "${l}.png" ] && [ "$ENABLE_IMAGE_PREVIEW" = "true" ]; then
|
||||
printf "img://%s\t%s\n" "${l}.png" "${file}"
|
||||
set=true
|
||||
else
|
||||
printf "%s\n" "${file}"
|
||||
set=true
|
||||
fi
|
||||
done < "/tmp/list"; rm -f /tmp/list
|
||||
fi
|
||||
|
||||
[ "$set" != "true" ] && printf "%b%s\n" "\033[0;31m" "No themes installed."
|
||||
}
|
||||
|
||||
check_spmenu_ver() {
|
||||
|
@ -114,7 +114,7 @@ opt_theme() {
|
|||
case "$o" in
|
||||
"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
|
||||
rm -f "$THEME_DIR/$output"
|
||||
rm -f "$THEME_DIR/$output" "$THEME_DIR/$output*"
|
||||
main && exit 0
|
||||
;;
|
||||
"View")
|
||||
|
@ -155,22 +155,32 @@ opt_theme() {
|
|||
|
||||
print_about() {
|
||||
printf "\033[0;31ms" > /tmp/spmenuify_about_out
|
||||
sleep 0.1; printf "update" > /tmp/spmenu.fifo
|
||||
printf "\033[0;32mp" >> /tmp/spmenuify_about_out
|
||||
sleep 0.1; printf "update" > /tmp/spmenu.fifo
|
||||
printf "\033[0;33mm" >> /tmp/spmenuify_about_out
|
||||
sleep 0.1; printf "update" > /tmp/spmenu.fifo
|
||||
printf "\033[0;34me" >> /tmp/spmenuify_about_out
|
||||
sleep 0.1; printf "update" > /tmp/spmenu.fifo
|
||||
printf "\033[0;35mn" >> /tmp/spmenuify_about_out
|
||||
sleep 0.1; printf "update" > /tmp/spmenu.fifo
|
||||
printf "\033[0;36mu" >> /tmp/spmenuify_about_out
|
||||
sleep 0.1; printf "update" > /tmp/spmenu.fifo
|
||||
printf "\033[0;37mi" >> /tmp/spmenuify_about_out
|
||||
sleep 0.1; printf "update" > /tmp/spmenu.fifo
|
||||
printf "\033[0;38mf" >> /tmp/spmenuify_about_out
|
||||
sleep 0.1; printf "update" > /tmp/spmenu.fifo
|
||||
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
|
||||
sleep 0.1
|
||||
printf "update" > /tmp/spmenu.fifo
|
||||
sleep 1
|
||||
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
|
||||
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() {
|
||||
|
|
Loading…
Reference in a new issue