Regenerated
This commit is contained in:
+395
-321
File diff suppressed because it is too large
Load Diff
+76
-9
@@ -1277,21 +1277,35 @@ in
|
||||
** =generated/modules/traveldroid/system/copy_scripts.nix=
|
||||
#+BEGIN_SRC nix :tangle generated/modules/traveldroid/system/copy_scripts.nix :noweb yes :mkdirp yes :eval never
|
||||
{ lib, config, pkgs, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
username = config.defaultUser or "henrov";
|
||||
scriptsPath = flakeRoot + "/generated/.config/scripts";
|
||||
|
||||
# Get all files in the scripts directory recursively
|
||||
scriptFiles = lib.filesystem.listFilesRecursive scriptsPath;
|
||||
|
||||
# Convert a file path to a relative string like ".config/scripts/foo.sh"
|
||||
toRelative = file:
|
||||
let
|
||||
fullStr = toString file;
|
||||
baseStr = toString (flakeRoot + "/generated/");
|
||||
in
|
||||
lib.removePrefix baseStr fullStr;
|
||||
|
||||
# Build the attrset entry for each file
|
||||
toFileEntry = file: {
|
||||
name = toRelative file;
|
||||
value = {
|
||||
text = builtins.readFile file;
|
||||
executable = true;
|
||||
force = true;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
home-manager.users = {
|
||||
${username} = {
|
||||
home.file = {
|
||||
".config/scripts/update.sh" = {
|
||||
text = builtins.readFile (flakeRoot + "/generated/.config/scripts/update.sh");
|
||||
executable = true;
|
||||
force = true;
|
||||
};
|
||||
};
|
||||
home.file = builtins.listToAttrs (map toFileEntry scriptFiles);
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -2535,6 +2549,59 @@ workspace = 9
|
||||
workspace = 10
|
||||
#+END_SRC
|
||||
|
||||
** =generated/.config/scripts/power.sh=
|
||||
A file containing color variables
|
||||
#+BEGIN_SRC sh :tangle generated/.config/scripts/power.sh :noweb yes :mkdirp yes :eval never
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Launch a power menu
|
||||
#
|
||||
# Requires fzf and systemd (loginctl, systemctl)
|
||||
#
|
||||
# Author: Jesse Mirabel <sejjymvm@gmail.com>
|
||||
# Date: August 19, 2025
|
||||
# License: MIT
|
||||
|
||||
main() {
|
||||
local list=(
|
||||
"Lock"
|
||||
"Shutdown"
|
||||
"Reboot"
|
||||
"Logout"
|
||||
"Hibernate"
|
||||
"Suspend"
|
||||
)
|
||||
|
||||
local options=(
|
||||
"--border=sharp"
|
||||
"--border-label= Power Menu "
|
||||
"--cycle"
|
||||
"--ghost=Search"
|
||||
"--height=~100%"
|
||||
"--highlight-line"
|
||||
"--info=inline-right"
|
||||
"--pointer="
|
||||
"--reverse"
|
||||
)
|
||||
|
||||
local selected
|
||||
selected=$(printf "%s\n" "${list[@]}" | fzf "${options[@]}")
|
||||
|
||||
case $selected in
|
||||
Lock) loginctl lock-session ;;
|
||||
Shutdown) systemctl poweroff ;;
|
||||
Reboot) systemctl reboot ;;
|
||||
Logout) loginctl terminate-session "$XDG_SESSION_ID" ;;
|
||||
Hibernate) systemctl hibernate ;;
|
||||
Suspend) systemctl suspend ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
main
|
||||
|
||||
#+END_SRC
|
||||
|
||||
** =generated/.config/scripts/update.sh=
|
||||
A file containing color variables
|
||||
#+BEGIN_SRC sh :tangle generated/.config/scripts/update.sh :noweb yes :mkdirp yes :eval never
|
||||
@@ -3151,7 +3218,7 @@ These are config files for waybar
|
||||
// "max-length":
|
||||
// "align":
|
||||
// "justify":
|
||||
"on-click": "kitty -e ~/.config/waybar/scripts/power",
|
||||
"on-click": "kitty -e ~/.config/scripts/power",
|
||||
// "on-click-middle":
|
||||
// "on-click-right":
|
||||
// "on-update":
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Launch a power menu
|
||||
#
|
||||
# Requires fzf and systemd (loginctl, systemctl)
|
||||
#
|
||||
# Author: Jesse Mirabel <sejjymvm@gmail.com>
|
||||
# Date: August 19, 2025
|
||||
# License: MIT
|
||||
|
||||
main() {
|
||||
local list=(
|
||||
"Lock"
|
||||
"Shutdown"
|
||||
"Reboot"
|
||||
"Logout"
|
||||
"Hibernate"
|
||||
"Suspend"
|
||||
)
|
||||
|
||||
local options=(
|
||||
"--border=sharp"
|
||||
"--border-label= Power Menu "
|
||||
"--cycle"
|
||||
"--ghost=Search"
|
||||
"--height=~100%"
|
||||
"--highlight-line"
|
||||
"--info=inline-right"
|
||||
"--pointer="
|
||||
"--reverse"
|
||||
)
|
||||
|
||||
local selected
|
||||
selected=$(printf "%s\n" "${list[@]}" | fzf "${options[@]}")
|
||||
|
||||
case $selected in
|
||||
Lock) loginctl lock-session ;;
|
||||
Shutdown) systemctl poweroff ;;
|
||||
Reboot) systemctl reboot ;;
|
||||
Logout) loginctl terminate-session "$XDG_SESSION_ID" ;;
|
||||
Hibernate) systemctl hibernate ;;
|
||||
Suspend) systemctl suspend ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
main
|
||||
@@ -142,7 +142,7 @@
|
||||
// "max-length":
|
||||
// "align":
|
||||
// "justify":
|
||||
"on-click": "kitty -e ~/.config/waybar/scripts/power",
|
||||
"on-click": "kitty -e ~/.config/scripts/power",
|
||||
// "on-click-middle":
|
||||
// "on-click-right":
|
||||
// "on-update":
|
||||
|
||||
@@ -1,19 +1,33 @@
|
||||
{ lib, config, pkgs, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
username = config.defaultUser or "henrov";
|
||||
scriptsPath = flakeRoot + "/generated/.config/scripts";
|
||||
|
||||
# Get all files in the scripts directory recursively
|
||||
scriptFiles = lib.filesystem.listFilesRecursive scriptsPath;
|
||||
|
||||
# Convert a file path to a relative string like ".config/scripts/foo.sh"
|
||||
toRelative = file:
|
||||
let
|
||||
fullStr = toString file;
|
||||
baseStr = toString (flakeRoot + "/generated/");
|
||||
in
|
||||
lib.removePrefix baseStr fullStr;
|
||||
|
||||
# Build the attrset entry for each file
|
||||
toFileEntry = file: {
|
||||
name = toRelative file;
|
||||
value = {
|
||||
text = builtins.readFile file;
|
||||
executable = true;
|
||||
force = true;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
home-manager.users = {
|
||||
${username} = {
|
||||
home.file = {
|
||||
".config/scripts/update.sh" = {
|
||||
text = builtins.readFile (flakeRoot + "/generated/.config/scripts/update.sh");
|
||||
executable = true;
|
||||
force = true;
|
||||
};
|
||||
};
|
||||
home.file = builtins.listToAttrs (map toFileEntry scriptFiles);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user