You are not logged in.
Pages: 1
Having discovered the wonderful yad program awhile back i have revisited it and give you the following cool scripts. The calendar is mainly a good script to use for the dwm statusbar with the systray patch.
Yad exit menu with papirus icons, this needs elogind to work, you could swap out the commands with sudo though.
Xscreensaver for locking, all other locking programs dont quite compare to it.
#!/usr/bin/env bash
yad-cancel() {
kill -USR1 $YAD_PID
}
export -f yad-cancel
yad --no-buttons --close-on-unfocus --width 200 --height 50 --form --columns 5 --borders=20 --center --on-top \
--field=Lock!"$HOME/bin/exit-icons/lock.svg":fbtn "xscreensaver-command -l" \
--field=Logout!"$HOME/bin/exit-icons/logout.svg":fbtn "pkill -U $USER" \
--field=Reboot!"$HOME/bin/exit-icons/reboot.svg":fbtn "loginctl reboot" \
--field=Poweroff!"$HOME/bin/exit-icons/poweroff.svg":fbtn "loginctl poweroff" \
--field=Cancel!"$HOME/bin/exit-icons/close.svg":fbtn "bash -c yad-cancel"
Yad notification calendar using gsimplecal.
#!/usr/bin/env bash
yad --notification \
--image="/usr/share/icons/Papirus-Dark/24x24/apps/office-calendar.svg" \
--command="gsimplecal" --text="$(date)" \
Some scrots
EDIT: calendar tooltip --text="$(date)" needs a 60 second loop, not sure how to implement that alongside yad?
UPDATE 12/12/20 : for yad exit menu using a newer version of yad (on artixlinux), i can call the icons from /usr/share/icons/Papirus as per below.
#!/bin/bash
yad-cancel() {
kill -USR1 $YAD_PID
}
export -f yad-cancel
yad --no-buttons --close-on-unfocus --width 500 --height 50 --form --columns=5 --borders=10 --center --on-top \
--field='!database-lock!lock':fbtn "xscreensaver-command -l" \
--field='!application-exit!logout':fbtn "loginctl kill-user $USER" \
--field='!reload!reboot':fbtn "loginctl reboot" \
--field='!system-shutdown-panel!poweroff':fbtn "loginctl poweroff" \
--field='!button_cancel!cancel':fbtn "bash -c yad-cancel"
Last edited by dice (2020-12-12 10:16:34)
“That which is below is like that which is above, and that which is above is like that which is below, to perform the miracles of one only thing.”
-Hermes Trismegistos
Offline
Nice, thanks for sharing.
Apologies if this is an irritating point to raise but your scripts do not use bashisms so they could (should?) have a /bin/sh shebang instead.
EDIT: and did you know that yad already has a calendar?
yad --calendar
Last edited by Head_on_a_Stick (2020-12-08 17:04:00)
Black Lives Matter
Offline
Im very novice at scripts, i had thought that they could just be /bin/sh, thanks.
Ahh yes i forgot yad had a calendar function, i will have to incorporate that instead maybe, although does gsimplecal have a bit more functionality than yad calendar? i will have to find out.
“That which is below is like that which is above, and that which is above is like that which is below, to perform the miracles of one only thing.”
-Hermes Trismegistos
Offline
as promised, the yad exit icons. They are just recolored #15539E papirus 24x24 action and panel icons done in inkscape, all credit to papirus icons.
https://notabug.org/dice_1/dotfiles/src … with-icons
no longer available, deleted repo. The idea was no good anyway, i cant figure out how to save svg file properly.
Last edited by dice (2020-12-12 10:11:49)
“That which is below is like that which is above, and that which is above is like that which is below, to perform the miracles of one only thing.”
-Hermes Trismegistos
Offline
Pages: 1