Skip to content

Commit

Permalink
Added flameshot to Ubuntu and MacOS
Browse files Browse the repository at this point in the history
Added `detect-secrets` to `default-python-packages`
  • Loading branch information
missingcharacter committed Sep 3, 2024
1 parent 32c1fcc commit 7bc3974
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions MacOS/post-install
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ function are_cask_basics_installed() {
declare -a BREW_CASK_BASICS=('1password'
'alfred'
'firefox'
'flameshot'
'font-hack-nerd-font'
'font-jetbrains-mono'
'google-chrome'
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Keep key configurations and share them among your computers
- [oh-my-posh](https://ohmyposh.dev)
- [bfg](https://rtyley.github.io/bfg-repo-cleaner/)
- [docker](https://docs.docker.com/install/)
- [flameshot](https://github.com/flameshot-org/flameshot)
- [fpp](https://github.com/facebook/PathPicker)
- [gawk](https://www.gnu.org/software/gawk/)
- [git-filter-repo](https://github.com/newren/git-filter-repo)
Expand Down
4 changes: 3 additions & 1 deletion Ubuntu/post-install
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,16 @@ function install_desktop_apps() {
done

echo "Installing Google Chrome Stable, Slack"
local latest_slack
local latest_slack latest_flameshot
latest_slack="$(get_deb_url_from_xpath 'https://slack.com/downloads/instructions/linux?ddl=1&build=deb' 'string(/html/body/main/section[1]/iframe/@src)')"
latest_flameshot="$(get_latest_github_tag 'flameshot-org' 'flameshot' 'true')"
declare -A deb_packages=(
['1password']='https://downloads.1password.com/linux/debian/amd64/stable/1password-latest.deb' # pragma: allowlist secret
['google-chrome-stable']='https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb'
['slack']="${latest_slack}"
['nala']='https://deb.volian.org/volian/pool/main/v/volian-archive/volian-archive-nala_0.3.1_all.deb'
['volian-keyring']='https://deb.volian.org/volian/pool/main/v/volian-archive/volian-archive-keyring_0.3.1_all.deb'
['flameshot']="https://github.com/flameshot-org/flameshot/releases/download/v${latest_flameshot}/flameshot-${latest_flameshot}-1.ubuntu-22.04.amd64.deb"
)

for key in "${!deb_packages[@]}"; do
Expand Down
1 change: 1 addition & 0 deletions default-python-packages
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ pre-commit
pynvim
uv
ruff
detect-secrets
13 changes: 13 additions & 0 deletions lib/utils
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,19 @@ function get_brew_location() {
esac
}

function get_latest_github_tag() {
local owner="${1}"
local repo="${2}"
local remove_v="${3:-false}"
local latest_tag
latest_tag="$(curl -s "https://api.github.com/repos/${owner}/${repo}/releases/latest" | jq -r .tag_name)"
if [[ "${remove_v}" == 'true' ]]; then
echo -n "${latest_tag}" | tr -d 'v'
return 0
fi
echo -n "${latest_tag}"
}

function source_asdf() {
disableStrictMode
# shellcheck disable=SC1091
Expand Down

0 comments on commit 7bc3974

Please sign in to comment.