added weather script

This commit is contained in:
Tomas Rivera
2026-02-26 18:53:36 +01:00
parent 321fe30583
commit 09379e898b
5 changed files with 15 additions and 51 deletions
+2
View File
@@ -89,6 +89,8 @@
"$mod+Shift+Ctrl, Down, movewindow, d"
"$mod, mouse_down, workspace, e+1"
"$mod, mouse_up, workspace, e-1"
"$mod, V, exec, cliphist list | rofi -dmenu| cliphist decode | wl-copy" # copy paste
"$mod, B, exec, hyprkeys -bkr | rofi -dmenu"
#apps keybindings
"$mod, T, exec, $term"
"$mod, E, exec, $file"
-50
View File
@@ -1,50 +0,0 @@
{ writeShellApplication
, cliphist
, rofi
, wl-clipboard
}:
writeShellApplication {
name = "custom-cliphist";
runtimeInputs = [
cliphist # clipboard manager
rofi # launcher menu
wl-clipboard # wl-copy
];
text = ''
set -euo pipefail
action="${1:-}"
case "$action" in
c|-c|--copy)
cliphist list |
rofi -dmenu" |
cliphist decode |
wl-copy
;;
d|-d|--delete)
cliphist list |
rofi -dmenu" |
cliphist delete
;;
w|-w|--wipe)
if [[ "$(printf "Yes\nNo" | rofi -dmenu")" == "Yes" ]]; then
cliphist wipe
fi
;;
*)
echo "custom-cliphist [action]"
echo "c -c --copy : list and copy selected"
echo "d -d --delete : list and delete selected"
echo "w -w --wipe : wipe clipboard database"
exit 1
;;
esac
'';
}
+11
View File
@@ -0,0 +1,11 @@
{ writeShellApplication, curl, ... }:
writeShellApplication {
name = "custom-weather";
runtimeInputs = [
curl
];
text = ''
while true; do curl "https://wttr.in/Prangins?0&d&q&F&lang=fr"; sleep 7200; done
'';
}