Fix width with dmenu 5.2

This commit is contained in:
q3aql 2022-11-20 12:28:18 +01:00
parent 2c5add107b
commit cb07ccab07
7 changed files with 70 additions and 9 deletions

View File

@ -4,7 +4,7 @@
# dmenu_close - dmenu script for poweroff/reboot/suspend and logout # # dmenu_close - dmenu script for poweroff/reboot/suspend and logout #
# # # #
# Author: q3aql <q3aql@duck.com> # # Author: q3aql <q3aql@duck.com> #
# Last update: 29-07-2022 # # Last update: 20-11-2022 #
##################################################################### #####################################################################
# Configuration variables # Configuration variables
@ -41,6 +41,7 @@ function load_session_options() {
if [ ! -z "${sessions_check}" ] ; then if [ ! -z "${sessions_check}" ] ; then
echo " Logout" echo " Logout"
fi fi
generate_spaces 75
} }
function close_session() { function close_session() {

View File

@ -5,7 +5,7 @@
# only insert command # # only insert command #
# # # #
# Author: q3aql <q3aql@duck.com> # # Author: q3aql <q3aql@duck.com> #
# Last update: 10-07-2022 # # Last update: 20-11-2022 #
############################################################ ############################################################
# Configuration variables # Configuration variables
@ -29,6 +29,16 @@ function load_theme() {
fi fi
} }
function generate_spaces() {
num_spaces=${1}
count_spaces=1
while [ ${count_spaces} -le ${num_spaces} ] ; do
echo -n " "
count_spaces=$(expr ${count_spaces} + 1)
done
}
load_theme load_theme
command_run=$(echo > /dev/null | dmenu -i -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -l 18 -p " command:") command_run=$(generate_spaces 75 | dmenu -i -nb "${NBCOLOR}" -nf "${NFCOLOR}" -sb "${SBCOLOR}" -sf "${SFCOLOR}" -l 18 -p " command:")
${command_run} ${command_run}

View File

@ -4,7 +4,7 @@
# dmenu_drun - dmenu script that simulates 'rofi -show drun' # # dmenu_drun - dmenu script that simulates 'rofi -show drun' #
# # # #
# Author: q3aql <q3aql@duck.com> # # Author: q3aql <q3aql@duck.com> #
# Last update: 14-07-2022 # # Last update: 20-11-2022 #
############################################################## ##############################################################
# Configuration variables # Configuration variables
@ -31,6 +31,15 @@ function load_theme() {
fi fi
} }
function generate_spaces() {
num_spaces=${1}
count_spaces=1
while [ ${count_spaces} -le ${num_spaces} ] ; do
echo -n " "
count_spaces=$(expr ${count_spaces} + 1)
done
}
function list_desktop_files() { function list_desktop_files() {
if [ -d "${desktop_files}" ] ; then if [ -d "${desktop_files}" ] ; then
ls -1 "${desktop_files}/" | grep ".desktop" ls -1 "${desktop_files}/" | grep ".desktop"
@ -45,6 +54,7 @@ function list_desktop_icons() {
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
} }
rundesk () { rundesk () {

View File

@ -4,7 +4,7 @@
# dmenu_fbrun - dmenu script that simulates 'rofi -show filebrowser' # # dmenu_fbrun - dmenu script that simulates 'rofi -show filebrowser' #
# # # #
# Author: q3aql <q3aql@duck.com> # # Author: q3aql <q3aql@duck.com> #
# Last update: 10-07-2022 # # Last update: 20-11-2022 #
###################################################################### ######################################################################
# Configuration variables # Configuration variables
@ -28,6 +28,15 @@ function load_theme() {
fi fi
} }
function generate_spaces() {
num_spaces=${1}
count_spaces=1
while [ ${count_spaces} -le ${num_spaces} ] ; do
echo -n " "
count_spaces=$(expr ${count_spaces} + 1)
done
}
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
@ -38,6 +47,7 @@ function show_icon_tree() {
echo " ${current}" echo " ${current}"
fi fi
done done
generate_spaces 75
} }
function remove_icon() { function remove_icon() {

View File

@ -4,7 +4,7 @@
# dmenu_run - dmenu script that simulates 'rofi -show run' # # dmenu_run - dmenu script that simulates 'rofi -show run' #
# # # #
# Author: q3aql <q3aql@duck.com> # # Author: q3aql <q3aql@duck.com> #
# Last update: 10-07-2022 # # Last update: 20-11-2022 #
############################################################ ############################################################
# Configuration variables # Configuration variables
@ -28,6 +28,15 @@ function load_theme() {
fi fi
} }
function generate_spaces() {
num_spaces=${1}
count_spaces=1
while [ ${count_spaces} -le ${num_spaces} ] ; do
echo -n " "
count_spaces=$(expr ${count_spaces} + 1)
done
}
function list_binaries() { function list_binaries() {
binaries=0 binaries=0
path_binaries=${PATH} path_binaries=${PATH}
@ -53,6 +62,7 @@ function list_binaries_icons() {
list_binaries | while read current_binary ; do list_binaries | while read current_binary ; do
echo " ${current_binary}" echo " ${current_binary}"
done done
generate_spaces 75
} }
load_theme load_theme

View File

@ -4,7 +4,7 @@
# dmenu_themes - dmenu script that simulates 'rofi-theme-selector' # # dmenu_themes - dmenu script that simulates 'rofi-theme-selector' #
# # # #
# Author: q3aql <q3aql@duck.com> # # Author: q3aql <q3aql@duck.com> #
# Last update: 10-07-2022 # # Last update: 20-11-2022 #
#################################################################### ####################################################################
# Configuration variables # Configuration variables
@ -167,6 +167,15 @@ function load_themes_files() {
fi fi
} }
function generate_spaces() {
num_spaces=${1}
count_spaces=1
while [ ${count_spaces} -le ${num_spaces} ] ; do
echo -n " "
count_spaces=$(expr ${count_spaces} + 1)
done
}
function show_icon_tree() { function show_icon_tree() {
ls -1 ${load_themes} | while read current ; do ls -1 ${load_themes} | while read current ; do
if [ -f "${load_themes}/${current}" ] ; then if [ -f "${load_themes}/${current}" ] ; then
@ -175,6 +184,7 @@ function show_icon_tree() {
echo " ${current}" echo " ${current}"
fi fi
done done
generate_spaces 75
} }
function remove_icon() { function remove_icon() {

View File

@ -4,7 +4,7 @@
# dmenu_wrun - dmenu script that simulates 'rofi -show window' # # dmenu_wrun - dmenu script that simulates 'rofi -show window' #
# # # #
# Author: q3aql <q3aql@duck.com> # # Author: q3aql <q3aql@duck.com> #
# Last update: 16-07-2022 # # Last update: 20-11-2022 #
################################################################ ################################################################
# Configuration variables # Configuration variables
@ -28,6 +28,15 @@ function load_theme() {
fi fi
} }
function generate_spaces() {
num_spaces=${1}
count_spaces=1
while [ ${count_spaces} -le ${num_spaces} ] ; do
echo -n " "
count_spaces=$(expr ${count_spaces} + 1)
done
}
function check_wmctrl() { function check_wmctrl() {
wmctrl -h &> /dev/null wmctrl -h &> /dev/null
error=$? error=$?
@ -41,6 +50,7 @@ function list_applications_icons() {
wmctrl -l | while read current_app ; do wmctrl -l | while read current_app ; do
echo " ${current_app}" echo " ${current_app}"
done done
generate_spaces 75
} }
load_theme load_theme