-
Notifications
You must be signed in to change notification settings - Fork 0
Dankman #1272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dankman #1272
Changes from all commits
6417511
dcba0ee
6360303
a3e5ec6
77b7f04
8980f98
c3cc911
4b6e4a1
d23720e
80cf402
d0c1c6d
aedc536
95a3a95
576d953
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| palette = 0=#5c5f77 | ||
| palette = 1=#d20f39 | ||
| palette = 2=#40a02b | ||
| palette = 3=#df8e1d | ||
| palette = 4=#1e66f5 | ||
| palette = 5=#ea76cb | ||
| palette = 6=#179299 | ||
| palette = 7=#acb0be | ||
| palette = 8=#6c6f85 | ||
| palette = 9=#de293e | ||
| palette = 10=#49af3d | ||
| palette = 11=#eea02d | ||
| palette = 12=#456eff | ||
| palette = 13=#fe85d8 | ||
| palette = 14=#2d9fa8 | ||
| palette = 15=#bcc0cc | ||
| background = #eff1f5 | ||
| foreground = #4c4f69 | ||
| cursor-color = #dc8a78 | ||
| cursor-text = #eff1f5 | ||
| selection-background = #acb0be | ||
| selection-foreground = #4c4f69 | ||
| unfocused-split-fill = #dce0e8 | ||
| split-divider-color = #7287fd |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| palette = 0=#21222c | ||
| palette = 1=#ff5555 | ||
| palette = 2=#50fa7b | ||
| palette = 3=#f1fa8c | ||
| palette = 4=#bd93f9 | ||
| palette = 5=#ff79c6 | ||
| palette = 6=#8be9fd | ||
| palette = 7=#f8f8f2 | ||
| palette = 8=#6272a4 | ||
| palette = 9=#ff6e6e | ||
| palette = 10=#69ff94 | ||
| palette = 11=#ffffa5 | ||
| palette = 12=#d6acff | ||
| palette = 13=#ff92df | ||
| palette = 14=#a4ffff | ||
| palette = 15=#ffffff | ||
| background = #282a36 | ||
| foreground = #f8f8f2 | ||
| cursor-color = #f8f8f2 | ||
| cursor-text = #282a36 | ||
| selection-background = #44475a | ||
| selection-foreground = #ffffff | ||
| unfocused-split-fill = #1e1e2e | ||
| split-divider-color = #88c0d0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| ./cargo-globals | ||
| ./openclaw | ||
| ./local-binaries | ||
| ./local-scripts | ||
| ./npm-globals | ||
| ./tailscale | ||
| ./uv-globals | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| if command -v pbcopy >/dev/null 2>&1; then | ||
| exec pbcopy | ||
| fi | ||
|
|
||
| if [[ -n ${WAYLAND_DISPLAY:-} ]] && command -v wl-copy >/dev/null 2>&1; then | ||
| exec wl-copy | ||
| fi | ||
|
|
||
| if command -v xclip >/dev/null 2>&1; then | ||
| exec xclip -selection clipboard | ||
| fi | ||
|
|
||
| if command -v xsel >/dev/null 2>&1; then | ||
| exec xsel --clipboard --input | ||
| fi | ||
|
|
||
| printf 'No clipboard backend available\n' >&2 | ||
| exit 1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { ... }: | ||
| { | ||
| home.file.".local/scripts/clipboard-copy" = { | ||
| executable = true; | ||
| force = true; | ||
| source = ./clipboard-copy.sh; | ||
| }; | ||
| home.file.".local/scripts/notify-local" = { | ||
| executable = true; | ||
| force = true; | ||
| source = ./notify-local.sh; | ||
| }; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| title="${1:-Notification}" | ||
| message="${2:-}" | ||
| sound="${3:-}" | ||
|
|
||
| if [[ -z $message ]]; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| title="${title//$'\n'/ }" | ||
| message="${message//$'\n'/ }" | ||
| sound="${sound//$'\n'/ }" | ||
|
|
||
| escape_applescript() { | ||
| local value="$1" | ||
|
|
||
| value="${value//\\/\\\\}" | ||
| value="${value//\"/\\\"}" | ||
|
|
||
| printf '%s' "$value" | ||
| } | ||
|
|
||
| if command -v osascript >/dev/null 2>&1; then | ||
| escaped_title="$(escape_applescript "$title")" | ||
| escaped_message="$(escape_applescript "$message")" | ||
|
|
||
| if [[ -n $sound ]]; then | ||
| escaped_sound="$(escape_applescript "$sound")" | ||
| osascript -e "display notification \"$escaped_message\" with title \"$escaped_title\" sound name \"$escaped_sound\"" >/dev/null 2>&1 || true | ||
| else | ||
| osascript -e "display notification \"$escaped_message\" with title \"$escaped_title\"" >/dev/null 2>&1 || true | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The osascript path always exits even on failure, so fallback notifiers are never attempted when osascript is present but unusable. Prompt for AI agents |
||
| fi | ||
|
|
||
| exit 0 | ||
| fi | ||
|
|
||
| if command -v notify-send >/dev/null 2>&1; then | ||
| notify-send "$title" "$message" >/dev/null 2>&1 || true | ||
| exit 0 | ||
| fi | ||
|
|
||
| if command -v terminal-notifier >/dev/null 2>&1; then | ||
| terminal-notifier -title "$title" -message "$message" >/dev/null 2>&1 || true | ||
| exit 0 | ||
| fi | ||
|
Comment on lines
+26
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fallback chain exits even when the chosen backend fails. Line 32/34/41/46 suppress errors with Suggested fix if command -v osascript >/dev/null 2>&1; then
escaped_title="$(escape_applescript "$title")"
escaped_message="$(escape_applescript "$message")"
if [[ -n "$sound" ]]; then
escaped_sound="$(escape_applescript "$sound")"
- osascript -e "display notification \"$escaped_message\" with title \"$escaped_title\" sound name \"$escaped_sound\"" >/dev/null 2>&1 || true
+ if osascript -e "display notification \"$escaped_message\" with title \"$escaped_title\" sound name \"$escaped_sound\"" >/dev/null 2>&1; then
+ exit 0
+ fi
else
- osascript -e "display notification \"$escaped_message\" with title \"$escaped_title\"" >/dev/null 2>&1 || true
+ if osascript -e "display notification \"$escaped_message\" with title \"$escaped_title\"" >/dev/null 2>&1; then
+ exit 0
+ fi
fi
-
- exit 0
fi
if command -v notify-send >/dev/null 2>&1; then
- notify-send "$title" "$message" >/dev/null 2>&1 || true
- exit 0
+ if notify-send "$title" "$message" >/dev/null 2>&1; then
+ exit 0
+ fi
fi
if command -v terminal-notifier >/dev/null 2>&1; then
- terminal-notifier -title "$title" -message "$message" >/dev/null 2>&1 || true
- exit 0
+ terminal-notifier -title "$title" -message "$message" >/dev/null 2>&1 || true
fi🤖 Prompt for AI Agents |
||
|
|
||
| exit 0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| @dconf@ write /org/gnome/desktop/interface/color-scheme "'prefer-dark'" | ||
| @dconf@ write /org/gnome/desktop/interface/gtk-theme "'Adwaita-dark'" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { pkgs, ... }: | ||
| let | ||
| inherit (pkgs) lib; | ||
| dconf = "${pkgs.dconf}/bin/dconf"; | ||
| readScript = file: builtins.replaceStrings [ "@dconf@" ] [ dconf ] (builtins.readFile file); | ||
| in | ||
| { | ||
| services.darkman = lib.mkIf pkgs.stdenv.isLinux { | ||
|
||
| enable = true; | ||
| settings = { | ||
| usegeoclue = true; | ||
| }; | ||
| darkModeScripts = { | ||
| gtk-theme = readScript ./dark-mode.sh; | ||
| }; | ||
| lightModeScripts = { | ||
| gtk-theme = readScript ./light-mode.sh; | ||
| }; | ||
|
Comment on lines
+13
to
+18
|
||
| }; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| @dconf@ write /org/gnome/desktop/interface/color-scheme "'prefer-light'" | ||
| @dconf@ write /org/gnome/desktop/interface/gtk-theme "'Adwaita'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using theme filenames with spaces and building the
sourcepath via string concatenation is fragile in Nix/Home Manager (spaces can cause awkward store name/path handling, and string-vs-path coercion can be surprising). Consider renaming the theme files to space-free names (e.g.,Dracula-Custom,Catppuccin-Latte-Custom) and referencing them as proper Nix paths sosourceis unambiguously a path.