mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 18:30:46 +02:00
added weather script
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -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
|
||||||
|
'';
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user