Created
June 18, 2022 09:08
-
-
Save ekm507/66ba3895666931e52d3e7beb1d40d072 to your computer and use it in GitHub Desktop.
اسکریپ برداشتن رونوشت ساعت و تاریخ شمسی
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
#!/bin/bash | |
session=$(loginctl show-session $(awk '/tty/ {print $1}' <(loginctl)) -p Type | awk -F= '{print $2}') | |
today=$(jdate '+%O-%P-%D %h:%v') | |
if [ $session == wayland ] | |
then | |
wl-copy $today | |
else | |
echo $today | xclip -selection clipboard -i | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment