add helix configs, organize

This commit is contained in:
bullshar-k
2026-10-04 21:28:24 -04:00
parent de686a6507
commit 8822de718c
12 changed files with 67 additions and 0 deletions

83
laptop/bashrc Normal file
View File

@@ -0,0 +1,83 @@
# So both have export
export PATH=/home/shark/.opencode/bin:$PATH
# Status display theming
BOLD='\e[1m'
DIM='\e[2m'
RESET='\e[0m'
RED='\e[31m'
GREEN='\e[32m'
YELLOW='\e[33m'
CYAN='\e[36m'
MAGENTA='\e[35m'
header() {
local title="$1" width pad
width=51
pad=$(( width - ${#title} - 6 ))
printf "${CYAN}┌──${BOLD} %s ${RESET}${CYAN}" "$title"
for ((i=0; i < pad; i++)); do printf '─'; done
printf "┐${RESET}\n"
}
footer() {
local i
printf "${CYAN}"
for ((i=0; i<50; i++)); do printf '─'; done
printf "┘${RESET}\n"
}
battery_status() {
local pct full now color
pct=$(cat /sys/class/power_supply/BAT0/capacity 2>/dev/null) || { echo " No battery found"; return; }
full=$(cat /sys/class/power_supply/BAT0/energy_full 2>/dev/null)
now=$(cat /sys/class/power_supply/BAT0/energy_now 2>/dev/null)
if (( pct <= 20 )); then color="$RED"
elif (( pct <= 60 )); then color="$YELLOW"
else color="$GREEN"
fi
printf " Level: ${BOLD}${color}%s%%${RESET}\n" "$pct"
[ -n "$full" ] && [ -n "$now" ] && printf " Energy: ${DIM}%s / %s Wh${RESET}\n" "$now" "$full"
}
tunnel_status() {
local output
output=$(ip -br a show 2>/dev/null | while IFS= read -r line; do
case "$line" in
*mullvad*|*wg*|*tun*|*us*|*nl*)
local iface="${line%% *}" rest="${line#* }"
printf " ${BOLD}${MAGENTA}%-10s${RESET} %s\n" "$iface" "$rest"
;;
esac
done)
if [ -z "$output" ]; then
echo " No tunnel interfaces found"
else
printf '%s\n' "$output"
fi
}
show_status() {
echo
header "TUNNEL STATUS"
tunnel_status
footer
echo
header "BATTERY STATUS"
battery_status
footer
}
# aliases (minus my SSH aliases for different servers)
alias batt="cat /sys/class/power_supply/BAT0/capacity"
alias bat="batcat"
# diff configs for DE or TTY
if [ -n "$DISPLAY" ] || [ -n "$WAYLAND_DISPLAY" ]; then
[ -f ~/.bashrc_de ] && . ~/.bashrc_de
else
[ -f ~/.bashrc_tty ] && . ~/.bashrc_tty
fi

2
laptop/bashrc_de Normal file
View File

@@ -0,0 +1,2 @@
fastfetch --config paleofetch
eval "$(starship init bash)"

3
laptop/bashrc_tty Normal file
View File

@@ -0,0 +1,3 @@
fastfetch --config paleofetch
alias obsd="micro /home/shark/Documents/L1/tty.md"
show_status

9
laptop/grub Normal file
View File

@@ -0,0 +1,9 @@
# run 'update-grub' afterwards to update /boot/grub/grub.cfg.
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`( . /etc/os-release && echo ${NAME} )`
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_pstate=active amd_prefcore=enable pcie_aspm.policy=powersupersave pcie_aspm=force"
GRUB_CMDLINE_LINUX=""

11
laptop/powersave_ctl.txt Normal file
View File

@@ -0,0 +1,11 @@
sudo systemctl disable --now bluetooth.service # if you don't use BT daily
sudo systemctl disable --now cups.service # if you don't print
sudo systemctl disable --now cups-browsed.service
sudo systemctl disable --now ModemManager.service # if no WWAN/cellular
sudo systemctl disable --now avahi-daemon.service # mDNS, rarely needed
sudo systemctl disable --now colord.service # color profile mgmt
# User services (in DE):
systemctl --user disable --now gvfs-gphoto2-volume-monitor.service # cameras
systemctl --user disable --now gvfs-mtp-volume-monitor.service # MTP/phones
systemctl --user disable --now obex.service # BT file transfer

69
laptop/tlp.conf Normal file
View File

@@ -0,0 +1,69 @@
CPU_SCALING_GOVERNER_ON_AC=performance
CPU_SCALING_GOVERNER_ON_BAT=powersave
CPU_BOOST_ON_AC=1
CPU_BOOST_ON_BAT=0
CPU_HWP_DYN_BOOST_ON_AC=1
CPU_HWP_DYN_BOOST_ON_BAT=0
ENERGY_PREF_POLICY_ON_AC=balance_performance
ENERGY_PREF_POLICY_ON_BAT=power
CPU_MAX_PERF_ON_AC=100
CPU_MAX_PERF_ON_BAT=30
CPU_BOOST_HWP_ON_AC=40
CPU_BOOST_HWP_ON_BAT=1
RADEON_DPM_PERF_LEVEL_ON_AC=auto
RADEON_DPM_PERF_LEVEL_ON_BAT=low
RADEON_DPM_STATE_ON_AC=performance
RADEON_DPM_STATE_ON_BAT=battery
DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wwan"
ENABLE_LAPTOP_MODE_ON_AC=0
ENABLE_LAPTOP_MODE_ON_BAT=1
MAX_LOST_WORK_SECS_ON_BAT=120
MAX_LOST_WORK_SECS_ON_AC=15
VM_WRITEBACK_ON_BAT=1
VM_DIRTY_RATIO_ON_BAT=40
SCHED_POWERSAVE_ON_AC=0
SCHED_POWERSAVE_ON_BAT=1
PLATFORM_PROFILE_ON_AC=balanced
PLATFORM_PROFILE_ON_BAT=low-power
RUNTIME_PM_ON_BAT=auto
RUNTIME_PM_ALL=1
USB_AUTOSUSPEND=1
USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
SOUND_POWER_SAVE_ON_AC=0
SOUND_POWER_SAVE_ON_BAT=1
SOUND_POWER_SAVE_CONTROLLER=Y
WIFI_PWR_ON_AC=off
WIFI_PWR_ON_BAT=on
PCIE_ASPM_ON_BAT=powersupersave
DISK_DEVICES="nvme0n1"
DISK_IOSCHED="mq-deadline"
DISK_SPINDOWN_TIMEOUT_ON_BAT="0"
MEM_SLEEP_ON_AC=s2idle
MEM_SLEEP_ON_BAT=s2idle
DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wwan wifi"
DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wwan"
RESTORE_DEVICE_STATE_ON_STARTUP=1