Created
December 25, 2023 00:46
-
-
Save tfkhdyt/653deae7e76fd8f38f1fc6c0e89fc5cb to your computer and use it in GitHub Desktop.
Yuuko Alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
yad \ | |
--info --text 'Selamat Pagi !' --title 'Yuuko Alert' \ | |
--image './yuuko_selamat_pagi_greeting-75.png' --button="OK:0" \ | |
--width 200 --height 150 --text-align 'center' --buttons-layout 'center' \ | |
--center |
Author
tfkhdyt
commented
Dec 25, 2023
I've got an idea
#!/bin/bash
if [ $[$(date +%H)] -ge 18 ]; then
CHARACTER="Mai"
GREETING="malam"
else
CHARACTER="Yuuko"
GREETING="pagi"
fi
yad \
--info --text "Selamat $GREETING!" --title "$CHARACTER Alert" \
--image "./${CHARACTER}_selamat_greeting-75.png" --button="OK:0" \
--width 200 --height 150 --text-align 'center' \
--buttons-layout 'center' --center
unset GREETING CHARACTER
This one will be time reactive - After 18:00 it shows you "Selamat Malam" (Good evening, which Mai used once to reply Yuuko), and before 18:00 it shows you "Selamat Pagi" (we know that one). I don't know if it will work in 12-hour format (It probably will since man date
tells that %H shows hour in 24-hour format regardless of the regional settings). In case-sensitive file-systems (most linux file systems, including ext4), images should start with a capital letter.
Sorry for no alpha in this image, but I couldn't find anything better - feel free to replace it
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment