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
+1
View File
@@ -142,6 +142,7 @@ services.upower.enable = true;
notepad-next notepad-next
libnotify # Library that sends desktop notifications to a notification daemon libnotify # Library that sends desktop notifications to a notification daemon
ripgrep #better grepp ripgrep #better grepp
hyprkeys # keybind helper
#we need to install gnome and kde utils individually as we dont use gnome #we need to install gnome and kde utils individually as we dont use gnome
gnome-calculator gnome-calculator
snapshot snapshot
+1 -1
View File
@@ -38,7 +38,7 @@ home.packages = [
#scritps #scritps
(pkgs.callPackage ../../modules/scripts/dontkillsteam.nix {}) (pkgs.callPackage ../../modules/scripts/dontkillsteam.nix {})
(pkgs.callPackage ../../modules/scripts/batterynotify.nix {}) (pkgs.callPackage ../../modules/scripts/batterynotify.nix {})
(pkgs.callPackage ../../modules/scripts/cliphist.nix {}) (pkgs.callPackage ../../modules/scripts/weather.nix {})
# # Adds the 'hello' command to your environment. It prints a friendly # # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run. # # "Hello, world!" when run.
# pkgs.hello # pkgs.hello
+2
View File
@@ -89,6 +89,8 @@
"$mod+Shift+Ctrl, Down, movewindow, d" "$mod+Shift+Ctrl, Down, movewindow, d"
"$mod, mouse_down, workspace, e+1" "$mod, mouse_down, workspace, e+1"
"$mod, mouse_up, 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 #apps keybindings
"$mod, T, exec, $term" "$mod, T, exec, $term"
"$mod, E, exec, $file" "$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
'';
}