authorgravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2025-10-30 19:17:25-07:00
committergravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2025-10-30 19:17:25-07:00
loga4898824baec822428b5b531ddd26a479146a2be
treef96d8447a4e94e839d558d1dfd25c57fae4272b1
parent5a4dc3b0c38ce3a1e14ec94a6988fa085297feb4
signature Commit is signed but in an unrecognized format.

feat (natalie): add screenshot util, and with it a method for converting a folder of shell scripts into nix programs.


6 files changed, 68 insertions(+), 6 deletions(-)

users/natalie/home/default.nix+1
...@@ -7,5 +7,6 @@...@@ -7,5 +7,6 @@
7 ./swaync.nix7 ./swaync.nix
8 ./gtk.nix8 ./gtk.nix
9 ./waybar9 ./waybar
10 ./scripts
10 ];11 ];
11}12}
users/natalie/home/hyprland/binds.nix+2-2
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1{ ... }:1{ pkgs, ... }:
2{2{
3 wayland.windowManager.hyprland.settings = {3 wayland.windowManager.hyprland.settings = {
4 binds = {4 binds = {
...@@ -10,7 +10,7 @@...@@ -10,7 +10,7 @@
10 "$mainMod, F1, exec, show-keybinds"10 "$mainMod, F1, exec, show-keybinds"
1111
12 # keybindings12 # keybindings
13 "$mainMod, Return, exec, ghostty --gtk-single-instance=true"13 "$mainMod, Return, exec, ${pkgs.ghostty}/bin/ghostty --gtk-single-instance=true"
14 "$mainMod, P, pseudo,"14 "$mainMod, P, pseudo,"
15 "$mainMod, C, killactive,"15 "$mainMod, C, killactive,"
16 "$mainMod, M, exit, "16 "$mainMod, M, exit, "
users/natalie/home/hyprland/hyprland.nix+1-1
...@@ -12,11 +12,11 @@...@@ -12,11 +12,11 @@
12 wf-recorder12 wf-recorder
13 glib13 glib
14 wayland14 wayland
15 direnv
16 playerctl15 playerctl
17 waybar16 waybar
18 networkmanagerapplet17 networkmanagerapplet
19 hyprpolkitagent18 hyprpolkitagent
19 swappy
20 ];20 ];
21 # systemd.user.targets.hyprland-session.Unit.Wants = [21 # systemd.user.targets.hyprland-session.Unit.Wants = [
22 # "xdg-desktop-autostart.target"22 # "xdg-desktop-autostart.target"
users/natalie/home/scripts/default.nix created+26
...@@ -0,0 +1,26 @@
1{ pkgs, ... }:
2let
3 scriptDir = ./scripts;
4
5 mkScript = name: {
6 inherit name;
7 value = pkgs.writeScriptBin (builtins.replaceStrings [ ".sh" ] [ "" ] name) (
8 builtins.readFile (scriptDir + "/${name}")
9 );
10 };
11
12 scriptsSet = builtins.listToAttrs (
13 map mkScript (
14 builtins.attrNames (
15 pkgs.lib.filterAttrs (n: v: v == "regular" && (pkgs.lib.hasSuffix ".sh" n)) (
16 builtins.readDir ./scripts
17 )
18 )
19 )
20 );
21 scripts = builtins.attrValues scriptsSet;
22
23in
24{
25 home.packages = scripts;
26}
users/natalie/home/scripts/scripts/screenshot.sh created+34
...@@ -0,0 +1,34 @@
1#!/usr/bin/env bash
2
3dir="$HOME/Pictures/Screenshots"
4time=$(date +'%Y_%m_%d_at_%Hh%Mm%Ss')
5file="${dir}/Screenshot_${time}.png"
6
7copy() {
8 GRIMBLAST_HIDE_CURSOR=0 grimblast --notify --freeze copy area
9}
10
11save() {
12 GRIMBLAST_HIDE_CURSOR=0 grimblast --notify --freeze save area "$file"
13}
14
15swappy_() {
16 GRIMBLAST_HIDE_CURSOR=0 grimblast --notify --freeze save area "$file"
17 swappy -f "$file"
18}
19
20if [[ ! -d "$dir" ]]; then
21 mkdir -p "$dir"
22fi
23
24if [[ "$1" == "--copy" ]]; then
25 copy
26elif [[ "$1" == "--save" ]]; then
27 save
28elif [[ "$1" == "--swappy" ]]; then
29 swappy_
30else
31 echo -e "Available Options: --copy --save --swappy"
32fi
33
34exit 0
users/natalie/home/waybar/settings.nix+4-3
...@@ -45,6 +45,7 @@ in...@@ -45,6 +45,7 @@ in
45 "hyprland/language"45 "hyprland/language"
46 "tray"46 "tray"
47 "custom/notification"47 "custom/notification"
48 "custom/power-menu"
48 ];49 ];
49 clock = {50 clock = {
50 calendar = {51 calendar = {
...@@ -77,19 +78,19 @@ in...@@ -77,19 +78,19 @@ in
77 format = "<span foreground='${green}'> </span> {usage}%";78 format = "<span foreground='${green}'> </span> {usage}%";
78 format-alt = "<span foreground='${green}'> </span> {avg_frequency} GHz";79 format-alt = "<span foreground='${green}'> </span> {avg_frequency} GHz";
79 interval = 2;80 interval = 2;
80 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'";81 on-click-right = "${pkgs.hyprland}/bin/hyprctl dispatch exec '[float; center; size 950 650] ${pkgs.ghostty}/bin/ghostty --font-size=14 -e btop'";
81 };82 };
82 memory = {83 memory = {
83 format = "<span foreground='${cyan}'>󰟜 </span>{}%";84 format = "<span foreground='${cyan}'>󰟜 </span>{}%";
84 format-alt = "<span foreground='${cyan}'>󰟜 </span>{used} GiB"; # 85 format-alt = "<span foreground='${cyan}'>󰟜 </span>{used} GiB"; # 
85 interval = 2;86 interval = 2;
86 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'";87 on-click-right = "${pkgs.hyprland}/bin/hyprctl dispatch exec '[float; center; size 950 650] ${pkgs.ghostty}/bin/ghostty --font-size=14 -e btop'";
87 };88 };
88 disk = {89 disk = {
89 # path = "/";90 # path = "/";
90 format = "<span foreground='${orange}'>󰋊 </span>{percentage_used}%";91 format = "<span foreground='${orange}'>󰋊 </span>{percentage_used}%";
91 interval = 60;92 interval = 60;
92 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'";93 on-click-right = "${pkgs.hyprland}/bin/hyprctl dispatch exec '[float; center; size 950 650] ${pkgs.ghostty}/bin/ghostty --font-size=14 -e btop'";
93 };94 };
94 network = {95 network = {
95 format-wifi = "<span foreground='${magenta}'> </span> {signalStrength}%";96 format-wifi = "<span foreground='${magenta}'> </span> {signalStrength}%";