From dbd98d0b47a3eb21fcb6acb16851809e92d58633 Mon Sep 17 00:00:00 2001 From: Joseph Montanaro Date: Mon, 8 Sep 2025 21:37:53 -0400 Subject: [PATCH] docker configs and modified screenshot script --- .../bin/executable_docker-credential-creddy | 3 ++ dot_local/bin/executable_freezeshot | 32 +++++++++++++++++++ dot_local/bin/executable_install-packages | 6 +++- dot_local/bin/executable_new-workspace | 8 ++--- private_dot_docker/config.json | 3 ++ 5 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 dot_local/bin/executable_docker-credential-creddy create mode 100644 dot_local/bin/executable_freezeshot create mode 100644 private_dot_docker/config.json diff --git a/dot_local/bin/executable_docker-credential-creddy b/dot_local/bin/executable_docker-credential-creddy new file mode 100644 index 0000000..547e59e --- /dev/null +++ b/dot_local/bin/executable_docker-credential-creddy @@ -0,0 +1,3 @@ +#!/usr/bin/bash + +creddy docker $@ diff --git a/dot_local/bin/executable_freezeshot b/dot_local/bin/executable_freezeshot new file mode 100644 index 0000000..67572dc --- /dev/null +++ b/dot_local/bin/executable_freezeshot @@ -0,0 +1,32 @@ +#!/bin/bash + +# adapted from ~/.local/share/omarchy/bin/omarchy-cmd-screenshot + +[[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs +OUTPUT_DIR="${OMARCHY_SCREENSHOT_DIR:-${XDG_PICTURES_DIR:-$HOME/Pictures}}" + +if [[ ! -d "$OUTPUT_DIR" ]]; then + notify-send "Screenshot directory does not exist: $OUTPUT_DIR" -u critical -t 3000 + exit 1 +fi + +# if we are in the process of screenshotting, cancel that and exit +pkill slurp && exit 0 + +# freeze display(s) +wayfreeze & +sleep 0.1 + +# use process substitution to send to satty rather than piping so that we can kill wayfreeze as soon as hyprshot finishes +hyprshot -m ${1:-region} --raw > >( + satty --filename - \ + --output-filename "$output_dir/screenshot-$(date +'%y-%m-%d_%h-%m-%s').png" \ + --early-exit \ + --actions-on-enter save-to-clipboard \ + --save-after-copy \ + --copy-command 'wl-copy' +) & + +wait $(jobs -p %hyprshot) +kill $(jobs -p %wayfreeze) +# satty is still running at this point, but we don't particularly care diff --git a/dot_local/bin/executable_install-packages b/dot_local/bin/executable_install-packages index 9bfba16..2e428c5 100644 --- a/dot_local/bin/executable_install-packages +++ b/dot_local/bin/executable_install-packages @@ -2,5 +2,9 @@ sudo pacman -U https://git.jfmonty2.com/jfmonty2/creddy/releases/download/v0.6.5/creddy-0.6.5-1-x86_64.pkg.tar.zst sudo pacman -S unixodbc +sudo pacman -S vulkan-radeon +sudo pacman -R amdvlk -yay aur/msodbcsql17 +yay msodbcsql17 +yay wayfreeze-git +yay heynote-bin diff --git a/dot_local/bin/executable_new-workspace b/dot_local/bin/executable_new-workspace index 3d04658..b8eb539 100644 --- a/dot_local/bin/executable_new-workspace +++ b/dot_local/bin/executable_new-workspace @@ -1,7 +1,7 @@ #!/usr/bin/bash -# current highest-numbered workspace -MAX_WORKSPACE=$(hyprctl workspaces -j | jq 'sort_by(.id) | reverse | .[0].id') - -hyprctl dispatch workspace $(($MAX_WORKSPACE + 1)) +# generate ids from 1-100, remove the ids of existing workspaces, take the +# first of the remaining numbers and you have the first available workspace id +FIRST_AVAILABLE=$(hyprctl workspaces -j | jq '[range(1; 100)] - map(.id) | .[0]') +hyprctl dispatch workspace $FIRST_AVAILABLE diff --git a/private_dot_docker/config.json b/private_dot_docker/config.json new file mode 100644 index 0000000..89d8ec7 --- /dev/null +++ b/private_dot_docker/config.json @@ -0,0 +1,3 @@ +{ + "credsStore": "creddy" +}