Dotfiles config update (2022-07-10)

This commit is contained in:
q3aql 2022-07-10 17:02:20 +02:00
parent be666ac7e6
commit 212b5b9719
10 changed files with 311 additions and 118 deletions

View File

@ -42,12 +42,6 @@ dist: clean
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin
mkdir -p /opt/dmenu-scripts/
cp -rf * /opt/dmenu-scripts/
chmod 755 -R /opt/dmenu-scripts/
rm -rf /opt/dmenu-scripts/*.o
rm -rf /opt/dmenu-scripts/*.orig
cp -rf Makefile.themes /opt/dmenu-scripts/Makefile
cp -f dmenu dmenu_drun dmenu_run dmenu_wrun dmenu_fbrun dmenu_themes stest $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_drun
@ -72,6 +66,5 @@ uninstall:
$(DESTDIR)$(PREFIX)/bin/stest\
$(DESTDIR)$(MANPREFIX)/man1/dmenu.1\
$(DESTDIR)$(MANPREFIX)/man1/stest.1
rm -rf /opt/dmenu-scripts/
.PHONY: all options clean dist install uninstall

View File

@ -1,70 +0,0 @@
# dmenu - dynamic menu
# See LICENSE file for copyright and license details.
include config.mk
SRC = drw.c dmenu.c stest.c util.c
OBJ = $(SRC:.c=.o)
all: options dmenu stest
options:
@echo dmenu build options:
@echo "CFLAGS = $(CFLAGS)"
@echo "LDFLAGS = $(LDFLAGS)"
@echo "CC = $(CC)"
.c.o:
$(CC) -c $(CFLAGS) $<
config.h:
cp config.def.h $@
$(OBJ): arg.h config.h config.mk drw.h
dmenu: dmenu.o drw.o util.o
$(CC) -o $@ dmenu.o drw.o util.o $(LDFLAGS)
stest: stest.o
$(CC) -o $@ stest.o $(LDFLAGS)
clean:
rm -f dmenu stest $(OBJ) dmenu-$(VERSION).tar.gz
dist: clean
mkdir -p dmenu-$(VERSION)
cp LICENSE Makefile README arg.h config.def.h config.mk dmenu.1\
drw.h util.h dmenu_drun dmenu_run dmenu_wrun dmenu_fbrun dmenu_themes stest.1 $(SRC)\
dmenu-$(VERSION)
tar -cf dmenu-$(VERSION).tar dmenu-$(VERSION)
gzip dmenu-$(VERSION).tar
rm -rf dmenu-$(VERSION)
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f dmenu dmenu_drun dmenu_run dmenu_wrun dmenu_fbrun dmenu_themes stest $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_drun
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_run
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_wrun
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_fbrun
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_themes
chmod 755 $(DESTDIR)$(PREFIX)/bin/stest
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
sed "s/VERSION/$(VERSION)/g" < dmenu.1 > $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
sed "s/VERSION/$(VERSION)/g" < stest.1 > $(DESTDIR)$(MANPREFIX)/man1/stest.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/stest.1
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/dmenu\
$(DESTDIR)$(PREFIX)/bin/dmenu_drun\
$(DESTDIR)$(PREFIX)/bin/dmenu_run\
$(DESTDIR)$(PREFIX)/bin/dmenu_wrun\
$(DESTDIR)$(PREFIX)/bin/dmenu_fbrun\
$(DESTDIR)$(PREFIX)/bin/dmenu_themes\
$(DESTDIR)$(PREFIX)/bin/stest\
$(DESTDIR)$(MANPREFIX)/man1/dmenu.1\
$(DESTDIR)$(MANPREFIX)/man1/stest.1
.PHONY: all options clean dist install uninstall

33
.config/dmenu/dmenu_cmd Executable file
View File

@ -0,0 +1,33 @@
#!/bin/bash
############################################################
# dmenu_run - dmenu script that simulates 'rofi -show run' #
# #
# Author: q3aql <q3aql@duck.com> #
# Last update: 10-07-2022 #
############################################################
# Configuration variables
load_theme_path="${HOME}/.dmenu"
load_themes="${load_theme_path}/themes"
load_theme_file="${load_theme_path}/load_theme"
function load_theme() {
if [ -f "${load_theme_file}" ] ; then
source "${load_theme_file}"
else
mkdir -p "${load_theme_path}"
mkdir -p "${load_themes}"
echo "#!/bin/bash" > ${load_theme_file}
echo "" >> ${load_theme_file}
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_theme_file}
echo "NBCOLOR=\"#1f1f35\"" >> ${load_theme_file}
echo "SFCOLOR=\"#eeeeee\"" >> ${load_theme_file}
echo "SBCOLOR=\"#664477\"" >> ${load_theme_file}
source "${load_theme_file}"
fi
}
load_theme
command_run=$(echo > /dev/null | dmenu -i -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -p " command:")
${command_run}

View File

@ -4,13 +4,33 @@
# dmenu_drun - dmenu script that simulates 'rofi -show drun' #
# #
# Author: q3aql <q3aql@duck.com> #
# Last update: 29-05-2022 #
# Last update: 10-07-2022 #
##############################################################
# Configuration variables
load_theme_path="${HOME}/.dmenu"
load_themes="${load_theme_path}/themes"
load_theme_file="${load_theme_path}/load_theme"
desktop_files="/usr/share/applications"
desktop_files_home="${HOME}/.local/share/applications"
list_desktop_files() {
function load_theme() {
if [ -f "${load_theme_file}" ] ; then
source "${load_theme_file}"
else
mkdir -p "${load_theme_path}"
mkdir -p "${load_themes}"
echo "#!/bin/bash" > ${load_theme_file}
echo "" >> ${load_theme_file}
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_theme_file}
echo "NBCOLOR=\"#1f1f35\"" >> ${load_theme_file}
echo "SFCOLOR=\"#eeeeee\"" >> ${load_theme_file}
echo "SBCOLOR=\"#664477\"" >> ${load_theme_file}
source "${load_theme_file}"
fi
}
function list_desktop_files() {
if [ -d "${desktop_files}" ] ; then
ls -1 "${desktop_files}/" | grep ".desktop"
fi
@ -19,7 +39,7 @@ list_desktop_files() {
fi
}
list_desktop_icons() {
function list_desktop_icons() {
list_desktop_files | while read current_desktop ; do
echo " ${current_desktop}"
done
@ -30,7 +50,7 @@ rundesk () {
echo "No file entry"
else
if [ -f "${1}" ] ; then
eval "$(awk -F= '$1=="Exec"{$1=""; print}' "$1")"
eval "$(awk -F= '$1=="Exec"{$1=""; print}' "$1" | head -1)"
else
echo "File does not exist"
fi
@ -43,7 +63,8 @@ else
runDesktop="rundesk"
fi
list_output=$(list_desktop_icons | dmenu "$@" -p " drun:")
load_theme
list_output=$(list_desktop_icons | dmenu -i -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -p " drun:")
run_output=$(echo ${list_output} | cut -c 4-999)
system_file=$(echo -n ${desktop_files}/ ; echo ${run_output})
home_file=$(echo -n ${desktop_files_home}/ ; echo ${run_output})

View File

@ -4,10 +4,31 @@
# dmenu_fbrun - dmenu script that simulates 'rofi -show filebrowser' #
# #
# Author: q3aql <q3aql@duck.com> #
# Last update: 29-05-2022 #
# Last update: 10-07-2022 #
######################################################################
show_icon_tree() {
# Configuration variables
load_theme_path="${HOME}/.dmenu"
load_themes="${load_theme_path}/themes"
load_theme_file="${load_theme_path}/load_theme"
function load_theme() {
if [ -f "${load_theme_file}" ] ; then
source "${load_theme_file}"
else
mkdir -p "${load_theme_path}"
mkdir -p "${load_themes}"
echo "#!/bin/bash" > ${load_theme_file}
echo "" >> ${load_theme_file}
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_theme_file}
echo "NBCOLOR=\"#1f1f35\"" >> ${load_theme_file}
echo "SFCOLOR=\"#eeeeee\"" >> ${load_theme_file}
echo "SBCOLOR=\"#664477\"" >> ${load_theme_file}
source "${load_theme_file}"
fi
}
function show_icon_tree() {
ls -1 | while read current ; do
if [ -f "${current}" ] ; then
echo " ${current}"
@ -19,7 +40,7 @@ show_icon_tree() {
done
}
remove_icon() {
function remove_icon() {
entry="${@}"
remove_icon_space=0
read_entry=$(echo "${entry}" | grep " ")
@ -42,9 +63,10 @@ remove_icon() {
fi
}
load_theme
file=1
while [ "${file}" ]; do
file_icon=$(show_icon_tree | dmenu -p " filebrowser: $(basename $(pwd))")
file_icon=$(show_icon_tree | dmenu -i -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -p " filebrowser: $(basename $(pwd))")
file=$(remove_icon "${file_icon}")
echo "# ${file} #"
if [ -e "${file}" ]; then

View File

@ -4,10 +4,31 @@
# dmenu_run - dmenu script that simulates 'rofi -show run' #
# #
# Author: q3aql <q3aql@duck.com> #
# Last update: 29-05-2022 #
# Last update: 10-07-2022 #
############################################################
list_binaries() {
# Configuration variables
load_theme_path="${HOME}/.dmenu"
load_themes="${load_theme_path}/themes"
load_theme_file="${load_theme_path}/load_theme"
function load_theme() {
if [ -f "${load_theme_file}" ] ; then
source "${load_theme_file}"
else
mkdir -p "${load_theme_path}"
mkdir -p "${load_themes}"
echo "#!/bin/bash" > ${load_theme_file}
echo "" >> ${load_theme_file}
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_theme_file}
echo "NBCOLOR=\"#1f1f35\"" >> ${load_theme_file}
echo "SFCOLOR=\"#eeeeee\"" >> ${load_theme_file}
echo "SBCOLOR=\"#664477\"" >> ${load_theme_file}
source "${load_theme_file}"
fi
}
function list_binaries() {
binaries=0
path_binaries=${PATH}
count_path=1
@ -16,23 +37,25 @@ list_binaries() {
if [ -z "${current_path}" ] ; then
binaries=1
else
# Extra code
if [ "${current_path}" == "/bin" ] ; then
# Extra code / When /bin is the same that /usr/bin/
bin_same=$(ls -la ${current_path} | grep "> usr/bin")
if [ -z "${bin_same}" ] ; then
ls -1 ${current_path}/
count_path=$(expr ${count_path} + 1)
else
ls -1 ${current_path}/
count_path=$(expr ${count_path} + 1)
fi
fi
done
}
list_binaries_icons() {
function list_binaries_icons() {
list_binaries | while read current_binary ; do
echo " ${current_binary}"
done
}
list_output=$(list_binaries_icons | dmenu "$@" -p " run:")
load_theme
list_output=$(list_binaries_icons | dmenu -i -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -p " run:")
run_output=$(echo "${list_output}" | cut -c4-999)
${run_output}

View File

@ -4,22 +4,172 @@
# dmenu_themes - dmenu script that simulates 'rofi-theme-selector' #
# #
# Author: q3aql <q3aql@duck.com> #
# Last update: 29-05-2022 #
# Last update: 10-07-2022 #
####################################################################
main_folder="/opt/dmenu-scripts/"
folder_themes="/opt/dmenu-scripts/themes"
# Configuration variables
load_theme_path="${HOME}/.dmenu"
load_themes="${load_theme_path}/themes"
load_theme_file="${load_theme_path}/load_theme"
if [ -f /usr/bin/kitty ] ; then
termrun="kitty --title dmenu_themes -c=/opt/dmenu-scripts/scripts/kitty.conf -e"
else
xrdb -load /opt/dmenu-scripts/scripts/Xresources
termrun="xterm -T dmenu_themes -e"
fi
function load_theme() {
if [ -f "${load_theme_file}" ] ; then
source "${load_theme_file}"
else
mkdir -p "${load_theme_path}"
mkdir -p "${load_themes}"
echo "#!/bin/bash" > ${load_theme_file}
echo "" >> ${load_theme_file}
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_theme_file}
echo "NBCOLOR=\"#1f1f35\"" >> ${load_theme_file}
echo "SFCOLOR=\"#eeeeee\"" >> ${load_theme_file}
echo "SBCOLOR=\"#664477\"" >> ${load_theme_file}
source "${load_theme_file}"
fi
}
show_icon_tree() {
ls -1 ${folder_themes} | while read current ; do
if [ -f "${folder_themes}/${current}" ] ; then
function load_themes_files() {
count_themes=$(ls -1 "${load_themes}/" | wc -l)
if [ ${count_themes} -lt 18 ] ; then
# Default Purple
echo "#!/bin/bash" > ${load_themes}/default-purple
echo "" >> ${load_themes}/default-purple
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_themes}/default-purple
echo "NBCOLOR=\"#1f1f35\"" >> ${load_themes}/default-purple
echo "SFCOLOR=\"#eeeeee\"" >> ${load_themes}/default-purple
echo "SBCOLOR=\"#664477\"" >> ${load_themes}/default-purple
# Cool Green
echo "#!/bin/bash" > ${load_themes}/cool-green
echo "" >> ${load_themes}/cool-green
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_themes}/cool-green
echo "NBCOLOR=\"#253829\"" >> ${load_themes}/cool-green
echo "SFCOLOR=\"#202118\"" >> ${load_themes}/cool-green
echo "SBCOLOR=\"#98c379\"" >> ${load_themes}/cool-green
# Dark Grey
echo "#!/bin/bash" > ${load_themes}/dark-grey
echo "" >> ${load_themes}/dark-grey
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_themes}/dark-grey
echo "NBCOLOR=\"#0f101a\"" >> ${load_themes}/dark-grey
echo "SFCOLOR=\"#0f101a\"" >> ${load_themes}/dark-grey
echo "SBCOLOR=\"#f1ffff\"" >> ${load_themes}/dark-grey
# Dracula
echo "#!/bin/bash" > ${load_themes}/dracula
echo "" >> ${load_themes}/dracula
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_themes}/dracula
echo "NBCOLOR=\"#292d3e\"" >> ${load_themes}/dracula
echo "SFCOLOR=\"#292d3e\"" >> ${load_themes}/dracula
echo "SBCOLOR=\"#a77ac4\"" >> ${load_themes}/dracula
# Material Darker
echo "#!/bin/bash" > ${load_themes}/material-darker
echo "" >> ${load_themes}/material-darker
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_themes}/material-darker
echo "NBCOLOR=\"#212121\"" >> ${load_themes}/material-darker
echo "SFCOLOR=\"#eeeeee\"" >> ${load_themes}/material-darker
echo "SBCOLOR=\"#a151d3\"" >> ${load_themes}/material-darker
# Material Darker
echo "#!/bin/bash" > ${load_themes}/material-darker
echo "" >> ${load_themes}/material-darker
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_themes}/material-darker
echo "NBCOLOR=\"#212121\"" >> ${load_themes}/material-darker
echo "SFCOLOR=\"#eeeeee\"" >> ${load_themes}/material-darker
echo "SBCOLOR=\"#a151d3\"" >> ${load_themes}/material-darker
# Monokai
echo "#!/bin/bash" > ${load_themes}/monokai
echo "" >> ${load_themes}/monokai
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_themes}/monokai
echo "NBCOLOR=\"#1e1e2e\"" >> ${load_themes}/monokai
echo "SFCOLOR=\"#eeeeee\"" >> ${load_themes}/monokai
echo "SBCOLOR=\"#a32852\"" >> ${load_themes}/monokai
# Monokai Pro
echo "#!/bin/bash" > ${load_themes}/monokai-pro
echo "" >> ${load_themes}/monokai-pro
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_themes}/monokai-pro
echo "NBCOLOR=\"#2d2a2e\"" >> ${load_themes}/monokai-pro
echo "SFCOLOR=\"#2d2a2e\"" >> ${load_themes}/monokai-pro
echo "SBCOLOR=\"#a9dc76\"" >> ${load_themes}/monokai-pro
# Nice Blue
echo "#!/bin/bash" > ${load_themes}/nice-blue
echo "" >> ${load_themes}/nice-blue
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_themes}/nice-blue
echo "NBCOLOR=\"#1b214a\"" >> ${load_themes}/nice-blue
echo "SFCOLOR=\"#eeeeee\"" >> ${load_themes}/nice-blue
echo "SBCOLOR=\"#3e4474\"" >> ${load_themes}/nice-blue
# Nord
echo "#!/bin/bash" > ${load_themes}/nord
echo "" >> ${load_themes}/nord
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_themes}/nord
echo "NBCOLOR=\"#212121\"" >> ${load_themes}/nord
echo "SFCOLOR=\"#292d3e\"" >> ${load_themes}/nord
echo "SBCOLOR=\"#81a1c1\"" >> ${load_themes}/nord
# Nord Wave
echo "#!/bin/bash" > ${load_themes}/nord-wave
echo "" >> ${load_themes}/nord-wave
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_themes}/nord-wave
echo "NBCOLOR=\"#212121\"" >> ${load_themes}/nord-wave
echo "SFCOLOR=\"#292d3e\"" >> ${load_themes}/nord-wave
echo "SBCOLOR=\"#ebcb8b\"" >> ${load_themes}/nord-wave
# Onedark
echo "#!/bin/bash" > ${load_themes}/onedark
echo "" >> ${load_themes}/onedark
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_themes}/onedark
echo "NBCOLOR=\"#1e2127\"" >> ${load_themes}/onedark
echo "SFCOLOR=\"#202118\"" >> ${load_themes}/onedark
echo "SBCOLOR=\"#98c379\"" >> ${load_themes}/onedark
# Orange
echo "#!/bin/bash" > ${load_themes}/orange
echo "" >> ${load_themes}/orange
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_themes}/orange
echo "NBCOLOR=\"#22222c\"" >> ${load_themes}/orange
echo "SFCOLOR=\"#22222c\"" >> ${load_themes}/orange
echo "SBCOLOR=\"#d05a1f\"" >> ${load_themes}/orange
# Psychedelic
echo "#!/bin/bash" > ${load_themes}/psychedelic
echo "" >> ${load_themes}/psychedelic
echo "NFCOLOR=\"#98c379\"" >> ${load_themes}/psychedelic
echo "NBCOLOR=\"#212121\"" >> ${load_themes}/psychedelic
echo "SFCOLOR=\"#ef3a03\"" >> ${load_themes}/psychedelic
echo "SBCOLOR=\"#5457a9\"" >> ${load_themes}/psychedelic
# Red Sea
echo "#!/bin/bash" > ${load_themes}/red-sea
echo "" >> ${load_themes}/red-sea
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_themes}/red-sea
echo "NBCOLOR=\"#941835\"" >> ${load_themes}/red-sea
echo "SFCOLOR=\"#292d3e\"" >> ${load_themes}/red-sea
echo "SBCOLOR=\"#c62570\"" >> ${load_themes}/red-sea
# Rosepine
echo "#!/bin/bash" > ${load_themes}/rosepine
echo "" >> ${load_themes}/rosepine
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_themes}/rosepine
echo "NBCOLOR=\"#1f1d29\"" >> ${load_themes}/rosepine
echo "SFCOLOR=\"#292d3e\"" >> ${load_themes}/rosepine
echo "SBCOLOR=\"#eabbb9\"" >> ${load_themes}/rosepine
# Sunset
echo "#!/bin/bash" > ${load_themes}/sunset
echo "" >> ${load_themes}/sunset
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_themes}/sunset
echo "NBCOLOR=\"#9b3800\"" >> ${load_themes}/sunset
echo "SFCOLOR=\"#22222c\"" >> ${load_themes}/sunset
echo "SBCOLOR=\"#c59a4d\"" >> ${load_themes}/sunset
# White Heaven
echo "#!/bin/bash" > ${load_themes}/white-heaven
echo "" >> ${load_themes}/white-heaven
echo "NFCOLOR=\"#2d2d37\"" >> ${load_themes}/white-heaven
echo "NBCOLOR=\"#a9a8a7\"" >> ${load_themes}/white-heaven
echo "SFCOLOR=\"#a9a8a7\"" >> ${load_themes}/white-heaven
echo "SBCOLOR=\"#2d2d37\"" >> ${load_themes}/white-heaven
# White Wine
echo "#!/bin/bash" > ${load_themes}/white-wine
echo "" >> ${load_themes}/white-wine
echo "NFCOLOR=\"#861616\"" >> ${load_themes}/white-wine
echo "NBCOLOR=\"#a9a8a7\"" >> ${load_themes}/white-wine
echo "SFCOLOR=\"#a9a8a7\"" >> ${load_themes}/white-wine
echo "SBCOLOR=\"#861616\"" >> ${load_themes}/white-wine
fi
}
function show_icon_tree() {
ls -1 ${load_themes} | while read current ; do
if [ -f "${load_themes}/${current}" ] ; then
echo " ${current}"
else
echo " ${current}"
@ -27,7 +177,7 @@ show_icon_tree() {
done
}
remove_icon() {
function remove_icon() {
entry="${@}"
remove_icon_space=0
read_entry=$(echo "${entry}" | grep " ")
@ -42,21 +192,20 @@ remove_icon() {
fi
}
function load_theme() {
file_icon=$(show_icon_tree | dmenu -p " Theme:")
function load_theme_selector() {
file_icon=$(show_icon_tree | dmenu -i -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -p " Theme:")
file=$(remove_icon "${file_icon}")
if [ -z "${file}" ] ; then
echo "# Theme selector canceled"
else
if [ -f /usr/bin/sudo ] ; then
${termrun} sudo ${main_folder}/scripts/build-theme.sh "${file}"
load_theme
else
${termrun} su -c ${main_folder}/scripts/build-theme.sh "${file}"
fi
cp -rf ${load_themes}/${file} ${load_theme_file}
load_theme
load_theme_selector
fi
}
# Run main function for load theme
load_theme
load_themes_files
load_theme_selector

View File

@ -4,23 +4,45 @@
# dmenu_wrun - dmenu script that simulates 'rofi -show window' #
# #
# Author: q3aql <q3aql@duck.com> #
# Last update: 29-05-2022 #
# Last update: 10-07-2022 #
################################################################
list_applications() {
# Configuration variables
load_theme_path="${HOME}/.dmenu"
load_themes="${load_theme_path}/themes"
load_theme_file="${load_theme_path}/load_theme"
function load_theme() {
if [ -f "${load_theme_file}" ] ; then
source "${load_theme_file}"
else
mkdir -p "${load_theme_path}"
mkdir -p "${load_themes}"
echo "#!/bin/bash" > ${load_theme_file}
echo "" >> ${load_theme_file}
echo "NFCOLOR=\"#bbbbbb\"" >> ${load_theme_file}
echo "NBCOLOR=\"#1f1f35\"" >> ${load_theme_file}
echo "SFCOLOR=\"#eeeeee\"" >> ${load_theme_file}
echo "SBCOLOR=\"#664477\"" >> ${load_theme_file}
source "${load_theme_file}"
fi
}
function list_applications() {
list_raw=$(xlsclients | cut -d " " -f 3 | sed -e 's/soffice/libreoffice/g')
for process in ${list_raw}; do
echo "${process}"
done
}
list_applications_icons() {
function list_applications_icons() {
list_applications | while read current_app ; do
echo " ${current_app}"
done
}
list_output=$(list_applications_icons | dmenu "$@" -p " window:")
load_theme
list_output=$(list_applications_icons | dmenu -i -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -p " window:")
run_output=$(echo ${list_output} | cut -c 4-999)
if [ "${run_output}" == "gimp" ] ; then
xdotool search --onlyvisible -classname "${run_output}" windowactivate &> /dev/null

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 45 KiB