mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-15 14:42:37 +00:00
Compare commits
19 Commits
047c241df8
...
arch
| Author | SHA1 | Date | |
|---|---|---|---|
|
5d6cb3a843
|
|||
|
5561f3ccaf
|
|||
|
3a82ae15df
|
|||
|
d26ca008c0
|
|||
|
d29876b367
|
|||
|
24440f845b
|
|||
|
4a08de9573
|
|||
|
b1c3b16cc6
|
|||
|
b159565288
|
|||
|
df876d2cac
|
|||
|
e052f0c394
|
|||
|
0d916fe960
|
|||
|
1b504cca65
|
|||
|
fb0e4d705b
|
|||
|
b9f248926b
|
|||
|
f798ef2e4e
|
|||
|
fa47fcaed7
|
|||
|
f39a9113d6
|
|||
|
207e4469b2
|
1
TODO.md
1
TODO.md
@@ -27,6 +27,7 @@ A list of in-progress and completed todo's.
|
|||||||
- [ ] Need to ensure ssh keys are setup before private submodules are loaded / installed,
|
- [ ] Need to ensure ssh keys are setup before private submodules are loaded / installed,
|
||||||
so I need to make sure that Yubikey setup runs early and works for ssh authentication.
|
so I need to make sure that Yubikey setup runs early and works for ssh authentication.
|
||||||
- [ ] Setup a new machine / virtual machine to test, as it's hard to test the scripts once a machine is setup.
|
- [ ] Setup a new machine / virtual machine to test, as it's hard to test the scripts once a machine is setup.
|
||||||
|
- [ ] Need to add `repos` script when bootstrapping.
|
||||||
|
|
||||||
### Keyboard / kanata
|
### Keyboard / kanata
|
||||||
|
|
||||||
|
|||||||
76
devcontainer-env
Executable file
76
devcontainer-env
Executable file
@@ -0,0 +1,76 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
# Intsalls appropriate dotfiles inside a devcontainer context.
|
||||||
|
|
||||||
|
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"}
|
||||||
|
DEV_ENV=${DEV_ENV:-""}
|
||||||
|
|
||||||
|
if [ ! -d "$DEV_ENV" ]; then
|
||||||
|
echo "[ERROR]: DEV_ENV variable does not exist."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
log() {
|
||||||
|
echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
copy_dir() {
|
||||||
|
local dir=${1:-""}
|
||||||
|
local path="${DEV_ENV}/${dir}"
|
||||||
|
|
||||||
|
if [ -z "$dir" ] || [ ! -d "$path" ]; then
|
||||||
|
log "[ERROR]: Directory does not exist: $dir"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
log "Copying dir: $dir"
|
||||||
|
cp -R "$path" "$XDG_CONFIG_HOME"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
copy_file() {
|
||||||
|
local file=${1:-""}
|
||||||
|
|
||||||
|
if [[ -z "$file" ]] || [[ ! -f "$file" ]]; then
|
||||||
|
log "[ERROR]: file does not exist: $file"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
log "Copying file: $file"
|
||||||
|
cp "$DEV_ENV/$file" "$HOME"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# MAIN
|
||||||
|
dirs=(
|
||||||
|
env/.config/eza
|
||||||
|
env/.config/git
|
||||||
|
env/.config/ripgrep
|
||||||
|
env/.config/starship
|
||||||
|
env/.config/yazi
|
||||||
|
env/.config/zsh
|
||||||
|
)
|
||||||
|
|
||||||
|
files=(
|
||||||
|
env/.markdownlint.jsonc
|
||||||
|
env/.prettierrc
|
||||||
|
env/.tmux.conf
|
||||||
|
env/.zshenv
|
||||||
|
)
|
||||||
|
|
||||||
|
for dir in "${dirs[@]}"; do
|
||||||
|
copy_dir "$dir"
|
||||||
|
done
|
||||||
|
|
||||||
|
for file in "${files[@]}"; do
|
||||||
|
copy_file "$file"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Install neovim config
|
||||||
|
git submodule update --init --remote env/.config/nvim
|
||||||
|
source env/.config/nvim/install.sh
|
||||||
|
|
||||||
|
# Install my scripts
|
||||||
|
cp -R env/.local/scripts "$HOME/.local"
|
||||||
75
env/.config/aap/config.toml
vendored
Normal file
75
env/.config/aap/config.toml
vendored
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
# This config is setup for running inside the docker container.
|
||||||
|
#
|
||||||
|
# NOTE:
|
||||||
|
# Configuration settings for the `hpa` command line tool.
|
||||||
|
# You can delete settings that are not applicable to your use case.
|
||||||
|
|
||||||
|
# Default arguments / options that get passed into `ansible-playbook` commands.
|
||||||
|
# WARNING: Do not put arguments / options that contain spaces in the same string,
|
||||||
|
# they should be separate strings, for example do not do something like
|
||||||
|
# ['--tags debug'], instead use ['--tags', 'debug'].
|
||||||
|
#
|
||||||
|
args = ['--tags', 'debug']
|
||||||
|
|
||||||
|
# Set to true if you want to pass the vault args to `ansible-playbook` commands.
|
||||||
|
useVaultArgs = true
|
||||||
|
|
||||||
|
# NOTE:
|
||||||
|
# Configuration for running the generate command(s). This allows custimizations
|
||||||
|
# to the files that get used to generate the final output (generally a pdf).
|
||||||
|
# See `pandoc --help`. Below are the defaults that get used, which only need
|
||||||
|
# adjusted if your template does not follow the default template design or if
|
||||||
|
# you add extra files to your template that need to be included in the final
|
||||||
|
# output. Also be aware that any of the files specified in the `files` or
|
||||||
|
# `includeInHeader` options, need to be inside the `buildDirectory` when generating
|
||||||
|
# the final output file.
|
||||||
|
|
||||||
|
# [generate]
|
||||||
|
# this relative to the project directory.
|
||||||
|
# buildDirectory = '.build'
|
||||||
|
# pdfEngine = 'xelatex'
|
||||||
|
# includeInHeader = [
|
||||||
|
# 'head.tex',
|
||||||
|
# 'footer.tex'
|
||||||
|
# ]
|
||||||
|
# files = [
|
||||||
|
# 'Report.md',
|
||||||
|
# 'Definitions.md'
|
||||||
|
# ]
|
||||||
|
# outputFileName = 'Report'
|
||||||
|
|
||||||
|
# NOTE:
|
||||||
|
# These are more for local development of the ansible playbook and should not be needed
|
||||||
|
# in most cases. Uncomment the lines if you want to customize the playbook and use it
|
||||||
|
# instead of the provided / default playbook.
|
||||||
|
|
||||||
|
[playbook]
|
||||||
|
directory = '/root/.local/share/hpa/playbook'
|
||||||
|
inventory = '/root/.local/share/hpa/playbook/inventory.ini'
|
||||||
|
version = 'main'
|
||||||
|
|
||||||
|
# NOTE:
|
||||||
|
# These are to declare where your template files are either on your local system or
|
||||||
|
# a remote git repository.
|
||||||
|
[template]
|
||||||
|
# The directory path on your local system to the template files.
|
||||||
|
directory = '/root/.local/share/hpa/airflow-assessment-template'
|
||||||
|
vars = 'repo_vars'
|
||||||
|
|
||||||
|
# The url to a git repository that contains your template files.
|
||||||
|
# url = 'https://git.example.com/consult-template.git'
|
||||||
|
|
||||||
|
# The version, tag, branch, or sha of the template files to clone from the remote
|
||||||
|
# template repository. In general it is best practice to use a version instead of a
|
||||||
|
# branch.
|
||||||
|
# version = '1.0.0'
|
||||||
|
|
||||||
|
# NOTE:
|
||||||
|
# Holds settings for `ansible-vault` commands.
|
||||||
|
[vault]
|
||||||
|
# Arguments to pass to commands that use `ansible-vault`, such as encrypting or decrypting
|
||||||
|
# files.
|
||||||
|
args = ['--vault-password-file=/run/secrets/vault-pass']
|
||||||
|
|
||||||
|
# An id to use when encrypting `ansible-vault` files.
|
||||||
|
#encryptId = 'myId'
|
||||||
2
env/.config/ghostty/config
vendored
2
env/.config/ghostty/config
vendored
@@ -3,7 +3,7 @@ theme = Catppuccin Mocha
|
|||||||
confirm-close-surface = false
|
confirm-close-surface = false
|
||||||
|
|
||||||
font-family = "Fira Code"
|
font-family = "Fira Code"
|
||||||
font-size = 13
|
font-size = 18
|
||||||
font-thicken = false
|
font-thicken = false
|
||||||
|
|
||||||
window-save-state = always
|
window-save-state = always
|
||||||
|
|||||||
2
env/.config/hypr/hyprautostart.conf
vendored
2
env/.config/hypr/hyprautostart.conf
vendored
@@ -6,7 +6,7 @@
|
|||||||
# Autostart necessary processes (like notifications daemons, status bars, etc.)
|
# Autostart necessary processes (like notifications daemons, status bars, etc.)
|
||||||
# Or execute your favorite apps at launch like this:
|
# Or execute your favorite apps at launch like this:
|
||||||
|
|
||||||
exec-once = pidof hyprpaper | uwsm app -- hyprpaper
|
exec-once = uwsm app -- hyprpaper
|
||||||
exec-once = pidof hypridle | uwsm app -- hypridle
|
exec-once = pidof hypridle | uwsm app -- hypridle
|
||||||
exec-once = pidof hyprlauncher | uwsm app -- hyprlauncher -d
|
exec-once = pidof hyprlauncher | uwsm app -- hyprlauncher -d
|
||||||
exec-once = pidof swaync | uwsm app -- swaync
|
exec-once = pidof swaync | uwsm app -- swaync
|
||||||
|
|||||||
8
env/.config/hypr/hyprkeybinds.conf
vendored
8
env/.config/hypr/hyprkeybinds.conf
vendored
@@ -41,9 +41,9 @@ bindd = $mainMod, A, [A]i - launch / focus, exec,
|
|||||||
bindd = $mainMod SHIFT, A, [A]i - new window, exec, $pwa "https://ollama.housh.dev"
|
bindd = $mainMod SHIFT, A, [A]i - new window, exec, $pwa "https://ollama.housh.dev"
|
||||||
bindd = $mainMod, B, New [b]rowser, exec, $browser
|
bindd = $mainMod, B, New [b]rowser, exec, $browser
|
||||||
bindd = $mainMod SHIFT, B, New private [b]rowser, exec, $browser --incognito
|
bindd = $mainMod SHIFT, B, New private [b]rowser, exec, $browser --incognito
|
||||||
bindd = $mainMod, C, [C]alendar, exec, $pwa --or-focus "https://www.icloud.com/calendar"
|
bindd = $mainMod, C, [C]alendar, togglespecialworkspace, calendar
|
||||||
bindd = $mainMod SHIFT, C, [C]onfig folder in tmux session, exec, $terminal -e $tmuxSessionator ~/.config
|
bindd = $mainMod SHIFT, C, [C]onfig folder in tmux session, exec, $terminal -e $tmuxSessionator ~/.config
|
||||||
bindd = $mainMod, D, [D]ispatch app - special workspace, exec, $pwa --special dispatch $housecallPro
|
bindd = $mainMod, D, [D]ispatch app - special workspace, togglespecialworkspace, dispatch
|
||||||
bindd = $mainMod SHIFT, D, [D]ispatch app - new window, exec, $pwa --new $housecallPro
|
bindd = $mainMod SHIFT, D, [D]ispatch app - new window, exec, $pwa --new $housecallPro
|
||||||
bindd = $mainMod, E, [E]mail - personal, exec, $pwa --or-focus "https://mail.proton.me"
|
bindd = $mainMod, E, [E]mail - personal, exec, $pwa --or-focus "https://mail.proton.me"
|
||||||
bindd = $mainMod SHIFT, E, [E]mail - work, exec, $scripts/launch --or-focus thunderbird uwsm app -- thunderbird
|
bindd = $mainMod SHIFT, E, [E]mail - work, exec, $scripts/launch --or-focus thunderbird uwsm app -- thunderbird
|
||||||
@@ -58,10 +58,10 @@ bindd = $mainMod, J, Focus window - down, movefo
|
|||||||
bindd = $mainMod, K, Focus window - up, movefocus, u # move window focus using vim keys
|
bindd = $mainMod, K, Focus window - up, movefocus, u # move window focus using vim keys
|
||||||
bindd = $mainMod, L, Focus window - right, movefocus, r # move window focus using vim keys
|
bindd = $mainMod, L, Focus window - right, movefocus, r # move window focus using vim keys
|
||||||
bindd = $mainMod SHIFT, L, Workspace - forward, workspace, +1
|
bindd = $mainMod SHIFT, L, Workspace - forward, workspace, +1
|
||||||
bindd = $mainMod, M, [M]usic - apple, exec, $pwa --special music "https://music.apple.com"
|
bindd = $mainMod, M, [M]usic - jellyfin-tui, togglespecialworkspace, music
|
||||||
bindd = $mainMod SHIFT, M, [M]enu bar - toggle visible, exec, $scripts/waybarctl --toggle
|
bindd = $mainMod SHIFT, M, [M]enu bar - toggle visible, exec, $scripts/waybarctl --toggle
|
||||||
bindd = $mainMod, O, Purchase [o]rders, exec, $pwa --special dispatch "https://po.housh.dev"
|
bindd = $mainMod, O, Purchase [o]rders, exec, $pwa --special dispatch "https://po.housh.dev"
|
||||||
bindd = $mainMod, P, [P]assword manager, exec, $pwa --special pass "https://pass.proton.me"
|
bindd = $mainMod, P, [P]assword manager, togglespecialworkspace, pass
|
||||||
bindd = $mainMod SHIFT, P, [P]hotos, exec, $pwa --or-focus "https://photos.housh.dev"
|
bindd = $mainMod SHIFT, P, [P]hotos, exec, $pwa --or-focus "https://photos.housh.dev"
|
||||||
bindd = $mainMod SHIFT, R, [R]estart menu bar, exec, $scripts/waybarctl --restart
|
bindd = $mainMod SHIFT, R, [R]estart menu bar, exec, $scripts/waybarctl --restart
|
||||||
bindd = $mainMod, S, Toggle [s]pecial workspace, togglespecialworkspace, magic # use $windowMod S to send window to the special workspace
|
bindd = $mainMod, S, Toggle [s]pecial workspace, togglespecialworkspace, magic # use $windowMod S to send window to the special workspace
|
||||||
|
|||||||
1
env/.config/hypr/hyprland.conf
vendored
1
env/.config/hypr/hyprland.conf
vendored
@@ -9,6 +9,7 @@
|
|||||||
source = ~/.config/hypr/hyprenv.conf
|
source = ~/.config/hypr/hyprenv.conf
|
||||||
source = ~/.config/hypr/hyprmonitors.conf
|
source = ~/.config/hypr/hyprmonitors.conf
|
||||||
source = ~/.config/hypr/hyprwindows.conf
|
source = ~/.config/hypr/hyprwindows.conf
|
||||||
|
source = ~/.config/hypr/hyprworkspaces.conf
|
||||||
source = ~/.config/hypr/hyprkeybinds.conf
|
source = ~/.config/hypr/hyprkeybinds.conf
|
||||||
source = ~/.config/hypr/hyprinput.conf
|
source = ~/.config/hypr/hyprinput.conf
|
||||||
source = ~/.config/hypr/hyprautostart.conf
|
source = ~/.config/hypr/hyprautostart.conf
|
||||||
|
|||||||
2
env/.config/hypr/hyprmonitors.conf
vendored
2
env/.config/hypr/hyprmonitors.conf
vendored
@@ -4,7 +4,5 @@
|
|||||||
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||||
monitor= ,preferred,auto,auto
|
monitor= ,preferred,auto,auto
|
||||||
#monitor = HDMI-A-1, preferred, 0x0, auto
|
|
||||||
#monitor = HDMI-A-1, preferred, 0x0, 1.66667
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
2
env/.config/hypr/hyprtoolkit.conf
vendored
2
env/.config/hypr/hyprtoolkit.conf
vendored
@@ -1,6 +1,6 @@
|
|||||||
background = rgb(1e1e2e)
|
background = rgb(1e1e2e)
|
||||||
base = rgb(b4befe)
|
base = rgb(b4befe)
|
||||||
alternate_base = rgb(cdd6f4))
|
alternate_base = rgb(cdd6f4)
|
||||||
text = rgb(cdd6f4)
|
text = rgb(cdd6f4)
|
||||||
bright_text = rgb(89b4fa)
|
bright_text = rgb(89b4fa)
|
||||||
accent = rgb(b4befe)
|
accent = rgb(b4befe)
|
||||||
|
|||||||
94
env/.config/hypr/hyprwindows.conf
vendored
94
env/.config/hypr/hyprwindows.conf
vendored
@@ -1,53 +1,47 @@
|
|||||||
##############################
|
###############
|
||||||
### WINDOWS AND WORKSPACES ###
|
### WINDOWS ###
|
||||||
##############################
|
###############
|
||||||
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||||
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
|
|
||||||
|
# windowrule = float, tag:floating-window
|
||||||
|
# windowrule = center, tag:floating-window
|
||||||
|
# windowrule = size 60% 60%, tag:floating-window
|
||||||
#
|
#
|
||||||
|
# # Weather tui
|
||||||
windowrule = float, tag:floating-window
|
# windowrule = float, class:^(com.ghostty.weather)$
|
||||||
windowrule = center, tag:floating-window
|
# windowrule = center, class:^(com.ghostty.weather)$
|
||||||
windowrule = size 60% 60%, tag:floating-window
|
# windowrule = size 90% 80%, class:^(com.ghostty.weather)$
|
||||||
|
#
|
||||||
# Weather tui
|
# # Force windows to be a floating window
|
||||||
windowrule = float, class:^(com.ghostty.weather)$
|
# windowrule = tag +floating-window, class:^(blueberry.py|org.gnome.Nautilus|com.ghostty.float)$
|
||||||
windowrule = center, class:^(com.ghostty.weather)$
|
# windowrule = tag +floating-window, class:^(com.ghostty.windowctl)$
|
||||||
windowrule = size 90% 80%, class:^(com.ghostty.weather)$
|
# windowrule = tag +floating-window, class:^(com.ghostty.utils-launcher)$
|
||||||
|
# windowrule = tag +floating-window, class:^(com.ghostty.homelab-launcher)$
|
||||||
# Force windows to be a floating window
|
#
|
||||||
windowrule = tag +floating-window, class:^(blueberry.py|org.gnome.Nautilus|com.ghostty.float)$
|
# # Force to stay focused when visible.
|
||||||
windowrule = tag +floating-window, class:^(com.ghostty.windowctl)$
|
# windowrule = stayfocused, class:(blueberry.py)
|
||||||
windowrule = tag +floating-window, class:^(com.ghostty.utils-launcher)$
|
# windowrule = stayfocused, class:Pinentry.gtk
|
||||||
windowrule = tag +floating-window, class:^(com.ghostty.homelab-launcher)$
|
# windowrule = stayfocused, class:com.ghostty.float
|
||||||
|
# windowrule = stayfocused, class:com.ghostty.windowctl
|
||||||
# Force to stay focused when visible.
|
# windowrule = stayfocused, class:^(com.ghostty.utils-launcher)$
|
||||||
windowrule = stayfocused, class:(blueberry.py)
|
#
|
||||||
windowrule = stayfocused, class:Pinentry.gtk
|
# # Clipboard history tui in floating window.
|
||||||
windowrule = stayfocused, class:com.ghostty.float
|
# windowrule = tag +floating-window, class:.*clipse.*
|
||||||
windowrule = stayfocused, class:com.ghostty.windowctl
|
# windowrule = stayfocused, class:.*clipse.*
|
||||||
windowrule = stayfocused, class:^(com.ghostty.utils-launcher)$
|
#
|
||||||
|
# # Ignore maximize requests from apps. You'll probably like this.
|
||||||
# Clipboard history tui in floating window.
|
# windowrule = suppressevent maximize, class:.*
|
||||||
windowrule = tag +floating-window, class:.*clipse.*
|
#
|
||||||
windowrule = stayfocused, class:.*clipse.*
|
# # Just a dash of opacity by default.
|
||||||
|
# windowrule = opacity 0.97 0.92, class:.*
|
||||||
# Ignore maximize requests from apps. You'll probably like this.
|
# # No opacity on youtube.
|
||||||
windowrule = suppressevent maximize, class:.*
|
# windowrule = opacity 1.0, class:.*youtube.com.*
|
||||||
|
#
|
||||||
# Just a dash of opacity by default.
|
# # Fix some dragging issues with XWayland
|
||||||
windowrule = opacity 0.97 0.92, class:.*
|
# windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
|
||||||
# No opacity on youtube.
|
#
|
||||||
windowrule = opacity 1.0, class:.*youtube.com.*
|
# # To get more information about a window’s class, title, XWayland status or its size, you can use `hyprctl clients`. (From Hyprland Wiki)
|
||||||
|
# windowrulev2 = float,class:^(one.alynx.showmethekey)$
|
||||||
# Fix some dragging issues with XWayland
|
# windowrulev2 = float,class:^(showmethekey-gtk)$ # make window floating
|
||||||
windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
|
# windowrulev2 = pin,class:^(showmethekey-gtk)$ # pin window
|
||||||
|
|
||||||
workspace = special:hidden, invisible
|
|
||||||
workspace = special:pass, class:.*pass.proton.me.*
|
|
||||||
workspace = special:dispatch, class:.*pro.housecallpro.com.*
|
|
||||||
|
|
||||||
# To get more information about a window’s class, title, XWayland status or its size, you can use `hyprctl clients`. (From Hyprland Wiki)
|
|
||||||
windowrulev2 = float,class:^(one.alynx.showmethekey)$
|
|
||||||
windowrulev2 = float,class:^(showmethekey-gtk)$ # make window floating
|
|
||||||
windowrulev2 = pin,class:^(showmethekey-gtk)$ # pin window
|
|
||||||
|
|||||||
15
env/.config/hypr/hyprworkspaces.conf
vendored
Normal file
15
env/.config/hypr/hyprworkspaces.conf
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
##################
|
||||||
|
### WORKSPACES ###
|
||||||
|
##################
|
||||||
|
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
|
||||||
|
|
||||||
|
$scripts = ~/.local/scripts/hypr
|
||||||
|
$pwa = $scripts/webapp launch
|
||||||
|
$housecallPro = $pwa "https://pro.housecallpro.com/app/calendar_new"
|
||||||
|
|
||||||
|
workspace = special:hidden, invisible
|
||||||
|
workspace = special:pass,on-created-empty: $pwa "https://pass.proton.me"
|
||||||
|
workspace = special:dispatch,on-created-empty: $housecallPro && $housecallPro
|
||||||
|
workspace = special:music,on-created-empty: ghostty --class=com.ghostty.music -e jellyfin-tui
|
||||||
|
workspace = special:calendar,on-created-empty: uwsm app -- gnome-calendar
|
||||||
2
env/.config/kanata/voyager.kbd
vendored
2
env/.config/kanata/voyager.kbd
vendored
@@ -27,7 +27,7 @@
|
|||||||
;; Variables
|
;; Variables
|
||||||
(defvar
|
(defvar
|
||||||
tap-higher 400
|
tap-higher 400
|
||||||
tap-time 200
|
tap-time 150
|
||||||
tap-time-plus 300
|
tap-time-plus 300
|
||||||
hold-time-plus 300
|
hold-time-plus 300
|
||||||
hold-time 200
|
hold-time 200
|
||||||
|
|||||||
2
env/.config/nvim
vendored
2
env/.config/nvim
vendored
Submodule env/.config/nvim updated: d1d13fcc8f...5f3d1733e7
4
env/.config/zsh/.zshrc
vendored
4
env/.config/zsh/.zshrc
vendored
@@ -175,7 +175,8 @@ alias pass='PASSWORD_STORE_DIR=/home/michael/.local/share/gopass/stores/root gop
|
|||||||
alias pc='gopass show --clip' # get an attribute of a password file and copy to the clipboard.
|
alias pc='gopass show --clip' # get an attribute of a password file and copy to the clipboard.
|
||||||
alias reload='exec zsh -l' # reload the shell, useful when making changes.
|
alias reload='exec zsh -l' # reload the shell, useful when making changes.
|
||||||
alias s='swift' # shorthand to access swift commands
|
alias s='swift' # shorthand to access swift commands
|
||||||
alias st='swift test' # swift test
|
alias st='swift test' # swift test
|
||||||
|
alias ste='swift test --enable-code-coverage' # swift test with code coverage enabled.
|
||||||
alias sb='swift build' # swift build
|
alias sb='swift build' # swift build
|
||||||
alias syu='yay -Syu' # Update packages.
|
alias syu='yay -Syu' # Update packages.
|
||||||
alias t='tmux' # access tmux quickly
|
alias t='tmux' # access tmux quickly
|
||||||
@@ -207,6 +208,7 @@ source <(fzf --zsh)
|
|||||||
_source_if "$ZDOTDIR/.zshrc-local"
|
_source_if "$ZDOTDIR/.zshrc-local"
|
||||||
_source_if "$LOCAL_ENV"
|
_source_if "$LOCAL_ENV"
|
||||||
_source_if "$SCRIPTS/catppuccin-colors"
|
_source_if "$SCRIPTS/catppuccin-colors"
|
||||||
|
_source_if "$XDG_DATA_HOME/swiftly/env.sh"
|
||||||
|
|
||||||
# pnpm
|
# pnpm
|
||||||
export PNPM_HOME="$XDG_DATA_HOME/pnpm"
|
export PNPM_HOME="$XDG_DATA_HOME/pnpm"
|
||||||
|
|||||||
10
env/.config/zsh/functions/dp
vendored
10
env/.config/zsh/functions/dp
vendored
@@ -1,12 +1,12 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
function dp() {
|
function dp() {
|
||||||
[ -z "$1" ] && echo "Must supply temperature" && return 1
|
[ -z "$1" ] && echo "Must supply temperature" && return 1
|
||||||
[ -z "$2" ] && echo "Must supply relative humidity" && return 1
|
[ -z "$2" ] && echo "Must supply relative humidity" && return 1
|
||||||
|
|
||||||
local temperature=$1
|
local temperature=$1
|
||||||
local humidity=$2
|
local humidity=$2
|
||||||
|
|
||||||
/opt/homebrew/bin/psychrometrics dew-point --dry-bulb "$temperature" --relative-humidity "$humidity"
|
psychrometrics dew-point --dry-bulb "$temperature" --relative-humidity "$humidity"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
47
env/.local/scripts/aap
vendored
Executable file
47
env/.local/scripts/aap
vendored
Executable file
@@ -0,0 +1,47 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
# A wrapper script to run swift-hpa in a docker container and
|
||||||
|
# mount the correct volumes, etc.
|
||||||
|
#
|
||||||
|
# Make sure to run 'hpa-init' first on this machine to setup
|
||||||
|
# dependencies, if you have not done so already.
|
||||||
|
#
|
||||||
|
# To attach to a shell inside the container run:
|
||||||
|
# `hpa bash`
|
||||||
|
#
|
||||||
|
# To run ansible vault commands inside the container run:
|
||||||
|
# `hpa ansible-vault ...`
|
||||||
|
#
|
||||||
|
|
||||||
|
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
|
||||||
|
. "$SCRIPTS/utils/hpa/hpa.env"
|
||||||
|
|
||||||
|
############################## MAIN ##############################
|
||||||
|
|
||||||
|
# Don't pull images if they're prefixed with 'localhost'.
|
||||||
|
if echo "$HPA_DOCKER_IMAGE" | grep -vq "localhost"; then
|
||||||
|
|
||||||
|
# Check if we should pull the image prior to running.
|
||||||
|
last_pull="0"
|
||||||
|
if [[ -f "$HPA_AIRFLOW_CONFIG_DIR/.lastpull" ]]; then
|
||||||
|
last_pull=$(cat "$HPA_AIRFLOW_CONFIG_DIR/.lastpull")
|
||||||
|
fi
|
||||||
|
curr=$(date +%s)
|
||||||
|
diff=$((curr - last_pull))
|
||||||
|
|
||||||
|
if [[ $HPA_AUTO_PULL == "1" ]] && [[ $diff -gt "$HPA_AUTO_PULL_INTERVAL" ]]; then
|
||||||
|
. "$SCRIPTS/hpa-pull" "$HPA_AUTO_PULL_OPTS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
podman run --rm --interactive --tty \
|
||||||
|
--volume "$HPA_AIRFLOW_CONFIG_DIR":/root/.config/hpa:ro \
|
||||||
|
--volume "$HPA_DATA_DIR":/root/.local/share/hpa:ro \
|
||||||
|
--volume "$HPA_CONSULTS_DIR":/consults \
|
||||||
|
--volume "$PWD":/root/project \
|
||||||
|
--secret "$HPA_VAULT_SECRET_KEY" \
|
||||||
|
"$HPA_DOCKER_IMAGE:$HPA_DOCKER_TAG" "$@"
|
||||||
2
env/.local/scripts/hpa
vendored
2
env/.local/scripts/hpa
vendored
@@ -38,6 +38,8 @@ if echo "$HPA_DOCKER_IMAGE" | grep -vq "localhost"; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "ARGS: $@"
|
||||||
|
|
||||||
podman run --rm --interactive --tty \
|
podman run --rm --interactive --tty \
|
||||||
--volume "$HPA_CONFIG_DIR":/root/.config/hpa:ro \
|
--volume "$HPA_CONFIG_DIR":/root/.config/hpa:ro \
|
||||||
--volume "$HPA_DATA_DIR":/root/.local/share/hpa:ro \
|
--volume "$HPA_DATA_DIR":/root/.local/share/hpa:ro \
|
||||||
|
|||||||
5
env/.local/scripts/hpa-create
vendored
5
env/.local/scripts/hpa-create
vendored
@@ -4,7 +4,8 @@ title="Creating project..."
|
|||||||
script="${SCRIPTS:-$HOME/.local/scripts}/utils/hpa/hpa-create"
|
script="${SCRIPTS:-$HOME/.local/scripts}/utils/hpa/hpa-create"
|
||||||
first_arg=${1:-""}
|
first_arg=${1:-""}
|
||||||
if [[ $first_arg == "-h" ]] || [[ $first_arg == "--help" ]]; then
|
if [[ $first_arg == "-h" ]] || [[ $first_arg == "--help" ]]; then
|
||||||
. "$script" $*
|
. "$script" $*
|
||||||
else
|
else
|
||||||
gum spin --show-output --title "$title" -- bash -c "$script $*" | tr -d '\r' | head -1
|
# bash -c "$script $*" | tr -d '\r' | head -1
|
||||||
|
gum spin --show-output --title "$title" -- bash -c "$script $*" | tr -d '\r' | head -1
|
||||||
fi
|
fi
|
||||||
|
|||||||
61
env/.local/scripts/hpa-init
vendored
61
env/.local/scripts/hpa-init
vendored
@@ -14,7 +14,7 @@ LOG_FILE=${LOG_FILE:-"$LOG_LABEL.log"}
|
|||||||
. "$SCRIPTS/utils/hpa/hpa.env"
|
. "$SCRIPTS/utils/hpa/hpa.env"
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
||||||
Setup dependencies for running hpa script in docker. This only needs to be
|
Setup dependencies for running hpa script in docker. This only needs to be
|
||||||
ran once on a new machine.
|
ran once on a new machine.
|
||||||
@@ -44,30 +44,30 @@ EOF
|
|||||||
|
|
||||||
# Logging utility function, use in place of echo.
|
# Logging utility function, use in place of echo.
|
||||||
log() {
|
log() {
|
||||||
logging log --source "$THIS_FILE" "$@"
|
logging log --source "$THIS_FILE" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
generate-completion() {
|
generate-completion() {
|
||||||
local output_dir output type
|
local output_dir output type
|
||||||
type=${1:-"zsh"}
|
type=${1:-"zsh"}
|
||||||
output=${2:-$HOME/.zsh/completions/_hpa}
|
output=${2:-$HOME/.zsh/completions/_hpa}
|
||||||
output_dir=$(dirname "$output")
|
output_dir=$(dirname "$output")
|
||||||
|
|
||||||
log "Generating completion: type: '$type', to: $output"
|
log "Generating completion: type: '$type', to: $output"
|
||||||
|
|
||||||
[[ ! -d "$output_dir" ]] && mkdir -p "$output_dir"
|
[[ ! -d "$output_dir" ]] && mkdir -p "$output_dir"
|
||||||
(
|
(
|
||||||
podman run --rm -it "$HPA_DOCKER_IMAGE:$HPA_DOCKER_TAG" \
|
podman run --rm -it "$HPA_DOCKER_IMAGE:$HPA_DOCKER_TAG" \
|
||||||
--generate-completion-script "$type" |
|
--generate-completion-script "$type" |
|
||||||
tr -d '\r'
|
tr -d '\r'
|
||||||
) >"$output"
|
) >"$output"
|
||||||
}
|
}
|
||||||
|
|
||||||
generate-secret() {
|
generate-secret() {
|
||||||
log "Generating vault secret for key: '$HPA_VAULT_SECRET_KEY'"
|
log "Generating vault secret for key: '$HPA_VAULT_SECRET_KEY'"
|
||||||
local secret
|
local secret
|
||||||
secret="$(pass -c ansible/vault-pass)"
|
secret="$(pass -c ansible/vault-pass)"
|
||||||
printf "%s" "$secret" | podman secret create "$HPA_VAULT_SECRET_KEY" -
|
printf "%s" "$secret" | podman secret create "$HPA_VAULT_SECRET_KEY" -
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@@ -76,22 +76,23 @@ generate-secret() {
|
|||||||
|
|
||||||
first_arg=${1:-""}
|
first_arg=${1:-""}
|
||||||
if [[ $first_arg == "-h" ]] || [[ $first_arg == "--help" ]]; then
|
if [[ $first_arg == "-h" ]] || [[ $first_arg == "--help" ]]; then
|
||||||
usage && exit 0
|
usage && exit 0
|
||||||
else
|
else
|
||||||
# Setup logging file and label.
|
# Setup logging file and label.
|
||||||
source "$SCRIPTS/hypr/logging"
|
source "$SCRIPTS/hypr/logging"
|
||||||
setup-logging "$LOG_FILE" "$LOG_LABEL"
|
setup-logging "$LOG_FILE" "$LOG_LABEL"
|
||||||
|
|
||||||
log "Starting init..."
|
log "Starting init..."
|
||||||
|
|
||||||
generate-completion "$@"
|
generate-completion "$@"
|
||||||
generate-secret
|
generate-secret
|
||||||
|
|
||||||
log "Generating directories, if they don't exist."
|
log "Generating directories, if they don't exist."
|
||||||
mkdir -p "$HPA_CONSULTS_DIR" &>/dev/null
|
mkdir -p "$HPA_CONSULTS_DIR" &>/dev/null
|
||||||
mkdir "$HPA_DATA_DIR" &>/dev/null
|
mkdir "$HPA_DATA_DIR" &>/dev/null
|
||||||
|
|
||||||
log "Cloning required template and playbook, if they don't exist"
|
log "Cloning required template and playbook, if they don't exist"
|
||||||
[[ ! -d "$HPA_PLAYBOOK_DIR" ]] && git clone "$HPA_PLAYBOOK_URL" "$HPA_PLAYBOOK_DIR"
|
[[ ! -d "$HPA_PLAYBOOK_DIR" ]] && git clone "$HPA_PLAYBOOK_URL" "$HPA_PLAYBOOK_DIR"
|
||||||
[[ ! -d "$HPA_CONSULT_TEMPLATE_DIR" ]] && git clone "$HPA_CONSULT_TEMPLATE_URL" "$HPA_CONSULT_TEMPLATE_DIR"
|
[[ ! -d "$HPA_CONSULT_TEMPLATE_DIR" ]] && git clone "$HPA_CONSULT_TEMPLATE_URL" "$HPA_CONSULT_TEMPLATE_DIR"
|
||||||
|
[[ ! -d "$HPA_AIRFLOW_TEMPLATE_DIR" ]] && git clone "$HPA_AIRFLOW_TEMPLATE_URL" "$HPA_AIRFLOW_TEMPLATE_DIR"
|
||||||
fi
|
fi
|
||||||
|
|||||||
76
env/.local/scripts/hpa-pull
vendored
76
env/.local/scripts/hpa-pull
vendored
@@ -13,7 +13,7 @@ LOG_FILE=${LOG_FILE:-"$LOG_LABEL.log"}
|
|||||||
. "$SCRIPTS/utils/hpa/hpa.env"
|
. "$SCRIPTS/utils/hpa/hpa.env"
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
||||||
Pulls / updates template, playbook, docker image, etc.
|
Pulls / updates template, playbook, docker image, etc.
|
||||||
|
|
||||||
@@ -34,35 +34,38 @@ EOF
|
|||||||
|
|
||||||
# Logging utility function, use in place of echo.
|
# Logging utility function, use in place of echo.
|
||||||
log() {
|
log() {
|
||||||
logging log --source "$THIS_FILE" "$@"
|
logging log --source "$THIS_FILE" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
pull-repo() {
|
pull-repo() {
|
||||||
local dir=${1:-""}
|
local dir=${1:-""}
|
||||||
[[ -z "$dir" ]] &&
|
[[ -z "$dir" ]] &&
|
||||||
log --error "Directory not supplied to pull git repo." &&
|
log --error "Directory not supplied to pull git repo." &&
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
pushd "$dir" &>/dev/null || exit 1
|
pushd "$dir" &>/dev/null || exit 1
|
||||||
(
|
(
|
||||||
git pull
|
git pull
|
||||||
)
|
)
|
||||||
popd &>/dev/null
|
popd &>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
pull-docker() {
|
pull-docker() {
|
||||||
log --echo "Pulling docker image: '$HPA_DOCKER_IMAGE:$HPA_DOCKER_TAG'"
|
log --echo "Pulling docker image: '$HPA_DOCKER_IMAGE:$HPA_DOCKER_TAG'"
|
||||||
podman pull "$HPA_DOCKER_IMAGE:$HPA_DOCKER_TAG"
|
podman pull "$HPA_DOCKER_IMAGE:$HPA_DOCKER_TAG"
|
||||||
}
|
}
|
||||||
|
|
||||||
pull-playbook() {
|
pull-playbook() {
|
||||||
log --echo "Pulling playbook: '$HPA_PLAYBOOK_DIR'"
|
log --echo "Pulling playbook: '$HPA_PLAYBOOK_DIR'"
|
||||||
pull-repo "$HPA_PLAYBOOK_DIR"
|
pull-repo "$HPA_PLAYBOOK_DIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
pull-template() {
|
pull-template() {
|
||||||
log --echo "Pulling template: '$HPA_CONSULT_TEMPLATE_DIR'"
|
log --echo "Pulling template: '$HPA_CONSULT_TEMPLATE_DIR'"
|
||||||
pull-repo "$HPA_CONSULT_TEMPLATE_DIR"
|
pull-repo "$HPA_CONSULT_TEMPLATE_DIR"
|
||||||
|
|
||||||
|
log --echo "Pulling airflow assessment template: '$HPA_AIRFLOW_TEMPLATE_DIR'"
|
||||||
|
pull-repo "$HPA_AIRFLOW_TEMPLATE_DIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@@ -78,31 +81,32 @@ playbook_flag="0"
|
|||||||
template_flag="0"
|
template_flag="0"
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
if [[ $1 == "-a" ]] || [[ $1 == "--all" ]]; then
|
if [[ $1 == "-a" ]] || [[ $1 == "--all" ]]; then
|
||||||
all_flag="1"
|
all_flag="1"
|
||||||
break
|
break
|
||||||
elif [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
|
elif [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
|
||||||
usage && exit 0
|
usage && exit 0
|
||||||
elif [[ $1 == "-d" ]] || [[ $1 == "--docker" ]]; then
|
elif [[ $1 == "-d" ]] || [[ $1 == "--docker" ]]; then
|
||||||
all_flag="0"
|
all_flag="0"
|
||||||
docker_flag="1"
|
docker_flag="1"
|
||||||
elif [[ $1 == "-p" ]] || [[ $1 == "--playbook" ]]; then
|
elif [[ $1 == "-p" ]] || [[ $1 == "--playbook" ]]; then
|
||||||
all_flag="0"
|
all_flag="0"
|
||||||
playbook_flag="1"
|
playbook_flag="1"
|
||||||
elif [[ $1 == "-t" ]] || [[ $1 == "--template" ]]; then
|
elif [[ $1 == "-t" ]] || [[ $1 == "--template" ]]; then
|
||||||
all_flag="0"
|
all_flag="0"
|
||||||
template_flag="1"
|
template_flag="1"
|
||||||
fi
|
fi
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ $all_flag == "1" ]]; then
|
if [[ $all_flag == "1" ]]; then
|
||||||
docker_flag="1"
|
docker_flag="1"
|
||||||
playbook_flag="1"
|
playbook_flag="1"
|
||||||
template_flag="1"
|
template_flag="1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ $docker_flag == "1" ]] && pull-docker
|
[[ $docker_flag == "1" ]] && pull-docker
|
||||||
[[ $playbook_flag == "1" ]] && pull-playbook
|
[[ $playbook_flag == "1" ]] && pull-playbook
|
||||||
[[ $template_flag == "1" ]] && pull-template
|
[[ $template_flag == "1" ]] && pull-template
|
||||||
date +%s >"$HPA_CONFIG_DIR/.lastpull"
|
date +%s >"$HPA_CONFIG_DIR/.lastpull"
|
||||||
|
date +%s >"$HPA_AIRFLOW_CONFIG_DIR/.lastpull"
|
||||||
|
|||||||
152
env/.local/scripts/hypr/launch
vendored
152
env/.local/scripts/hypr/launch
vendored
@@ -11,7 +11,7 @@ THIS=$(basename "$THIS_FILE")
|
|||||||
LOG_FILE=${LOG_FILE:-"$LOG_LABEL.log"}
|
LOG_FILE=${LOG_FILE:-"$LOG_LABEL.log"}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
||||||
Launch or focus / close a window based on pattern contained within the window
|
Launch or focus / close a window based on pattern contained within the window
|
||||||
class name. (Default is to focus the window).
|
class name. (Default is to focus the window).
|
||||||
@@ -61,57 +61,57 @@ special_flag="0"
|
|||||||
special=""
|
special=""
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
if [[ $1 == "-c" ]] || [[ $1 == "--or-close" ]]; then
|
if [[ $1 == "-c" ]] || [[ $1 == "--or-close" ]]; then
|
||||||
close_flag="1"
|
close_flag="1"
|
||||||
action="closewindow"
|
action="closewindow"
|
||||||
elif [[ $1 == "-f" ]] || [[ $1 == "--or-focus" ]]; then
|
elif [[ $1 == "-f" ]] || [[ $1 == "--or-focus" ]]; then
|
||||||
focus_flag="1"
|
focus_flag="1"
|
||||||
action="focuswindow"
|
action="focuswindow"
|
||||||
elif [[ $1 == "-s" ]] || [[ $1 == "--special" ]]; then
|
elif [[ $1 == "-s" ]] || [[ $1 == "--special" ]]; then
|
||||||
shift
|
shift
|
||||||
special_flag="1"
|
special_flag="1"
|
||||||
special=$1
|
special=$1
|
||||||
elif [[ $1 == "-o" ]] || [[ $1 == "--focus-active-only" ]]; then
|
elif [[ $1 == "-o" ]] || [[ $1 == "--focus-active-only" ]]; then
|
||||||
focus_flag="1"
|
focus_flag="1"
|
||||||
focus_active_only_flag="1"
|
focus_active_only_flag="1"
|
||||||
action="focuswindow"
|
action="focuswindow"
|
||||||
elif [[ $1 == "-x" ]] || [[ $1 == "--close-active-only" ]]; then
|
elif [[ $1 == "-x" ]] || [[ $1 == "--close-active-only" ]]; then
|
||||||
close_flag="1"
|
close_flag="1"
|
||||||
close_active_only_flag="1"
|
close_active_only_flag="1"
|
||||||
action="closewindow"
|
action="closewindow"
|
||||||
elif [[ $1 == "-n" ]] || [[ $1 == "--new" ]]; then
|
elif [[ $1 == "-n" ]] || [[ $1 == "--new" ]]; then
|
||||||
new_instance_flag="1"
|
new_instance_flag="1"
|
||||||
elif [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
|
elif [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
|
||||||
usage && exit 0
|
usage && exit 0
|
||||||
elif [[ -z $pattern ]]; then
|
elif [[ -z $pattern ]]; then
|
||||||
pattern=$1
|
pattern=$1
|
||||||
else
|
else
|
||||||
launch_cmd+=("$1")
|
launch_cmd+=("$1")
|
||||||
fi
|
fi
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
log() {
|
log() {
|
||||||
logging log --source "$THIS_FILE" "$@"
|
logging log --source "$THIS_FILE" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Redirects all output of hyprctl dispatch commands.
|
# Redirects all output of hyprctl dispatch commands.
|
||||||
hypr_dispatch() {
|
hypr_dispatch() {
|
||||||
hyprctl dispatch "$@" >/dev/null 2>&1
|
hyprctl dispatch "$@" >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
toggle_special() {
|
toggle_special() {
|
||||||
if [[ -z $special ]]; then
|
if [[ -z $special ]]; then
|
||||||
log --error " No name supplied for special workspace."
|
log --error " No name supplied for special workspace."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
hypr_dispatch togglespecialworkspace $special
|
hypr_dispatch togglespecialworkspace $special
|
||||||
}
|
}
|
||||||
|
|
||||||
launch_application() {
|
launch_application() {
|
||||||
log "Launching..."
|
log "Launching..."
|
||||||
log "'${launch_cmd[@]}'"
|
log "'${launch_cmd[*]}'"
|
||||||
eval exec ${launch_cmd[@]}
|
eval exec "${launch_cmd[*]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@@ -123,11 +123,11 @@ source "$SCRIPTS/hypr/logging"
|
|||||||
setup-logging "$LOG_FILE" "$LOG_LABEL"
|
setup-logging "$LOG_FILE" "$LOG_LABEL"
|
||||||
|
|
||||||
if [[ -z $pattern ]]; then
|
if [[ -z $pattern ]]; then
|
||||||
log --error "Must supply a pattern to match the window class."
|
log --error "Must supply a pattern to match the window class."
|
||||||
usage && exit 1
|
usage && exit 1
|
||||||
elif [[ -z $launch_cmd ]]; then
|
elif [[ -z $launch_cmd ]]; then
|
||||||
log --error "Must supply a launch command to match the window class."
|
log --error "Must supply a launch command to match the window class."
|
||||||
usage && exit 1
|
usage && exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log "Pattern: $pattern"
|
log "Pattern: $pattern"
|
||||||
@@ -135,13 +135,13 @@ addresses=$(hyprctl clients -j | jq ".[] | select(.class | contains(\"$pattern\"
|
|||||||
|
|
||||||
# If no addresses, then launch the application.
|
# If no addresses, then launch the application.
|
||||||
if [[ -z $addresses ]] || [[ $new_instance_flag == "1" ]]; then
|
if [[ -z $addresses ]] || [[ $new_instance_flag == "1" ]]; then
|
||||||
log "No addresses found or new instance flag set."
|
log "No addresses found or new instance flag set."
|
||||||
# Toggle special workspace if applicable.
|
# Toggle special workspace if applicable.
|
||||||
if [[ $special_flag == "1" ]]; then
|
if [[ $special_flag == "1" ]]; then
|
||||||
log "Toggling special workspace."
|
log "Toggling special workspace."
|
||||||
toggle_special
|
toggle_special
|
||||||
fi
|
fi
|
||||||
launch_application && exit 0
|
launch_application && exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
active_window_workspace=$(hyprctl activewindow -j | jq -r '.workspace.name')
|
active_window_workspace=$(hyprctl activewindow -j | jq -r '.workspace.name')
|
||||||
@@ -150,45 +150,45 @@ active_window_workspace=$(hyprctl activewindow -j | jq -r '.workspace.name')
|
|||||||
# we just toggle the special workspace. This keeps "special" apps alive, but closes and / opens
|
# we just toggle the special workspace. This keeps "special" apps alive, but closes and / opens
|
||||||
# the special workspace when invoked.
|
# the special workspace when invoked.
|
||||||
if [[ $special_flag == "1" ]] && [[ $active_window_workspace =~ $special ]]; then
|
if [[ $special_flag == "1" ]] && [[ $active_window_workspace =~ $special ]]; then
|
||||||
toggle_special && exit 0
|
toggle_special && exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if both close and focus flags were passed, so we don't do the
|
# Check if both close and focus flags were passed, so we don't do the
|
||||||
# wrong thing.
|
# wrong thing.
|
||||||
if [[ $focus_flag == "1" ]] && [[ $close_flag == "1" ]]; then
|
if [[ $focus_flag == "1" ]] && [[ $close_flag == "1" ]]; then
|
||||||
log --error "Both focus and close flag were passed."
|
log --error "Both focus and close flag were passed."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for address in ${addresses[@]}; do
|
for address in ${addresses[@]}; do
|
||||||
# Clean the address of quotes.
|
# Clean the address of quotes.
|
||||||
address=${address//\"/}
|
address=${address//\"/}
|
||||||
log "Handling address: '$address'"
|
log "Handling address: '$address'"
|
||||||
|
|
||||||
if [[ $focus_active_only_flag == "1" ]] || [[ $close_active_only_flag == "1" ]]; then
|
if [[ $focus_active_only_flag == "1" ]] || [[ $close_active_only_flag == "1" ]]; then
|
||||||
# get the workspace name for the address.
|
# get the workspace name for the address.
|
||||||
workspace=$(hyprctl clients -j | jq -r ".[] | select(.address == \"$address\") | .workspace.name")
|
workspace=$(hyprctl clients -j | jq -r ".[] | select(.address == \"$address\") | .workspace.name")
|
||||||
|
|
||||||
# check that the window is on the active workspace.
|
# check that the window is on the active workspace.
|
||||||
if [[ $active_window_workspace == $workspace ]]; then
|
if [[ $active_window_workspace == $workspace ]]; then
|
||||||
log "Performing action: '$action', on window: '$address'"
|
log "Performing action: '$action', on window: '$address'"
|
||||||
hypr_dispatch $action "address:$address"
|
hypr_dispatch $action "address:$address"
|
||||||
# early out if focusing a window.
|
# early out if focusing a window.
|
||||||
[[ $focus_active_only_flag ]] && exit 0
|
[[ $focus_active_only_flag ]] && exit 0
|
||||||
else
|
else
|
||||||
# the window is not on the active workspace, so skip it.
|
# the window is not on the active workspace, so skip it.
|
||||||
log "Skipping window: $address"
|
log "Skipping window: $address"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# We don't have the focus_active_only_flag or close_active_only_flag set, so we perform
|
# We don't have the focus_active_only_flag or close_active_only_flag set, so we perform
|
||||||
# the action on the window.
|
# the action on the window.
|
||||||
log "Performing action: '$action', on window: '$address'"
|
log "Performing action: '$action', on window: '$address'"
|
||||||
hypr_dispatch $action "address:$address"
|
hypr_dispatch $action "address:$address"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# If we made it here and focus_active_only_flag was set, then we did not
|
# If we made it here and focus_active_only_flag was set, then we did not
|
||||||
# find a window on the active workspace, so we launch a new window.
|
# find a window on the active workspace, so we launch a new window.
|
||||||
if [[ $focus_active_only_flag == "1" ]]; then
|
if [[ $focus_active_only_flag == "1" ]]; then
|
||||||
launch_application
|
launch_application
|
||||||
fi
|
fi
|
||||||
|
|||||||
32
env/.local/scripts/utils/hpa/hpa-create
vendored
32
env/.local/scripts/utils/hpa/hpa-create
vendored
@@ -17,7 +17,8 @@ LOG_FILE=${LOG_FILE:-"$LOG_LABEL.log"}
|
|||||||
# Load environment / shared variables.
|
# Load environment / shared variables.
|
||||||
. "$SCRIPTS/utils/hpa/hpa.env"
|
. "$SCRIPTS/utils/hpa/hpa.env"
|
||||||
|
|
||||||
declare no_git_flag no_push_flag date_opt
|
declare airflow_flag no_git_flag no_push_flag date_opt
|
||||||
|
airflow_flag="0"
|
||||||
no_git_flag="0"
|
no_git_flag="0"
|
||||||
no_push_flag="0"
|
no_push_flag="0"
|
||||||
date_opt=$(date '+%Y.%m.%d')
|
date_opt=$(date '+%Y.%m.%d')
|
||||||
@@ -25,7 +26,8 @@ date_opt=$(date '+%Y.%m.%d')
|
|||||||
usage() {
|
usage() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
||||||
A utility script to generate a new home performance assessment project.
|
A utility script to generate a new home performance assessment project or
|
||||||
|
airflow assessment project.
|
||||||
|
|
||||||
All output from the 'hpa' command get suppressed so that this script can
|
All output from the 'hpa' command get suppressed so that this script can
|
||||||
be piped / used to automatically cd into the directory after creation to
|
be piped / used to automatically cd into the directory after creation to
|
||||||
@@ -41,6 +43,7 @@ USAGE:
|
|||||||
$ $THIS <flags> <customer>
|
$ $THIS <flags> <customer>
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
|
-a | --airflow: Generate using the airflow assessment project template.
|
||||||
-d | --date: Override the date the project was started.
|
-d | --date: Override the date the project was started.
|
||||||
-g | --no-git: Do not initialize a git repository for the project.
|
-g | --no-git: Do not initialize a git repository for the project.
|
||||||
-h | --help: Show this help page.
|
-h | --help: Show this help page.
|
||||||
@@ -62,21 +65,32 @@ log() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
local customer container_dir
|
local customer container_dir script suffix
|
||||||
customer=${1:-""}
|
customer=${1:-""}
|
||||||
|
|
||||||
[[ -z $customer ]] &&
|
[[ -z $customer ]] &&
|
||||||
log --error "Must supply a customer name for the project" &&
|
log --error "Must supply a customer name for the project" &&
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
[[ ! -f $SCRIPTS/hpa ]] &&
|
|
||||||
log --error "Unable to find the 'hpa' script." &&
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
log "Generating project for: '$customer'"
|
log "Generating project for: '$customer'"
|
||||||
|
|
||||||
|
# Setup approriate configuration and project suffix.
|
||||||
|
if [[ $airflow_flag == "1" ]]; then
|
||||||
|
suffix="AAP"
|
||||||
|
script="$SCRIPTS/aap"
|
||||||
|
else
|
||||||
|
suffix="HPA"
|
||||||
|
script="$SCRIPTS/hpa"
|
||||||
|
fi
|
||||||
|
|
||||||
|
[[ ! -f $SCRIPTS/hpa ]] &&
|
||||||
|
log --error "Unable to find the script: '$script'." &&
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
log "Using script: '$script'"
|
||||||
|
|
||||||
container_dir=$(
|
container_dir=$(
|
||||||
"$SCRIPTS/hpa" create --quiet "/consults/$date_opt.$customer"
|
"$script" create --quiet "/consults/$date_opt.$customer.$suffix"
|
||||||
)
|
)
|
||||||
echo "$HPA_CONSULTS_DIR/$(basename "$container_dir")"
|
echo "$HPA_CONSULTS_DIR/$(basename "$container_dir")"
|
||||||
}
|
}
|
||||||
@@ -129,6 +143,8 @@ declare customer output
|
|||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
if [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
|
if [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
|
||||||
usage && exit 0
|
usage && exit 0
|
||||||
|
elif [[ $1 == "-a" ]] || [[ $1 == "--airflow" ]]; then
|
||||||
|
airflow_flag="1"
|
||||||
elif [[ $1 == "-d" ]] || [[ $1 == "--date" ]]; then
|
elif [[ $1 == "-d" ]] || [[ $1 == "--date" ]]; then
|
||||||
shift
|
shift
|
||||||
date_opt="$1"
|
date_opt="$1"
|
||||||
|
|||||||
8
env/.local/scripts/utils/hpa/hpa.env
vendored
8
env/.local/scripts/utils/hpa/hpa.env
vendored
@@ -33,6 +33,11 @@ HPA_CONSULT_ORIGIN_BASE_URL=${CONSULT_ORIGIN_BASE_URL:-"ssh://git@git.housh.dev:
|
|||||||
HPA_CONSULT_TEMPLATE_DIR=${HPA_DATA_DIR}/template
|
HPA_CONSULT_TEMPLATE_DIR=${HPA_DATA_DIR}/template
|
||||||
HPA_CONSULT_TEMPLATE_URL="ssh://git@git.housh.dev:2222/hhe/consult-template.git"
|
HPA_CONSULT_TEMPLATE_URL="ssh://git@git.housh.dev:2222/hhe/consult-template.git"
|
||||||
|
|
||||||
|
# Airflow assessment vars.
|
||||||
|
HPA_AIRFLOW_CONFIG_DIR="${XDG_CONFIG_HOME}/aap"
|
||||||
|
HPA_AIRFLOW_TEMPLATE_DIR="${HPA_DATA_DIR}/airflow-assessment-template"
|
||||||
|
HPA_AIRFLOW_TEMPLATE_URL="ssh://git@git.housh.dev:2222/hhe/airflow-assessment-template.git"
|
||||||
|
|
||||||
export HPA_AUTO_PULL
|
export HPA_AUTO_PULL
|
||||||
export HPA_AUTO_PULL_INTERVAL
|
export HPA_AUTO_PULL_INTERVAL
|
||||||
export HPA_AUTO_PULL_OPTS
|
export HPA_AUTO_PULL_OPTS
|
||||||
@@ -47,3 +52,6 @@ export HPA_DOCKER_TAG
|
|||||||
export HPA_PLAYBOOK_URL
|
export HPA_PLAYBOOK_URL
|
||||||
export HPA_PLAYBOOK_DIR
|
export HPA_PLAYBOOK_DIR
|
||||||
export HPA_VAULT_SECRET_KEY
|
export HPA_VAULT_SECRET_KEY
|
||||||
|
export HPA_AIRFLOW_CONFIG_DIR
|
||||||
|
export HPA_AIRFLOW_TEMPLATE_DIR
|
||||||
|
export HPA_AIRFLOW_TEMPLATE_URL
|
||||||
|
|||||||
3
env/.zshenv
vendored
3
env/.zshenv
vendored
@@ -87,5 +87,8 @@ export STARSHIP_CONFIG="$XDG_CONFIG_HOME/starship/starship.toml"
|
|||||||
export _ZO_DATA_DIR="$XDG_DATA_HOME"
|
export _ZO_DATA_DIR="$XDG_DATA_HOME"
|
||||||
unset _ZO_ECHO
|
unset _ZO_ECHO
|
||||||
|
|
||||||
|
# Suppress swift backtrace warnings.
|
||||||
|
export SWIFT_BACTRACE=enable=no
|
||||||
|
|
||||||
[ -f "$LOCAL_ENV" ] && source "$LOCAL_ENV"
|
[ -f "$LOCAL_ENV" ] && source "$LOCAL_ENV"
|
||||||
[ -f "$ZDOTDIR/personal.env" ] && source "$ZDOTDIR/personal.env"
|
[ -f "$ZDOTDIR/personal.env" ] && source "$ZDOTDIR/personal.env"
|
||||||
|
|||||||
11
env/jellyfin-tui/config.gpg
vendored
Normal file
11
env/jellyfin-tui/config.gpg
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
-----BEGIN PGP MESSAGE-----
|
||||||
|
|
||||||
|
hF4DAAAAAAAAAAASAQdATOWmZnUO2KsVWqDMIPkJPBvEskExyaYdpYxcl4xqwyUw
|
||||||
|
8rPCTjCdJSbB36d7ly5+UaayXBZFn2IrGXfai7+IP11G92ocj4a8xHSwKZX9mSd8
|
||||||
|
0sABAVlTrLOO4BVWBpGnAsagfzXMGyYPi843KdnZg43b4IAx3hdR46NnjfjGjAZc
|
||||||
|
Ggf4kC+DuTT+Y0BRH8qRLU6kizxRvi13GEnxt0sTQqhNRA+hLbkXYWlZ3fLnf6YD
|
||||||
|
CIpMYowZmqwd6KH3ofFeNr+E5+HAaygU/61VH2pkZRzwwltiEZ4aQ+eWULELs6BF
|
||||||
|
z7nIB49nOZi2m7boSVVnfmknD6Z/QwZSmqakySZRlNNC19IqEoDl02H5cgHCNbQV
|
||||||
|
cTnyHQ==
|
||||||
|
=LRvL
|
||||||
|
-----END PGP MESSAGE-----
|
||||||
12
env/qcal/config.json.gpg
vendored
Normal file
12
env/qcal/config.json.gpg
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
-----BEGIN PGP MESSAGE-----
|
||||||
|
|
||||||
|
hF4DAAAAAAAAAAASAQdAuiXPHaZd/bWttw/D3LtIXio0V9z5aKrqAKDCHofqDmow
|
||||||
|
F90ZOG8wwm3wsmoTSswSifiUUE8AK96ATgphvlxIf/bH+X9pVUPlgZRCPYR7hteI
|
||||||
|
0sBbAWWIYpJA43P5ndpuIUGiGwthRyxQLwWRVFkfZ5v5HLsf0FMVfO2f1azzape9
|
||||||
|
i+0Dz6XoTkDzmApQO46NrOHoI83RUQ7Tbe+AElnDfJT6tj2YaajkCPnvnqO55z54
|
||||||
|
38XOIP3t3eOt+JFugiJDblZCAI/fdzhxCAmqzyU0QZOR3Yl8B/d/8g1PQjPAObiG
|
||||||
|
F+spskYpIXZ0U+YNne4PWThhk0tMgq2rJUovQ6kCGjCnPnRR41UWBkGciXfvOR39
|
||||||
|
BbrBK4wsBTRmrM3Hvs41sZlYkIc6mS/PEs1H7gId8vKt3BGqTHN39+qv6aoSwbi8
|
||||||
|
GaNSRSuuMRsQnnUXBzgilXEnWA2oYncSD8pcorPDAe/gaRNV5+/dpQJrYjbYig==
|
||||||
|
=8rxb
|
||||||
|
-----END PGP MESSAGE-----
|
||||||
9
env/smbcredentials.gpg
vendored
Normal file
9
env/smbcredentials.gpg
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
-----BEGIN PGP MESSAGE-----
|
||||||
|
|
||||||
|
hF4DAAAAAAAAAAASAQdAvYM4C8bwyey5d33bXjxKnWe0dIsnk0j5KTpe3TzrLHUw
|
||||||
|
xWF1m3TwpgyRA6LiRHukJ9McoNwRQ7xCdp6XSF+7crNBQWj64/fm1fVymBcv5EkK
|
||||||
|
0ngBJ3I46PcNoVfjCh+1PmSzHFh3ahLU8u95FCL+IbvIrD0DdzntdNAthFSaiHuH
|
||||||
|
DrXiHhGkxuRj0UHi95DF3xi6ODrvC56xTg1jWKzzB+/LuZ6GKSPYd3u/iYmPn76y
|
||||||
|
wiFck8SezOvP0o71tcLa56SQgzSBiDTHL3A=
|
||||||
|
=8OSr
|
||||||
|
-----END PGP MESSAGE-----
|
||||||
56
repos
Executable file
56
repos
Executable file
@@ -0,0 +1,56 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
DEST="$HOME/dev"
|
||||||
|
dry_run_flag="0"
|
||||||
|
|
||||||
|
log() {
|
||||||
|
if [[ $dry_run_flag == "1" ]]; then
|
||||||
|
echo "[DRY RUN]: $*"
|
||||||
|
else
|
||||||
|
echo "$*"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
clone() {
|
||||||
|
local src=${1:-""}
|
||||||
|
local dest=${2:-$DEST}
|
||||||
|
log "Cloning '$src' in '$dest'"
|
||||||
|
if [[ $dry_run_flag == "0" ]]; then
|
||||||
|
pushd "$dest" || exit 1 &>/dev/null
|
||||||
|
(
|
||||||
|
git clone "$src"
|
||||||
|
)
|
||||||
|
popd &>/dev/null
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
install-psychrometrics() {
|
||||||
|
log "Installing psychrometrics cli."
|
||||||
|
if [[ $dry_run_flag == "0" ]]; then
|
||||||
|
local src="$DEST/psychrometrics-cli"
|
||||||
|
pushd "$src" || exit 1 &>/dev/null
|
||||||
|
(
|
||||||
|
./install-linux.sh
|
||||||
|
)
|
||||||
|
popd &>/dev/null
|
||||||
|
rm -rf "$src"
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
##### MAIN #####
|
||||||
|
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
if [[ $1 =~ ^-d ]] || [[ $1 =~ ^--dry ]]; then
|
||||||
|
dry_run_flag="1"
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
mkdir -p "$DEST/sites" &>/dev/null
|
||||||
|
clone "git@github.com:m-housh/mhoush.com.git" "$DEST/sites"
|
||||||
|
clone "git@github.com:swift-psychrometrics/psychrometrics-cli.git" && install-psychrometrics
|
||||||
31
runs/after/calendar
Executable file
31
runs/after/calendar
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
DEV_ENV=${DEV_ENV:-""}
|
||||||
|
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"}
|
||||||
|
|
||||||
|
install() {
|
||||||
|
|
||||||
|
[[ -z $DEV_ENV ]] && echo -e "\e[031m[ERROR]:\e[0m 'DEV_ENV' not set." && exit 1
|
||||||
|
|
||||||
|
# Clone and build qcal locally, as it didn't work for me when downloading from the aur.
|
||||||
|
mkdir ~/pkgbuilds &>/dev/null
|
||||||
|
git clone https://github.com/psic4t/qcal.git ~/pkgbuilds/qcal
|
||||||
|
pushd ~/pkgbuilds/qcal &>/dev/null || exit 1
|
||||||
|
(
|
||||||
|
make && sudo make install
|
||||||
|
)
|
||||||
|
popd &>/dev/null || exit 1
|
||||||
|
|
||||||
|
# Decrypt and copy configuration file for qcal.
|
||||||
|
mkdir "$XDG_CONFIG_HOME"/qcal &>/dev/null
|
||||||
|
gpg --output "$XDG_CONFIG_HOME"/qcal/config.json --decrypt "$DEV_ENV"/env/qcal/config.json.gpg
|
||||||
|
}
|
||||||
|
|
||||||
|
uninstall() {
|
||||||
|
sudo rm /usr/local/bin/qcal
|
||||||
|
rm -rf ~/pkgbuilds/qcal
|
||||||
|
}
|
||||||
|
|
||||||
|
arg=${1:-""}
|
||||||
|
[[ $arg == "install" ]] && install
|
||||||
|
[[ $arg == "uninstall" ]] && uninstall
|
||||||
18
runs/after/jellyfin-tui
Executable file
18
runs/after/jellyfin-tui
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
DEV_ENV=${DEV_ENV:-""}
|
||||||
|
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"}
|
||||||
|
|
||||||
|
install() {
|
||||||
|
[[ -z $DEV_ENV ]] && echo "[ERROR]: DEV_ENV not set" && exit 1
|
||||||
|
mkdir -p "$XDG_CONFIG_HOME"/jellyfin-tui &>/dev/null
|
||||||
|
gpg --output "$XDG_CONFIG_HOME"/jellyfin-tui/config.yaml --decrypt "$DEV_ENV"/env/jellyfin-tui/config.gpg
|
||||||
|
}
|
||||||
|
|
||||||
|
uninstall() {
|
||||||
|
rm -rf ~/.config/jellyfin-tui
|
||||||
|
}
|
||||||
|
|
||||||
|
arg=${1:-""}
|
||||||
|
[[ $arg == "install" ]] && install
|
||||||
|
[[ $arg == "uninstall" ]] && uninstall
|
||||||
@@ -8,25 +8,29 @@ set -o pipefail
|
|||||||
# installed yet.
|
# installed yet.
|
||||||
SCRIPTS="${DEV_ENV}/env/.local/scripts"
|
SCRIPTS="${DEV_ENV}/env/.local/scripts"
|
||||||
|
|
||||||
|
_ensure_mount() {
|
||||||
|
local line=${1:-""}
|
||||||
|
local mount=${2:-""}
|
||||||
|
if [[ -n $line ]] && [[ -d $mount ]]; then
|
||||||
|
if sudo cat /etc/fstab | grep -vq "$line"; then
|
||||||
|
log " Setting up nas mount."
|
||||||
|
# sudo mkdir -p $mount &>/dev/null
|
||||||
|
echo "$line" | sudo tee --append /etc/fstab
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo mount -a ||
|
||||||
|
log --warning "You will need to make sure this computer's ip is in the allow list, then run 'sudo mount -a'"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
_setup-mounts() {
|
_setup-mounts() {
|
||||||
local line="nas.housh.dev:/var/nfs/shared/michael_share /mnt/michael nfs defaults 0 0"
|
|
||||||
if sudo cat /etc/fstab | grep -vq "$line"; then
|
sudo mkdir -p /mnt/{michael,customers} &>/dev/null
|
||||||
log " Setting up nas mount."
|
mkdir -p "$HOME/work" &>/dev/null
|
||||||
sudo mkdir -p /mnt/michael &>/dev/null
|
|
||||||
echo "$line" | sudo tee --append /etc/fstab
|
_ensure_mount "nas.housh.dev:/var/nfs/shared/michael_share /mnt/michael nfs defaults 0 0" /mnt/michael
|
||||||
sudo systemctl daemon-reload
|
_ensure_mount "//nas.housh.dev/michael_share/work $HOME/work cifs credentials=$HOME/.config/.smbcredentials,uid=$(id -u),gid=$(id -g),iocharset=utf8 0 0" "$HOME/work"
|
||||||
sudo mount -a ||
|
_ensure_mount "nas.housh.dev:/var/nfs/shared/Customer_Share /mnt/customers nfs defaults 0 0" /mnt/customers
|
||||||
log --warning "You will need to make sure this computer's ip is in the allow list, then run 'sudo mount -a'"
|
|
||||||
fi
|
|
||||||
line="nas.housh.dev:/var/nfs/shared/Customer_Share /mnt/customers nfs defaults 0 0"
|
|
||||||
if sudo cat /etc/fstab | grep -vq "$line"; then
|
|
||||||
log " Setting up nas mount."
|
|
||||||
sudo mkdir -p /mnt/customers &>/dev/null
|
|
||||||
echo "$line" | sudo tee --append /etc/fstab
|
|
||||||
sudo systemctl daemon-reload
|
|
||||||
sudo mount -a ||
|
|
||||||
log --warning "You will need to make sure this computer's ip is in the allow list, then run 'sudo mount -a'"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_setup-kanata() {
|
_setup-kanata() {
|
||||||
@@ -65,7 +69,9 @@ _setup-home-dir() {
|
|||||||
log " Setting up home directory."
|
log " Setting up home directory."
|
||||||
rm -rf "$HOME/Desktop" &>/dev/null
|
rm -rf "$HOME/Desktop" &>/dev/null
|
||||||
mkdir "$HOME/{containers,dev}" &>/dev/null
|
mkdir "$HOME/{containers,dev}" &>/dev/null
|
||||||
mkdir -p "$HOME/work/consults" &>/dev/null
|
mkdir -p "$HOME/work" &>/dev/null
|
||||||
|
gpg --decrypt --output "$HOME/.config/.smbcredentials" "$DEV_ENV/env/smbcredentials.gpg"
|
||||||
|
chmod 600 "$HOME/.config/.smbcredentials"
|
||||||
}
|
}
|
||||||
|
|
||||||
install() {
|
install() {
|
||||||
|
|||||||
3
runs/calendar
Normal file
3
runs/calendar
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
go
|
||||||
|
gnome-calendar
|
||||||
|
gnome-keyring
|
||||||
1
runs/jellyfin-tui
Executable file
1
runs/jellyfin-tui
Executable file
@@ -0,0 +1 @@
|
|||||||
|
jellyfin-tui
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
# Packages to install / uninstall with this run
|
# Packages to install / uninstall with this run
|
||||||
catppuccin-gtk-theme-mocha
|
catppuccin-gtk-theme-mocha
|
||||||
|
cifs-utils
|
||||||
kanata
|
kanata
|
||||||
nwg-look
|
nwg-look
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
|
|||||||
Reference in New Issue
Block a user