Move to Framework laptop

This commit is contained in:
Michael Bradley 2025-05-05 20:10:40 -04:00
parent 361615266c
commit 33baf06deb
Signed by: MichaelBradley
SSH key fingerprint: SHA256:BKO2eI2LPsCbQS3n3i5SdwZTAIV3F1lHezR07qP+Ob0
15 changed files with 48 additions and 31 deletions

7
.gitignore vendored
View file

@ -1,2 +1,9 @@
# TOML Bombadil templating directory
.dots/
# Python cache files
**/__pycache__/
# Program-specific cache files
nvim/lazy-lock.json
zsh/.zcompdump*

View file

@ -12,4 +12,4 @@ The dotfiles are managed with [TOML Bombadil](https://github.com/oknozor/toml-bo
* Make sure changed wallpaper is new
* EWW
* Create radar widget
* Make separate scroll jumps for `chonk` vs `hpomen`?
* Make separate scroll jumps for `chonk` vs `framework`?

View file

@ -29,11 +29,11 @@ swww-daemon = { source = "systemd/swww-daemon.service", target = ".config/system
btop = { source = "btop", target = ".config/btop", direct = true }
dunst = { source = "dunst", target = ".config/dunst", direct = true }
eww = { source = "eww", target = ".config/eww", direct = true }
eww = { source = "eww", target = ".config/eww" }
fastfetch = { source = "fastfetch", target = ".config/fastfetch", direct = true }
gtk2 = { source = "gtk/gtk-2.0", target = ".config/gtk-2.0", direct = true }
gtk3 = { source = "gtk/gtk-3.0", target = ".config/gtk-3.0", direct = true }
git = { source = "git/config", target = ".config/git/config", direct = true }
git = { source = "git/config", target = ".config/git/config" }
hypr = { source = "hypr", target = ".config/hypr" }
kitty = { source = "kitty", target = ".config/kitty", direct = true }
lsd = { source = "lsd", target = ".config/lsd", direct = true }
@ -49,5 +49,5 @@ zsh = { source = "zsh", target = ".config/zsh", direct = true }
[profiles.chonk]
vars = [ "chonk.toml" ]
[profiles.hpomen]
vars = [ "hpomen.toml" ]
[profiles.framework]
vars = [ "framework.toml" ]

View file

@ -62,8 +62,13 @@
(defwidget eth []
(network_speed :label "󰈀" :interface "enp6s0"))
(defwidget wlan []
(network_speed :label "" :interface "wlo1"))
(network_speed :label ""
{% if host.name == "chonk" %}
:interface "wlo1"
{% else %}
:interface "wlp1s0"
{% endif %}
))
(defwidget date []
(tooltip
@ -217,7 +222,7 @@
(right_bar))
(defwindow laptop
:monitor "0x1502"
:monitor 0
:geometry (geometry :x "0px"
:y "4px"
:width "1912px"

View file

@ -1,7 +1,8 @@
#!/bin/env sh
FULL="$(cat /sys/class/power_supply/BAT0/charge_full)"
NOW="$(cat /sys/class/power_supply/BAT0/charge_now)"
BATTERY='/sys/class/power_supply/BAT1/'
FULL="$(cat "${BATTERY}/charge_full")"
NOW="$(cat "${BATTERY}/charge_now")"
CHARGE=$((100*NOW/FULL))
CHARGE_ICONS="󰂎󰁺󰁻󰁼󰁽󰁾󰁿󰂀󰂁󰂂󰁹"
@ -9,7 +10,7 @@ CHARGE_ICON_INDEX=$((CHARGE/10))
CHARGE_ICON="${CHARGE_ICONS:CHARGE_ICON_INDEX:1}"
charging() {
case "$(cat /sys/class/power_supply/BAT0/status)" in
case "$(cat "${BATTERY}/status")" in
"Charging") echo "true";;
*) echo "false";;
esac

2
framework.toml Normal file
View file

@ -0,0 +1,2 @@
[host]
name = "framework"

View file

@ -1,7 +1,11 @@
[user]
name = Michael Bradley
email = michaelmbrad@gmail.com
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAVoIshBPg9X4mVzqEx75qXJiVoNC9mbj0bOAMq5ZUIw
{% if host.name == "chonk" %}
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICgufkBHFXb36n7RpzkNZviLEWiHPRoM4Ip+k2mm2x1w
{% else %}
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPO2DlWJWyN5/KlDmCN8zvkVCVvFgz2r5AZeGTYju8Xq
{% endif %}
[init]
defaultBranch = main
@ -26,3 +30,9 @@
helper = !/usr/bin/gh auth git-credential
[credential "https://gist.github.com"]
helper = !/usr/bin/gh auth git-credential
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true

View file

@ -1,2 +0,0 @@
[host]
name = "hpomen"

View file

@ -1,4 +1,5 @@
monitor = eDP-1, 1920x1080@60, 0x0, 1
monitor = eDP-1, 2880x1920@120, 0x0, 1.5
monitor = DP-3, 1920x1080@60, -1920x0, 1
decoration {
blur {
@ -24,9 +25,10 @@ misc {
gestures {
workspace_swipe = true
workspace_swipe_min_fingers = true
workspace_swipe_distance = 100
workspace_swipe_distance = 300
workspace_swipe_invert = false
workspace_swipe_forever = true
workspace_swipe_cancel_ratio = 0.1
}
workspace = 1, monitor:eDP-1, default:true

View file

@ -1,7 +1,7 @@
{% if host.name == "chonk" %}
source = ~/.config/hypr/chonk.conf
{% else %}
source = ~/.config/hypr/hpomen.conf
source = ~/.config/hypr/framework.conf
{% endif %}
monitor = , preferred, auto, 1

View file

@ -1,6 +1,6 @@
@theme "arthuredit"
configuration {
modi: "drun,calc,emoji:/usr/bin/rofimoji -a copy -f emojis math,audio:/home/mbradley/dev/rofi-audio/rofi-audio.py";
modi: "drun,calc,emoji:/usr/bin/rofimoji -a copy -f emojis math";
icon-theme: "Papirus";
show-icons: true;
run-command: "uwsm-app -- {cmd}";

View file

@ -2,5 +2,4 @@
hyprctl keyword unbind CONTROL,TAB
rofi -show
#rofi -show drun file-browser-extended calc emoji
hyprctl keyword bind 'CONTROL,TAB,exec,/home/mbradley/.config/rofi/launch.sh'

View file

@ -9,6 +9,7 @@ if [ ! -f "$API_KEY_FILE" ]; then
fi
CACHE_DIR="$XDG_CACHE_HOME/openweathermap"
mkdir -p "$CACHE_DIR"
#RAIN_FILE="$CACHE_DIR/rain"
#if [ ! -f "$RAIN_FILE" ] || [ "$(find "$RAIN_FILE" -mmin +10)" ]; then

View file

@ -7,13 +7,15 @@ from socket import gethostname
from subprocess import run
MONITORS = ("DP-1", "DP-2", "HDMI-A-1") if gethostname() == "chonk" else ("eDP-1",)
IS_DESKTOP = gethostname() == "chonk"
MONITORS = ("DP-1", "DP-2") if IS_DESKTOP else ("eDP-1",)
ANGLE_TRANSITION_ARGS = [
"--transition-type", "wipe",
"--transition-angle", "30",
"--transition-step", "45",
"--transition-fps", "60",
"--transition-fps", "165" if IS_DESKTOP else "120",
]
IMMEDIATE_TRANSITION_ARGS = [
"--transition-step", "255",

View file

@ -11,13 +11,3 @@ export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export QT_QPA_PLATFORMTHEME=qt6ct
export ELECTRON_OZONE_PLATFORM_HINT=wayland
{% if host.name == "hpomen" %}
export GBM_BACKEND=nvidia-drm
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export LIBVA_DRIVER_NAME=nvidia
export __GL_VRR_ALLOWED=0
export WLR_NO_HARDWARE_CURSORS=1
export NVD_BACKEND=direct
{% endif %}