Added calendar popup to i3blocks
This commit is contained in:
@@ -48,6 +48,7 @@ bindsym Mod4+u exec echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboa
|
|||||||
# bindsym Mod4+x exec xmodmap ~/.Xmodmap
|
# bindsym Mod4+x exec xmodmap ~/.Xmodmap
|
||||||
bindsym Mod4+z exec cliqz
|
bindsym Mod4+z exec cliqz
|
||||||
# bindsym Print exec gscreenshot
|
# bindsym Print exec gscreenshot
|
||||||
|
bindsym Print --release exec "scrot -s /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
|
||||||
# }}} app shortcuts #
|
# }}} app shortcuts #
|
||||||
|
|
||||||
# redshift {{{ #
|
# redshift {{{ #
|
||||||
@@ -366,6 +367,7 @@ set $sb_font DejaVuSansMono Nerd Font Mono Bold
|
|||||||
# set $sb_font EmojiOne
|
# set $sb_font EmojiOne
|
||||||
set $black #000000
|
set $black #000000
|
||||||
set $white #ffffff
|
set $white #ffffff
|
||||||
|
for_window [class="Yad"] floating enable
|
||||||
|
|
||||||
# inactive vars {{{ #
|
# inactive vars {{{ #
|
||||||
|
|
||||||
|
|||||||
42
configs/i3blocks-scripts/calendar
Executable file
42
configs/i3blocks-scripts/calendar
Executable file
@@ -0,0 +1,42 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
WIDTH=${WIDTH:-200}
|
||||||
|
HEIGHT=${HEIGHT:-200}
|
||||||
|
DATEFMT=${DATEFMT:-"+%a %d.%m.%Y %H:%M:%S"}
|
||||||
|
SHORTFMT=${SHORTFMT:-"+%H:%M:%S"}
|
||||||
|
|
||||||
|
OPTIND=1
|
||||||
|
while getopts ":f:W:H:" opt; do
|
||||||
|
case $opt in
|
||||||
|
f) DATEFMT="$OPTARG" ;;
|
||||||
|
W) WIDTH="$OPTARG" ;;
|
||||||
|
H) HEIGHT="$OPTARG" ;;
|
||||||
|
\?)
|
||||||
|
echo "Invalid option: -$OPTARG" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
:)
|
||||||
|
echo "Option -$OPTARG requires an argument." >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
case "$BLOCK_BUTTON" in
|
||||||
|
1|2|3)
|
||||||
|
|
||||||
|
# the position of the upper left corner of the popup
|
||||||
|
posX=$(($BLOCK_X - $WIDTH / 2))
|
||||||
|
posY=$(($BLOCK_Y - $HEIGHT))
|
||||||
|
|
||||||
|
i3-msg -q "exec yad --calendar \
|
||||||
|
--width=$WIDTH --height=$HEIGHT \
|
||||||
|
--undecorated --fixed \
|
||||||
|
--close-on-unfocus --no-buttons \
|
||||||
|
--posx=$posX --posy=$posY \
|
||||||
|
> /dev/null"
|
||||||
|
esac
|
||||||
|
. "/home/kevin/.cache/wal/colors.sh"
|
||||||
|
echo "$LABEL$(date "$DATEFMT")"
|
||||||
|
echo "$LABEL$(date "$SHORTFMT")"
|
||||||
|
echo "$color7"
|
||||||
@@ -13,12 +13,20 @@ color=#cbe4ff
|
|||||||
# color="${foreground}"
|
# color="${foreground}"
|
||||||
# color="$(echo $foreground)"
|
# color="$(echo $foreground)"
|
||||||
|
|
||||||
[time]
|
# [time]
|
||||||
label=
|
# label=
|
||||||
# label=🕓
|
# # label=🕓
|
||||||
# command=date '+%H:%M.%a-%m-%d'
|
# # command=date '+%H:%M.%a-%m-%d'
|
||||||
|
# interval=30
|
||||||
|
# # color=#acc0cd
|
||||||
|
|
||||||
|
[calendar]
|
||||||
interval=30
|
interval=30
|
||||||
# color=#acc0cd
|
label=
|
||||||
|
DATEFMT=+%H:%M.%a-%m-%d
|
||||||
|
# SHORTFMT=+%H:%M:%S
|
||||||
|
HEIGHT=180
|
||||||
|
WIDTH=220
|
||||||
|
|
||||||
# unbold this?
|
# unbold this?
|
||||||
# [load_average]
|
# [load_average]
|
||||||
|
|||||||
1
txt/ideas.txt
Normal file
1
txt/ideas.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
- nnn
|
||||||
@@ -19,7 +19,7 @@ z /home/kevin/linux-config/aliases/zsh_aliases
|
|||||||
|
|
||||||
hlg /home/kevin/coding/spotify-lib-vis/src/api/management/commands/update-history.log
|
hlg /home/kevin/coding/spotify-lib-vis/src/api/management/commands/update-history.log
|
||||||
id /home/kevin/coding/project-ideas/ideas.md
|
id /home/kevin/coding/project-ideas/ideas.md
|
||||||
jn /home/kevin/Documents/journal/todo/12.md
|
jn /home/kevin/Documents/journal/todo/1.md
|
||||||
jt /home/kevin/Documents/journal/todo/todo.md
|
jt /home/kevin/Documents/journal/todo/todo.md
|
||||||
lh /home/kevin/Documents/listening-history/polarbier.csv
|
lh /home/kevin/Documents/listening-history/polarbier.csv
|
||||||
no ./.gitignore
|
no ./.gitignore
|
||||||
|
|||||||
Reference in New Issue
Block a user