aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib_apps.sh
diff options
context:
space:
mode:
authorDon Williams <don.e.williams@gmail.com>2026-01-30 08:07:08 -0500
committerDon Williams <don.e.williams@gmail.com>2026-01-30 08:07:08 -0500
commit949fd81f3f6fe89b297261b9d3c839423d172ba5 (patch)
tree07d478d3bee7c1305ae1be964594caf9b7441501 /scripts/lib_apps.sh
parentc236929377350588d47bff1b510bfa7878bec290 (diff)
NixOS relative pathing wasn't working `cwd` issues
``` [OK] You have chosen < 1440p resolution. sed: can't read config/kitty/kitty.conf: No such file or directory [NOTE] By default, KooL's Dots are configured in 24H clock format. [ACTION] Do you want to change to 12H (AM/PM) clock format? (y/n): y sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory [WARN] hyprlock template not found; skipping 12H lock format edits [NOTE] Express mode: skipping SDDM 12H edits to avoid sudo prompts. [OK] 12H format set on waybar clocks succesfully. [INFO] - copying dotfiles first part cp: cannot stat 'config/fastfetch': No such file or directory [OK] - Copy completed for fastfetch [INFO] Found kitty config found in ~/.config/ [ACTION] Do you want to replace kitty config? (y/n): y [NOTE] - Backed up kitty to /home/dwilliams/.config/kitty-backup-back-up_0130_0800. cp: cannot stat 'config/kitty': No such file or directory [OK] - Replaced kitty with new configuration. [INFO] Found rofi config found in ~/.config/ [ACTION] Do you want to replace rofi config? (y/n): y [NOTE] - Backed up rofi to /home/dwilliams/.config/rofi-backup-back-up_0130_0800. cp: cannot stat 'config/rofi': No such file or directory [OK] - Replaced rofi with new configuration. ``` On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: copy.sh modified: scripts/lib_apps.sh modified: scripts/lib_copy.sh modified: scripts/lib_prompts.sh
Diffstat (limited to 'scripts/lib_apps.sh')
-rw-r--r--scripts/lib_apps.sh31
1 files changed, 19 insertions, 12 deletions
diff --git a/scripts/lib_apps.sh b/scripts/lib_apps.sh
index dd918b02..900ca801 100644
--- a/scripts/lib_apps.sh
+++ b/scripts/lib_apps.sh
@@ -3,8 +3,9 @@
enable_asusctl() {
local log="$1"
+ local base="${DOTFILES_DIR:-.}"
if command -v asusctl >/dev/null 2>&1; then
- local OVERLAY_SA="config/hypr/configs/Startup_Apps.conf"
+ local OVERLAY_SA="$base/config/hypr/configs/Startup_Apps.conf"
mkdir -p "$(dirname "$OVERLAY_SA")"
touch "$OVERLAY_SA"
grep -qx 'exec-once = rog-control-center' "$OVERLAY_SA" || echo 'exec-once = rog-control-center' >>"$OVERLAY_SA"
@@ -13,8 +14,9 @@ enable_asusctl() {
enable_blueman() {
local log="$1"
+ local base="${DOTFILES_DIR:-.}"
if command -v blueman-applet >/dev/null 2>&1; then
- local OVERLAY_SA="config/hypr/configs/Startup_Apps.conf"
+ local OVERLAY_SA="$base/config/hypr/configs/Startup_Apps.conf"
mkdir -p "$(dirname "$OVERLAY_SA")"
touch "$OVERLAY_SA"
grep -qx 'exec-once = blueman-applet' "$OVERLAY_SA" || echo 'exec-once = blueman-applet' >>"$OVERLAY_SA"
@@ -23,33 +25,36 @@ enable_blueman() {
enable_ags() {
local log="$1"
+ local base="${DOTFILES_DIR:-.}"
if command -v ags >/dev/null 2>&1; then
echo "${INFO:-[INFO]} AGS detected - enabling in startup and refresh scripts" 2>&1 | tee -a "$log"
- local OVERLAY_SA="config/hypr/configs/Startup_Apps.conf"
+ local OVERLAY_SA="$base/config/hypr/configs/Startup_Apps.conf"
mkdir -p "$(dirname "$OVERLAY_SA")"
touch "$OVERLAY_SA"
grep -qx 'exec-once = ags' "$OVERLAY_SA" || echo 'exec-once = ags' >>"$OVERLAY_SA"
- sed -i '/#ags -q && ags &/s/^#//' config/hypr/scripts/RefreshNoWaybar.sh
- sed -i '/#ags -q && ags &/s/^#//' config/hypr/scripts/Refresh.sh
+ sed -i '/#ags -q && ags &/s/^#//' "$base/config/hypr/scripts/RefreshNoWaybar.sh"
+ sed -i '/#ags -q && ags &/s/^#//' "$base/config/hypr/scripts/Refresh.sh"
fi
}
enable_quickshell() {
local log="$1"
+ local base="${DOTFILES_DIR:-.}"
if command -v qs >/dev/null 2>&1; then
echo "${INFO:-[INFO]} Quickshell detected - enabling in startup and refresh scripts" 2>&1 | tee -a "$log"
- local OVERLAY_SA="config/hypr/configs/Startup_Apps.conf"
+ local OVERLAY_SA="$base/config/hypr/configs/Startup_Apps.conf"
mkdir -p "$(dirname "$OVERLAY_SA")"
touch "$OVERLAY_SA"
grep -qx 'exec-once = qs' "$OVERLAY_SA" || echo 'exec-once = qs' >>"$OVERLAY_SA"
- sed -i '/#pkill qs && qs &/s/^#//' config/hypr/scripts/RefreshNoWaybar.sh
- sed -i '/#pkill qs && qs &/s/^#//' config/hypr/scripts/Refresh.sh
+ sed -i '/#pkill qs && qs &/s/^#//' "$base/config/hypr/scripts/RefreshNoWaybar.sh"
+ sed -i '/#pkill qs && qs &/s/^#//' "$base/config/hypr/scripts/Refresh.sh"
fi
}
ensure_keybinds_init() {
local log="$1"
- local OVERLAY_SA="config/hypr/configs/Startup_Apps.conf"
+ local base="${DOTFILES_DIR:-.}"
+ local OVERLAY_SA="$base/config/hypr/configs/Startup_Apps.conf"
mkdir -p "$(dirname "$OVERLAY_SA")"
if ! grep -qx 'exec-once = \$scriptsDir/KeybindsLayoutInit.sh' "$OVERLAY_SA"; then
echo 'exec-once = $scriptsDir/KeybindsLayoutInit.sh' >>"$OVERLAY_SA"
@@ -59,9 +64,10 @@ ensure_keybinds_init() {
install_terminal_configs() {
local log="$1"
+ local base="${DOTFILES_DIR:-.}"
# Ghostty
- local GHOSTTY_SRC="config/ghostty/ghostty.config"
+ local GHOSTTY_SRC="$base/config/ghostty/ghostty.config"
local GHOSTTY_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/ghostty"
local GHOSTTY_DEST="$GHOSTTY_DIR/config"
if [ -f "$GHOSTTY_SRC" ]; then
@@ -75,7 +81,7 @@ install_terminal_configs() {
fi
# WezTerm
- local WEZTERM_SRC="config/wezterm/wezterm.lua"
+ local WEZTERM_SRC="$base/config/wezterm/wezterm.lua"
local WEZTERM_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/wezterm"
local WEZTERM_DEST="$WEZTERM_DIR/wezterm.lua"
if [ -f "$WEZTERM_SRC" ]; then
@@ -88,10 +94,11 @@ install_terminal_configs() {
choose_default_editor() {
local log="$1"
+ local base="${DOTFILES_DIR:-.}"
local editor_set=0
update_editor() {
local editor=$1
- sed -i "s/#env = EDITOR,.*/env = EDITOR,$editor #default editor/" config/hypr/UserConfigs/01-UserDefaults.conf
+ sed -i "s/#env = EDITOR,.*/env = EDITOR,$editor #default editor/" "$base/config/hypr/UserConfigs/01-UserDefaults.conf"
echo "${OK:-[OK]} Default editor set to ${MAGENTA:-}$editor${RESET:-}." 2>&1 | tee -a "$log"
}
if command -v nvim &>/dev/null; then
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage