diff options
author | jjanzen <jjanzen@jjanzen.ca> | 2025-01-08 17:24:21 -0600 |
---|---|---|
committer | jjanzen <jjanzen@jjanzen.ca> | 2025-01-08 17:24:21 -0600 |
commit | a75b69b88f967e6271d75a1bc122da0b2e4eeece (patch) | |
tree | 20b7fb1bec30f68e61846c45a481bee174f4af9f /macos.local/.flake/home/scripts | |
parent | a1cbc273fb92c69ea1b8534f6ef6064b5da40e31 (diff) |
system changes
Diffstat (limited to 'macos.local/.flake/home/scripts')
7 files changed, 37 insertions, 80 deletions
diff --git a/macos.local/.flake/home/scripts/core.nix.org b/macos.local/.flake/home/scripts/core.nix.org index 53f05db..bf5f685 100644 --- a/macos.local/.flake/home/scripts/core.nix.org +++ b/macos.local/.flake/home/scripts/core.nix.org @@ -5,10 +5,19 @@ Import various scripts useful on my system. { config, pkgs, ... }: { - imports = [ - ./deploy-website.nix - ./launcher.nix - ./remove-quarantine.nix - ]; + home.file = { + "./.local/bin/deploy-website" = { + executable = true; + source = ./deploy-website; + }; + "./local/bin/launcher" = { + executable = true; + source = ./launcher; + }; + "./local/bin/remove-quarantine" = { + executable = true; + source = ./remove-quarantine; + }; + }; } #+end_src diff --git a/macos.local/.flake/home/scripts/deploy-website.nix.org b/macos.local/.flake/home/scripts/deploy-website.nix.org deleted file mode 100644 index f1d1d10..0000000 --- a/macos.local/.flake/home/scripts/deploy-website.nix.org +++ /dev/null @@ -1,25 +0,0 @@ -#+title: Website Deploy Script - -Deploy my website from a specified branch. -#+begin_src nix - { config, pkgs, ... }: - - { - home.file."./.local/bin/deploy-website" = { - executable = true; - text = '' -#+end_src - -=ssh= into my server and run the deploy script, passing command line arguments to the script. -#+begin_src sh - #!/bin/sh - /usr/bin/ssh jjanzen.ca "sudo /usr/local/bin/deploy.sh "$@"" -#+end_src - - -Close the block. -#+begin_src nix - ''; - }; - } -#+end_src diff --git a/macos.local/.flake/home/scripts/deploy-website.org b/macos.local/.flake/home/scripts/deploy-website.org new file mode 100644 index 0000000..76e5d54 --- /dev/null +++ b/macos.local/.flake/home/scripts/deploy-website.org @@ -0,0 +1,7 @@ +#+title: Website Deploy Script + +Deploy my website from a specified branch by using =ssh= to get into my server and running the deploy script, passing command line arguments to the script. +#+begin_src sh + #!/bin/sh + /usr/bin/ssh jjanzen.ca "sudo /usr/local/bin/deploy.sh "$@"" +#+end_src diff --git a/macos.local/.flake/home/scripts/launcher.nix.org b/macos.local/.flake/home/scripts/launcher.nix.org deleted file mode 100644 index b9debc7..0000000 --- a/macos.local/.flake/home/scripts/launcher.nix.org +++ /dev/null @@ -1,26 +0,0 @@ -#+title: Launcher Script - -Use =choose-gui= to launch an application. This is used for an =skhd= keyboard command to launch applications. -#+begin_src nix - { config, pkgs, ... }: - - { - home.file."./.local/bin/launcher" = { - executable = true; - text = '' -#+end_src - -Find an app with =choose-gui= and open it. -#+begin_src sh - #!/bin/sh - app="$(ls /Applications/ /Applications/Utilities/ /System/Applications/ /System/Applications/Utilities/ ~/Applications/ | grep '\.app$' | sed 's/\.app$//g' | choose -f "SauceCodePro Nerd Font" -s 15 -b ece0c9).app" - - open -n "$HOME/Applications/$app" || open -n "/Applications/$app" || open -n "/System/Applications/Utilities/$app" || open -n "/System/Applications/$app" || open -n "/Applications/Utilities/$app" -#+end_src - -Close the block. -#+begin_src nix - ''; - }; - } -#+end_src diff --git a/macos.local/.flake/home/scripts/launcher.org b/macos.local/.flake/home/scripts/launcher.org new file mode 100644 index 0000000..3ef221d --- /dev/null +++ b/macos.local/.flake/home/scripts/launcher.org @@ -0,0 +1,9 @@ +#+title: Launcher Script + +Use =choose-gui= to launch an application. This is used for a keyboard command to launch applications. +#+begin_src sh + #!/bin/sh + app="$(ls /Applications/ /Applications/Utilities/ /System/Applications/ /System/Applications/Utilities/ ~/Applications/ | grep '\.app$' | sed 's/\.app$//g' | choose -f "SauceCodePro Nerd Font" -s 15 -b ece0c9).app" + + open -n "$HOME/Applications/$app" || open -n "/Applications/$app" || open -n "/System/Applications/Utilities/$app" || open -n "/System/Applications/$app" || open -n "/Applications/Utilities/$app" +#+end_src diff --git a/macos.local/.flake/home/scripts/remove-quarantine.nix.org b/macos.local/.flake/home/scripts/remove-quarantine.nix.org deleted file mode 100644 index fa8d882..0000000 --- a/macos.local/.flake/home/scripts/remove-quarantine.nix.org +++ /dev/null @@ -1,24 +0,0 @@ -#+title: Remove Quarantine - -macOS likes putting applications in quarantine without me wanting. This script removes an application from the quarantine. -#+begin_src nix - { config, pkgs, ... }: - - { - home.file."./.local/bin/remove-quarantine" = { - executable = true; - text = '' -#+end_src - -Remove the app from quarantine by recursively deleting the quarantine attribute on the application. -#+begin_src sh - #!/bin/sh - /usr/bin/xattr -dr com.apple.quarantine "$@" -#+end_src - -Close the block. -#+begin_src nix - ''; - }; - } -#+end_src diff --git a/macos.local/.flake/home/scripts/remove-quarantine.org b/macos.local/.flake/home/scripts/remove-quarantine.org new file mode 100644 index 0000000..373c503 --- /dev/null +++ b/macos.local/.flake/home/scripts/remove-quarantine.org @@ -0,0 +1,7 @@ +#+title: Remove Quarantine + +macOS likes putting applications in quarantine without me wanting. This script removes an application from the quarantine. Remove the app from quarantine by recursively deleting the quarantine attribute on the application. +#+begin_src sh + #!/bin/sh + /usr/bin/xattr -dr com.apple.quarantine "$@" +#+end_src |