diff --git a/users/natalie/home/default.nix b/users/natalie/home/default.nix index 57100be42fe9fb35a7ff7122423d1724193f0a39..445c2f4561b6fe3a0a7c394810c132ce4da4e2e2 100644 --- a/users/natalie/home/default.nix +++ b/users/natalie/home/default.nix @@ -7,5 +7,6 @@ ./swaync.nix ./gtk.nix ./waybar + ./scripts ]; } diff --git a/users/natalie/home/hyprland/binds.nix b/users/natalie/home/hyprland/binds.nix index a3b0968a0a794356e19cce23fe0e8aa08a1f6aa7..f0e655c8cfccc4a8977caf9a6edfeebe4f142053 100644 --- a/users/natalie/home/hyprland/binds.nix +++ b/users/natalie/home/hyprland/binds.nix @@ -1,4 +1,4 @@ -{ ... }: +{ pkgs, ... }: { wayland.windowManager.hyprland.settings = { binds = { @@ -10,7 +10,7 @@ "$mainMod, F1, exec, show-keybinds" # keybindings - "$mainMod, Return, exec, ghostty --gtk-single-instance=true" + "$mainMod, Return, exec, ${pkgs.ghostty}/bin/ghostty --gtk-single-instance=true" "$mainMod, P, pseudo," "$mainMod, C, killactive," "$mainMod, M, exit, " diff --git a/users/natalie/home/hyprland/hyprland.nix b/users/natalie/home/hyprland/hyprland.nix index 126b41c9993c13303c723b746087b4f547ffe10d..0cece8848cead1e0cc27c017d0ea3523983bf6d3 100644 --- a/users/natalie/home/hyprland/hyprland.nix +++ b/users/natalie/home/hyprland/hyprland.nix @@ -12,11 +12,11 @@ wf-recorder glib wayland - direnv playerctl waybar networkmanagerapplet hyprpolkitagent + swappy ]; # systemd.user.targets.hyprland-session.Unit.Wants = [ # "xdg-desktop-autostart.target" diff --git a/users/natalie/home/scripts/default.nix b/users/natalie/home/scripts/default.nix new file mode 100644 index 0000000000000000000000000000000000000000..dfedf068302d3c1c013beda7d55235b2186f247a --- /dev/null +++ b/users/natalie/home/scripts/default.nix @@ -0,0 +1,26 @@ +{ pkgs, ... }: +let + scriptDir = ./scripts; + + mkScript = name: { + inherit name; + value = pkgs.writeScriptBin (builtins.replaceStrings [ ".sh" ] [ "" ] name) ( + builtins.readFile (scriptDir + "/${name}") + ); + }; + + scriptsSet = builtins.listToAttrs ( + map mkScript ( + builtins.attrNames ( + pkgs.lib.filterAttrs (n: v: v == "regular" && (pkgs.lib.hasSuffix ".sh" n)) ( + builtins.readDir ./scripts + ) + ) + ) + ); + scripts = builtins.attrValues scriptsSet; + +in +{ + home.packages = scripts; +} diff --git a/users/natalie/home/scripts/scripts/screenshot.sh b/users/natalie/home/scripts/scripts/screenshot.sh new file mode 100644 index 0000000000000000000000000000000000000000..fe324d8cf2e2dd622714bd323355ba91a0cf5ddc --- /dev/null +++ b/users/natalie/home/scripts/scripts/screenshot.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +dir="$HOME/Pictures/Screenshots" +time=$(date +'%Y_%m_%d_at_%Hh%Mm%Ss') +file="${dir}/Screenshot_${time}.png" + +copy() { + GRIMBLAST_HIDE_CURSOR=0 grimblast --notify --freeze copy area +} + +save() { + GRIMBLAST_HIDE_CURSOR=0 grimblast --notify --freeze save area "$file" +} + +swappy_() { + GRIMBLAST_HIDE_CURSOR=0 grimblast --notify --freeze save area "$file" + swappy -f "$file" +} + +if [[ ! -d "$dir" ]]; then + mkdir -p "$dir" +fi + +if [[ "$1" == "--copy" ]]; then + copy +elif [[ "$1" == "--save" ]]; then + save +elif [[ "$1" == "--swappy" ]]; then + swappy_ +else + echo -e "Available Options: --copy --save --swappy" +fi + +exit 0 diff --git a/users/natalie/home/waybar/settings.nix b/users/natalie/home/waybar/settings.nix index a25d1892bb58b5c959cf8a53e1284f6874be1bd1..266ce1a50c0c94a22d2bb63560c565faafb745fd 100644 --- a/users/natalie/home/waybar/settings.nix +++ b/users/natalie/home/waybar/settings.nix @@ -45,6 +45,7 @@ in "hyprland/language" "tray" "custom/notification" + "custom/power-menu" ]; clock = { calendar = { @@ -77,19 +78,19 @@ in format = " {usage}%"; format-alt = " {avg_frequency} GHz"; interval = 2; - on-click-right = "${pkgs.hyprland}/bin/hyprctl dispatch exec '[float; center; size 950 650] ${pkgs.ghostty}/bin/ghostty --override font_size=14 --title float_ghostty btop'"; + on-click-right = "${pkgs.hyprland}/bin/hyprctl dispatch exec '[float; center; size 950 650] ${pkgs.ghostty}/bin/ghostty --font-size=14 -e btop'"; }; memory = { format = "󰟜 {}%"; format-alt = "󰟜 {used} GiB"; #  interval = 2; - on-click-right = "${pkgs.hyprland}/bin/hyprctl dispatch exec '[float; center; size 950 650] ${pkgs.ghostty}/bin/ghostty --override font_size=14 --title float_ghostty btop'"; + on-click-right = "${pkgs.hyprland}/bin/hyprctl dispatch exec '[float; center; size 950 650] ${pkgs.ghostty}/bin/ghostty --font-size=14 -e btop'"; }; disk = { # path = "/"; format = "󰋊 {percentage_used}%"; interval = 60; - on-click-right = "${pkgs.hyprland}/bin/hyprctl dispatch exec '[float; center; size 950 650] ${pkgs.ghostty}/bin/ghostty --override font_size=14 --title float_ghostty btop'"; + on-click-right = "${pkgs.hyprland}/bin/hyprctl dispatch exec '[float; center; size 950 650] ${pkgs.ghostty}/bin/ghostty --font-size=14 -e btop'"; }; network = { format-wifi = " {signalStrength}%";