revamp
This commit is contained in:
parent
b066611b84
commit
5434c70be2
34 changed files with 123 additions and 448 deletions
1
X11/.gitignore
vendored
1
X11/.gitignore
vendored
|
|
@ -1 +0,0 @@
|
|||
xinitrc.*
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
#STATUS_BLOCKS="tray vol mic net bat kbd time date" dwmstatus &
|
||||
#dbus-update-activation-environment --systemd --all
|
||||
#systemctl --user import-environment DISPLAY
|
||||
xset r rate 300 70
|
||||
setxkbmap en
|
||||
#clipmenud &
|
||||
#dunst
|
||||
#picom --experimental-backends --animation-for-open-window=zoom &
|
||||
#emacs --daemon &
|
||||
#xrandr --output DVI-D-0 --right-of HDMI-0
|
||||
xsetroot -solid '#1e2326'
|
||||
|
||||
clear
|
||||
sleep 0.2
|
||||
|
|
@ -32,11 +32,11 @@ set $up k
|
|||
set $right l
|
||||
# -
|
||||
set $term alacritty
|
||||
set $menu ~/.config/scripts/menu/menu run "Run:"
|
||||
set $menu exec $(~/.config/scripts/menu/menu run "Run:")
|
||||
set $menu-input ~/.config/scripts/menu/menu-input
|
||||
set $menu-output ~/.config/scripts/menu/menu-output
|
||||
set $passmgr alacritty
|
||||
set $passotp alacritty
|
||||
set $passmgr ~/.config/scripts/dwm/dwmpass
|
||||
set $passotp ~/.config/scripts/dwm/dwmotp
|
||||
set $filemgr thunar
|
||||
set $browser firefox
|
||||
# -
|
||||
|
|
@ -122,7 +122,7 @@ font pango:JetBrainsMono Medium 8
|
|||
bar {
|
||||
position bottom
|
||||
font pango:JetBrainsMono Medium 8
|
||||
status_command ~/.config/scripts/sway/swaystatus
|
||||
status_command ~/.config/scripts/i3/i3status
|
||||
tray_padding 4
|
||||
|
||||
colors {
|
||||
|
|
|
|||
14
packages/flatpak/install-flatpak-list.sh
Executable file
14
packages/flatpak/install-flatpak-list.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
EXPORTS_BIN_PREFIX="$HOME/.local/bin"
|
||||
FLATPAK_BIN_PREFIX="/var/lib/flatpak/exports/bin"
|
||||
FLATPAK_LIST="$XDG_CONFIG_HOME"/packages/flatpak/list.yml
|
||||
|
||||
while read line; do
|
||||
bin="${line%%:*}"
|
||||
app="${line##*:}"
|
||||
app="${app##* }"
|
||||
ln -sf "$FLATPAK_BIN_PREFIX"/"$app" "$EXPORTS_BIN_PREFIX"/"$bin"
|
||||
app_list="$app_list $app"
|
||||
done < "$FLATPAK_LIST"
|
||||
|
||||
flatpak install -y $app_list
|
||||
11
packages/flatpak/list.yml
Normal file
11
packages/flatpak/list.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
dolphin: org.kde.dolphin
|
||||
firefox: org.mozilla.firefox
|
||||
gimp: org.gimp.GIMP
|
||||
vscodium: com.vscodium.codium
|
||||
kdenlive: org.kde.kdenlive
|
||||
krita: org.kde.krita
|
||||
inkscape: org.inkscape.Inkscape
|
||||
rnote: com.github.flxzt.rnote
|
||||
kalgebra: org.kde.kalgebra
|
||||
steam: com.valvesoftware.Steam
|
||||
flatseal: com.github.tchx84.Flatseal
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
PKG_LIST="${PKG_LIST:-$XDG_CONFIG_HOME/apt/packages}"
|
||||
PKG_LIST="${PKG_LIST:-$XDG_CONFIG_HOME/packages/system/apt/list}"
|
||||
|
||||
if ! [ -f "$PKG_LIST" ]; then
|
||||
echo "No package list found at PKG_LIST=$PKG_LIST"
|
||||
0
packages/apt/nvidia-proprietary.sh → packages/system/apt/install-nvidia-proprietary.sh
Normal file → Executable file
0
packages/apt/nvidia-proprietary.sh → packages/system/apt/install-nvidia-proprietary.sh
Normal file → Executable file
|
|
@ -1,11 +1,23 @@
|
|||
# Axiom default packages
|
||||
|
||||
# System
|
||||
xdg-desktop-portal
|
||||
lxpolkit
|
||||
udisks2
|
||||
gnome-disk-utility
|
||||
|
||||
# Shared
|
||||
fonts-jetbrains-mono
|
||||
|
||||
# Window Manager
|
||||
xorg
|
||||
i3-wm
|
||||
xdg-desktop-portal-gtk
|
||||
alacritty
|
||||
bemenu
|
||||
libbemenu-curses
|
||||
libbemenu-wayland
|
||||
libbemenu-x11
|
||||
suckless-tools
|
||||
|
||||
# Audio
|
||||
|
|
@ -36,6 +48,12 @@ ripgrep
|
|||
pass
|
||||
pass-otp
|
||||
zbar-tools
|
||||
trash-cli
|
||||
xdotool
|
||||
unzip
|
||||
|
||||
# Appearance
|
||||
gnome-themes-extra
|
||||
|
||||
# Dev
|
||||
build-essential
|
||||
|
|
@ -44,4 +62,4 @@ lazygit
|
|||
|
||||
# Extra
|
||||
flatpak
|
||||
xdg-desktop-portal
|
||||
steam-devices
|
||||
45
scripts/i3/i3status
Executable file
45
scripts/i3/i3status
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
once="$1"
|
||||
separator=" "
|
||||
|
||||
while true ; do
|
||||
status=""
|
||||
|
||||
#todo="$(get_todo)"
|
||||
! [ -z "$todo" ] && status="$status$separator$todo"
|
||||
|
||||
#apts="$(get_apts)"
|
||||
! [ -z "$apts" ] && status="$status$separator$apts"
|
||||
|
||||
volume="$(volstat)"
|
||||
! [ -z "$volume" ] && status="$status$separator$volume"
|
||||
|
||||
microphone="$(micstat)"
|
||||
! [ -z "$microphone" ] && status="$status$separator$microphone"
|
||||
|
||||
cpu="$(cpustat)"
|
||||
! [ -z "$cpu" ] && status="$status$separator $cpu"
|
||||
|
||||
ram="$(memorystat)"
|
||||
! [ -z "$ram" ] && status="$status$separator $ram"
|
||||
|
||||
network="$(netstat)"
|
||||
! [ -z "$network" ] && status="$status$separator$network"
|
||||
|
||||
battery="$(batstat)"
|
||||
! [ -z "$battery" ] && status="$status$separator$battery"
|
||||
|
||||
layout="$(layoutstat)"
|
||||
! [ -z "$layout" ] && status="$status$separator $layout"
|
||||
|
||||
date_time="$(date "+%I:%M%p$separator %a %Y-%m-%d")"
|
||||
! [ -z "$date_time" ] && status="$status$separator $date_time"
|
||||
|
||||
printf "%s\n" "$status"
|
||||
|
||||
if [ -n "$once" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
sleep 0.4
|
||||
done
|
||||
|
|
@ -3,7 +3,7 @@ MENU_BACKEND="${MENU_BACKEND:-menu_bemenu}"
|
|||
|
||||
# Configuration
|
||||
font="JetbrainsMono"
|
||||
font_size="10"
|
||||
font_size="11"
|
||||
col_white="#ebdbb2" # White
|
||||
col_nb="#1e2326" # Normal background
|
||||
col_nf="#374145" # Normal foreground
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
input=$(pactl list short sources | cut -f 2 | grep input | menu "dmenu" "Input:")
|
||||
|
||||
# Set audio device, notify command success
|
||||
pactl set-default-source "$input" && notify-send -r 11 " Default Input" "Set to '$input'" || notify-send -r 11 " Default Input" "Didn't change"
|
||||
pactl set-default-source "$input"
|
||||
|
||||
# Reload statusbar volume module (dwm & dwmblocks)
|
||||
if pidof dwmblocks >/dev/null; then
|
||||
kill -45 "$(pidof dwmblocks)"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -2,10 +2,12 @@
|
|||
# Set default output device
|
||||
|
||||
# Get proper name from sinks
|
||||
output=$(pactl list short sinks | cut -f 2 | menu "Output:")
|
||||
output=$(pactl list short sinks | cut -f 2 | menu "dmenu" "Output:")
|
||||
|
||||
# Set audio device, notify command success
|
||||
pactl set-default-sink "$output" && notify-send -r 10 " Default Output" "Set to '$output'" || notify-send -r 10 " Default Output" "Didn't change"
|
||||
pactl set-default-sink "$output"
|
||||
|
||||
# Reload statusbar module (dwm & dwmblocks)
|
||||
if pidof dwmblocks >/dev/null; then
|
||||
kill -44 "$(pidof dwmblocks)"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# Prompt for power options using dmenu
|
||||
|
||||
option=$(printf "Shutdown\nRestart\nLog out" | ~/.config/scripts/menu/menu "Power:")
|
||||
option=$(printf "Shutdown\nRestart\nLog out" | ~/.config/scripts/menu/menu "dmenu" "Power:")
|
||||
|
||||
_logout() {
|
||||
if ps -a | grep -q 'tty1.*xinit' ; then
|
||||
|
|
|
|||
11
scripts/setup/setup-nerd-font
Executable file
11
scripts/setup/setup-nerd-font
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
RELEASE_URL="https://github.com/ryanoasis/nerd-fonts/releases/latest/download"
|
||||
FONTS_PREFIX="/usr/local/share/fonts"
|
||||
NERD_FONT="${NERD_FONT:-JetBrainsMono}"
|
||||
|
||||
_out_dir="$FONTS_PREFIX"/"$NERD_FONT"
|
||||
_archive="$_out_dir"/"$NERD_FONT".tar.xz
|
||||
|
||||
sudo mkdir -p "$_out_dir"
|
||||
sudo curl -L "$RELEASE_URL"/"$NERD_FONT".tar.xz -o "$_archive"
|
||||
sudo tar xvf "$_archive" -C "$_out_dir"
|
||||
3
scripts/setup/setup-x11-confs
Executable file
3
scripts/setup/setup-x11-confs
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
sudo cp "$XDG_CONFIG_HOME"/X11/*.conf /etc/X11/xorg.conf.d/
|
||||
|
|
@ -7,8 +7,8 @@ if [ "$(tty)" = "/dev/tty1" ] ; then
|
|||
## DWM
|
||||
#sleep 0.5
|
||||
#amixer &
|
||||
#XDG_SESSION_TYPE=x11 GDK_BACKEND=x11 exec startx
|
||||
XDG_SESSION_TYPE=x11 GDK_BACKEND=x11 exec startx
|
||||
|
||||
## SWAY
|
||||
exec sway
|
||||
#exec sway
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#export GTK_THEME="Adwaita-dark"
|
||||
#export XCURSOR_THEME="Adwaita"
|
||||
#export QT_QPA_PLATFORMTHEME="qt5ct"
|
||||
export CM_SELECTIONS="clipboard"
|
||||
export CM_MAX_CLIPS=10
|
||||
#export CM_SELECTIONS="clipboard"
|
||||
#export CM_MAX_CLIPS=10
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
HOME=$HOME/.local/share/brave
|
||||
mkdir -p "$HOME"
|
||||
|
||||
[ -e /usr/bin/brave ] && bin="/usr/bin/brave"
|
||||
[ -e /usr/bin/brave-browser ] && bin="/usr/bin/brave-browser"
|
||||
|
||||
exec "$bin" "$@"
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
BRUNO_PATH="$HOME/.local/share/bruno"
|
||||
|
||||
INSTALLED=
|
||||
for v in "$BRUNO_PATH"/*.AppImage ; do
|
||||
if [ -f "$v" ] && [ -x "$v" ] ; then
|
||||
INSTALLED="${v##*/}"
|
||||
fi
|
||||
unset v
|
||||
done
|
||||
|
||||
if [ -z "$INSTALLED" ] ; then
|
||||
echo "Installing bruno..."
|
||||
|
||||
if ! [ -d "$BRUNO_PATH" ] ; then
|
||||
mkdir -p "$BRUNO_PATH"
|
||||
fi
|
||||
|
||||
LATEST="$(curl -s https://api.github.com/repos/usebruno/bruno/releases/latest |
|
||||
grep '"name":.*\.AppImage' | cut -d'"' -f 4)"
|
||||
|
||||
if ! curl -L --progress-bar -o "$BRUNO_PATH/$LATEST" \
|
||||
https://github.com/usebruno/bruno/releases/latest/download/"$LATEST" ; then
|
||||
echo "Error installing bruno"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
chmod +x "$BRUNO_PATH/$LATEST"
|
||||
|
||||
INSTALLED="$LATEST"
|
||||
fi
|
||||
|
||||
exec "$BRUNO_PATH/$INSTALLED"
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
HOME=$HOME/.local/share/chromium
|
||||
mkdir -p "$HOME"
|
||||
exec /usr/bin/chromium "$@"
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
VIMINIT="source $HOME/.config/cvim/vimrc" vim $@
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
emacsclient -c -a 'emacs' $@
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
HOME=$HOME/.local/share/mozilla
|
||||
mkdir -p "$HOME"
|
||||
|
||||
exec /usr/bin/firefox -P default "$@"
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
HOME=$HOME/.local/share/mozilla
|
||||
mkdir -p "$HOME"
|
||||
|
||||
exec /usr/bin/firefox -P dev "$@"
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
HOME=$HOME/.local/share/mozilla
|
||||
mkdir -p "$HOME"
|
||||
|
||||
exec /usr/bin/firefox -P edu "$@"
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
HOME=$HOME/.local/share/mozilla
|
||||
mkdir -p "$HOME"
|
||||
|
||||
exec /usr/bin/firefox -P finance "$@"
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
HOME=$HOME/.local/share/mozilla
|
||||
mkdir -p "$HOME"
|
||||
|
||||
exec /usr/bin/firefox -P hardened "$@"
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
HOME=$HOME/.local/share/mozilla
|
||||
mkdir -p "$HOME"
|
||||
|
||||
exec /usr/bin/firefox -P personal "$@"
|
||||
234
wrappers/hugo
234
wrappers/hugo
|
|
@ -1,234 +0,0 @@
|
|||
#!/bin/sh
|
||||
HUGO_GITHUB="https://github.com/gohugoio/hugo"
|
||||
HUGO_DIR_PREFIX="${XDG_DATA_HOME:=$HOME/.local/share}"
|
||||
HUGO_DIR="${HUGO_DIR:=$HUGO_DIR_PREFIX/hugo}"
|
||||
|
||||
_prompt() {
|
||||
printf "[HUGO MANAGER] \033[34m%s\033[0m \033[1m[y/n]:\033[0m " "$1"
|
||||
read -r opt
|
||||
|
||||
case "$opt" in
|
||||
[Yy]) return 0;;
|
||||
[Nn]) return 1;;
|
||||
*) return 1;;
|
||||
esac
|
||||
}
|
||||
|
||||
_msg() {
|
||||
printf "[HUGO MANAGER] \033[0m%s\033[0m\n" "$1"
|
||||
}
|
||||
|
||||
_error() {
|
||||
printf "[HUGO MANAGER] \033[31merror: %s\033[0m\n" "$1"
|
||||
}
|
||||
|
||||
# Check if $HUGO_DIR exists, if it doesn't, create it.
|
||||
# If there is an error, return 1.
|
||||
_hugo_dir_check() {
|
||||
if ! [ -d "$HUGO_DIR" ]; then
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Cleans $HUGO_DIR
|
||||
_clean_hugo_versions() {
|
||||
if [ -d "$HUGO_DIR" ]; then
|
||||
rm -rf "${HUGO_DIR:?}"/*
|
||||
fi
|
||||
}
|
||||
|
||||
# Echoes list of hugo versions.
|
||||
_list_hugo_versions() {
|
||||
preferred="$1"
|
||||
|
||||
for v in "$HUGO_DIR"/*; do
|
||||
if [ -d "$v" ]; then
|
||||
version="${v##*hugo-}"
|
||||
|
||||
if [ "$preferred" = "$version" ]; then
|
||||
echo "$version*"
|
||||
else
|
||||
echo "$version"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Echoes latest installed hugo version. e.g. 25.5.31
|
||||
# If there is an error, return 1.
|
||||
_latest_local() {
|
||||
versions="$(_list_hugo_versions)"
|
||||
for v in $versions ; do
|
||||
latest_local="$v"
|
||||
done
|
||||
|
||||
echo "$latest_local"
|
||||
}
|
||||
|
||||
# Sets the preferred hugo version
|
||||
# If there is an error, return 1.
|
||||
_set_preferred_version() {
|
||||
version="$1"
|
||||
|
||||
if [ -z "$version" ]; then
|
||||
_error "provide a version to set. e.g. 25.5.31"
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "$version" > "$HUGO_DIR"/hugo_version
|
||||
}
|
||||
|
||||
# Echoes current set hugo version. e.g. 25.5.31
|
||||
# If there is an error, return 1.
|
||||
_current_local() {
|
||||
if [ -f "$HUGO_DIR"/hugo_version ]; then
|
||||
cat "$HUGO_DIR"/hugo_version
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Get the latest installed hugo binary path.
|
||||
# If there is a problem with the binary, return 1.
|
||||
_hugo_bin() {
|
||||
preferred="$1"
|
||||
|
||||
if [ -z "$preferred" ]; then
|
||||
preferred="$(_latest_local)"
|
||||
fi
|
||||
|
||||
bin="$HUGO_DIR/hugo-$preferred/hugo"
|
||||
|
||||
if [ -x "$bin" ]; then
|
||||
echo "$bin"
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Echoes the latest remote available hugo version. e.g. 25.5.31
|
||||
# If there is an error, return 1.
|
||||
_latest_remote() {
|
||||
# shellcheck disable=SC1083
|
||||
release_url="$(curl -Ls -o /dev/null -w %{url_effective} "$HUGO_GITHUB"/releases/latest)"
|
||||
if [ "$?" -eq 1 ]; then
|
||||
return 1
|
||||
fi
|
||||
echo "${release_url##*/v}"
|
||||
}
|
||||
|
||||
# Downloads a given hugo version. e.g. _download_hugo 25.5.31
|
||||
# If there is an error, return 1.
|
||||
_download_hugo() {
|
||||
version="$1"
|
||||
if [ -z "$version" ]; then
|
||||
_error "provide a version to download. e.g. 25.5.31 or latest"
|
||||
return 1
|
||||
fi
|
||||
|
||||
case "$version" in
|
||||
latest) version="$(_latest_remote)"
|
||||
if [ "$?" -eq 1 ]; then
|
||||
_error "failed get latest"
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
target_dir="$HUGO_DIR/hugo-$version"
|
||||
target="$target_dir/hugo-$version.tar.gz"
|
||||
download_url="$HUGO_GITHUB/releases/download/v$version/hugo_${version}_linux-amd64.tar.gz"
|
||||
|
||||
mkdir -p "$target_dir"
|
||||
|
||||
curl -sLo "$target" "$download_url"
|
||||
if [ "$?" -eq 1 ]; then
|
||||
_error "failed to download"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! [ -f "$target" ]; then
|
||||
_error "failed to download"
|
||||
return 1
|
||||
fi
|
||||
|
||||
tar -C "$target_dir" -xf "$target" >/dev/null
|
||||
if [ "$?" -eq 1 ]; then
|
||||
_error "failed to extract"
|
||||
return 1
|
||||
fi
|
||||
|
||||
_set_preferred_version "$version"
|
||||
rm -f "$target"
|
||||
}
|
||||
|
||||
# Updates to latest remote available version.
|
||||
# If there is an error, return 1.
|
||||
_update_hugo() {
|
||||
latest_remote="$(_latest_remote)"
|
||||
if [ "$?" -eq 1 ]; then
|
||||
_error "failed to look up latest version"
|
||||
return 1
|
||||
fi
|
||||
|
||||
latest_local="$(_latest_local)"
|
||||
if [ "$?" -eq 1 ]; then
|
||||
_error "failed to look up local version"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ "$latest_local" != "$latest_remote" ]; then
|
||||
_msg "updating hugo ${latest_local:-none} -> $latest_remote..."
|
||||
_download_hugo "$latest_remote"
|
||||
if [ "$?" -eq 1 ]; then
|
||||
_error "failed installation"
|
||||
return 1
|
||||
fi
|
||||
_set_preferred_version "$latest_remote"
|
||||
else
|
||||
_msg "already up-to-date"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -d "$HUGO_DIR" ]; then
|
||||
HUGO_BIN="$(_hugo_bin "$(_current_local)")"
|
||||
if [ "$?" -eq 1 ] && [ "$1" != "--manager-download" ] ; then
|
||||
_prompt "no version of hugo installed, download latest?"
|
||||
|
||||
if [ "$?" -eq 1 ]; then
|
||||
_error "no version of hugo installed, download via '--manager-download x.x.x'"
|
||||
return 1
|
||||
fi
|
||||
|
||||
_download_hugo "latest"
|
||||
if [ "$?" -eq 1 ]; then
|
||||
_error "error downloading latest version"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2068
|
||||
case "$1" in
|
||||
--manager-update) _update_hugo ;;
|
||||
--manager-download) _download_hugo "$2" ;;
|
||||
--manager-list) _list_hugo_versions "$(_current_local)" ;;
|
||||
--manager-set) _set_preferred_version "$2" ;;
|
||||
--manager-clean) _clean_hugo_versions ;;
|
||||
*) $HUGO_BIN $@ ;;
|
||||
esac
|
||||
else
|
||||
_hugo_dir_check
|
||||
if [ "$?" -eq 1 ]; then
|
||||
_prompt "Installation directory '$HUGO_DIR' does not exist, create?"
|
||||
if [ "$?" -eq 1 ]; then
|
||||
return 1
|
||||
fi
|
||||
mkdir -p "$HUGO_DIR"
|
||||
fi
|
||||
|
||||
_prompt "hugo not installed, download latest?"
|
||||
if ! [ "$?" -eq 1 ]; then
|
||||
_update_hugo
|
||||
fi
|
||||
fi
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
PODMAN_NAME="PostgreSQL"
|
||||
PGSQL_IMAGE="docker.io/library/postgres"
|
||||
|
||||
: "${DB_HOST:=localhost}"
|
||||
: "${DB_PORT:=5455}"
|
||||
: "${DB_PASS:=1234}"
|
||||
: "${DB_USER:=postgres}"
|
||||
: "${DB_NAME:=local}"
|
||||
|
||||
if ! command -v podman >/dev/null 2>&1 ; then
|
||||
echo "podman not found in PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if command -v fuser >/dev/null 2>&1 ; then
|
||||
if fuser "$DB_PORT"/tcp >/dev/null 2>&1 ; then
|
||||
echo "Port already in use"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! podman run \
|
||||
--name "$PODMAN_NAME" \
|
||||
-p "$DB_PORT":5432 \
|
||||
-e POSTGRES_USER="$DB_USER" \
|
||||
-e POSTGRES_PASSWORD="$DB_PASS" \
|
||||
-e POSTGRES_DB="$DB_NAME" \
|
||||
--replace \
|
||||
-d \
|
||||
"$PGSQL_IMAGE" 1>&- ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "postgresql://$DB_USER:$DB_PASS@$DB_HOST:$DB_PORT/$DB_NAME?sslmode=disable"
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
PODMAN_NAME="PostgreSQL"
|
||||
|
||||
if ! podman stop "$PODMAN_NAME" 1>&- ; then
|
||||
echo "Failed to stop podman running postgres"
|
||||
fi
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
PGWEB="$HOME/.local/share/pgweb/pgweb_linux_amd64"
|
||||
|
||||
if ! [ -d "${PGWEB%/*}" ] ; then
|
||||
mkdir -p "${PGWEB%/*}"
|
||||
fi
|
||||
|
||||
LATEST="$(curl -s https://api.github.com/repos/sosedoff/pgweb/releases/latest |
|
||||
grep '"tag_name":' | cut -d'"' -f 4)"
|
||||
|
||||
INSTALLED="$($PGWEB --version | cut -d ' ' -f 2)"
|
||||
|
||||
if [ "$INSTALLED" != "$LATEST" ] ; then
|
||||
opt="$(printf 'Yes\nNo\n' | menu "Newer pgweb version available, update?")"
|
||||
|
||||
if [ "$opt" = "Yes" ] ; then
|
||||
echo "Updating pgweb..."
|
||||
|
||||
if ! curl -L --progress-bar -o "$PGWEB.zip" \
|
||||
https://github.com/sosedoff/pgweb/releases/latest/download/pgweb_linux_amd64.zip ; then
|
||||
echo "Error updating pgweb"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
(cd "${PGWEB%/*}" && unzip "$PGWEB.zip")
|
||||
|
||||
chmod +x "$PGWEB"
|
||||
fi
|
||||
unset opt
|
||||
fi
|
||||
|
||||
exec $PGWEB
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
HOME=$HOME/.local/share/Steam/xdgspec
|
||||
mkdir -p "$HOME"
|
||||
|
||||
[ -e "/usr/bin/steam" ] && exec /usr/bin/steam "$@"
|
||||
[ -e "/usr/games/steam" ] && exec /usr/games/steam "$@"
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
WA_URL="https://web.whatsapp.com"
|
||||
|
||||
phone_number="$(printf '' | menu "Phone (+506):")"
|
||||
|
||||
firefox-personal "$WA_URL/send/?phone=%%2B506$phone_number&text&type=phone_number&app_absent=0"
|
||||
Loading…
Reference in a new issue