diff --git a/.gitignore b/.gitignore index f0c82f0..6a2e583 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,9 @@ +# TOML Bombadil templating directory .dots/ + +# Python cache files **/__pycache__/ + +# Program-specific cache files +nvim/lazy-lock.json +zsh/.zcompdump* diff --git a/README.md b/README.md index 6deecfa..ce21520 100644 --- a/README.md +++ b/README.md @@ -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`? diff --git a/bombadil.toml b/bombadil.toml index a86d25d..48a80a6 100644 --- a/bombadil.toml +++ b/bombadil.toml @@ -29,18 +29,17 @@ 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 } nvim = { source = "nvim", target = ".config/nvim", direct = true } rofi = { source = "rofi", target = ".config/rofi", direct = true } steam = { source = "steam/steam_dev.cfg", target = ".steam/steam/steam_dev.cfg", direct = true } -swaylock = { source = "swaylock", target = ".config/swaylock", direct = true } uwsm = { source = "uwsm", target = ".config/uwsm" } vim = { source = "vim/vimrc", target = ".config/vim/vimrc", direct = true } yazi = { source = "yazi", target = ".config/yazi", direct = true } @@ -49,5 +48,5 @@ zsh = { source = "zsh", target = ".config/zsh", direct = true } [profiles.chonk] vars = [ "chonk.toml" ] -[profiles.hpomen] -vars = [ "hpomen.toml" ] +[profiles.framework] +vars = [ "framework.toml" ] diff --git a/btop/btop.conf b/btop/btop.conf index b88b878..084b5fd 100755 --- a/btop/btop.conf +++ b/btop/btop.conf @@ -1,4 +1,4 @@ -#? Config file for btop v. 1.2.2 +#? Config file for btop v. 1.4.1 #* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes. #* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes" @@ -37,6 +37,9 @@ graph_symbol = "braille" # Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". graph_symbol_cpu = "default" +# Graph symbol to use for graphs in gpu box, "default", "braille", "block" or "tty". +graph_symbol_gpu = "default" + # Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". graph_symbol_mem = "default" @@ -52,8 +55,8 @@ shown_boxes = "proc cpu mem net gpu0" #* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs. update_ms = 1500 -#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu responsive", -#* "cpu lazy" sorts top process over time (easier to follow), "cpu responsive" updates top process directly. +#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct", +#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly. proc_sorting = "cpu lazy" #* Reverse sorting order, True or False. @@ -74,12 +77,21 @@ proc_per_core = False #* Show process memory as bytes instead of percent. proc_mem_bytes = True +#* Show cpu graph for each process. +proc_cpu_graphs = True + #* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate) proc_info_smaps = False #* Show proc box on left side of screen instead of right. proc_left = False +#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop). +proc_filter_kernel = False + +#* In tree-view, always accumulate child process resources in the parent process. +proc_aggregate = False + #* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available. #* Select from a list of detected attributes from the options menu. cpu_graph_upper = "total" @@ -88,6 +100,9 @@ cpu_graph_upper = "total" #* Select from a list of detected attributes from the options menu. cpu_graph_lower = "total" +#* If gpu info should be shown in the cpu box. Available values = "Auto", "On" and "Off". +show_gpu_info = "Auto" + #* Toggles if the lower CPU graph should be inverted. cpu_invert_lower = True @@ -162,6 +177,9 @@ only_physical = True #* Read disks list from /etc/fstab. This also disables only_physical. use_fstab = True +#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool) +zfs_hide_datasets = False + #* Set to true to show available disk space for privileged users. disk_free_priv = False @@ -192,12 +210,45 @@ net_sync = False #* Starts with the Network Interface specified here. net_iface = "" +#* "True" shows bitrates in base 10 (Kbps, Mbps). "False" shows bitrates in binary sizes (Kibps, Mibps, etc.). "Auto" uses base_10_sizes. +base_10_bitrate = "Auto" + #* Show battery stats in top right if battery is present. show_battery = True #* Which battery to use if multiple are present. "Auto" for auto detection. selected_battery = "Auto" +#* Show power stats of battery next to charge indicator. +show_battery_watts = True + #* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG". #* The level set includes all lower levels, i.e. "DEBUG" will show all logging info. log_level = "WARNING" + +#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards. +nvml_measure_pcie_speeds = True + +#* Measure PCIe throughput on AMD cards, may impact performance on certain cards. +rsmi_measure_pcie_speeds = True + +#* Horizontally mirror the GPU graph. +gpu_mirror_graph = True + +#* Custom gpu0 model name, empty string to disable. +custom_gpu_name0 = "" + +#* Custom gpu1 model name, empty string to disable. +custom_gpu_name1 = "" + +#* Custom gpu2 model name, empty string to disable. +custom_gpu_name2 = "" + +#* Custom gpu3 model name, empty string to disable. +custom_gpu_name3 = "" + +#* Custom gpu4 model name, empty string to disable. +custom_gpu_name4 = "" + +#* Custom gpu5 model name, empty string to disable. +custom_gpu_name5 = "" diff --git a/eww/eww.scss b/eww/eww.scss index f8edea8..ffaabfa 100644 --- a/eww/eww.scss +++ b/eww/eww.scss @@ -101,6 +101,10 @@ window, tooltip { color: #00FF7F; } + .hibernate { + color: #7FFF00; + } + .reboot { color: #FF7F00; } diff --git a/eww/eww.yuck b/eww/eww.yuck index 626bc06..179e1e9 100644 --- a/eww/eww.yuck +++ b/eww/eww.yuck @@ -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 @@ -85,10 +90,12 @@ (box :space-evenly false :class "power" (revealer :transition "slideleft" :reveal reveal_power (box :space-evenly true :spacing 2 -; (eventbox :onclick "swaylock" :cursor "pointer" -; (label :text "" :class "lock")) + (eventbox :onclick "loginctl lock-session" :cursor "pointer" + (label :text "" :class "lock")) (eventbox :onclick "systemctl suspend" :cursor "pointer" (label :text "鈴" :class "sleep")) +; (eventbox :onclick "systemctl hibernate" :cursor "pointer" +; (label :text "" :class "hibernate")) (eventbox :onclick "reboot" :cursor "pointer" (label :text "ﰇ" :class "reboot")) (eventbox :onclick "shutdown now" :cursor "pointer" @@ -97,11 +104,6 @@ (stack :selected {reveal_power ? 1 : 0} :transition "crossfade" :same-size true (label :text "" :class "control") (label :text "×" :class "control"))))) -; Unused entries from my Polybar version of this that may end up being useful later -;menu-0-2 = %{F#7FFF00} -;menu-0-2-exec = systemctl hibernate -;menu-0-3 = %{F#00A2ED} -;menu-0-3-exec = grub-reboot "$(rg -i windows /boot/grub/grub.cfg|head -n 1|cut -d "'" -f 2)" && reboot (defvar notifications true) @@ -115,8 +117,8 @@ (defwidget clicker [text command] (eventbox :onclick command :cursor "pointer" :timeout "3600s" (label :text text :class "primary"))) -(defwidget colour_selector [] - (clicker :text "" :command "uwsm-app -- hyprpicker -a")) +;(defwidget colour_selector [] +; (clicker :text "" :command "uwsm-app -- hyprpicker -a")) (defwidget wallpaper [] (clicker :text "󰸉" :command "~/scripts/swww_change.py")) @@ -181,7 +183,7 @@ (systray :pack_direction "ltr" :icon-size 20) (box :class "right" :orientation "h" :space-evenly false :halign "end" (weather)(sep) - (colour_selector)(space) +; (colour_selector)(space) (wallpaper)(sep) (ram)(space) (cpu)(sep) @@ -217,7 +219,7 @@ (right_bar)) (defwindow laptop - :monitor "0x1502" + :monitor 0 :geometry (geometry :x "0px" :y "4px" :width "1912px" diff --git a/eww/scripts/get-battery b/eww/scripts/get-battery index 9ecc89e..7409438 100755 --- a/eww/scripts/get-battery +++ b/eww/scripts/get-battery @@ -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 diff --git a/framework.toml b/framework.toml new file mode 100644 index 0000000..cf4a9b9 --- /dev/null +++ b/framework.toml @@ -0,0 +1,2 @@ +[host] +name = "framework" diff --git a/git/config b/git/config index a92be8c..f30aa1d 100755 --- a/git/config +++ b/git/config @@ -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 diff --git a/hpomen.toml b/hpomen.toml deleted file mode 100644 index 3a35553..0000000 --- a/hpomen.toml +++ /dev/null @@ -1,2 +0,0 @@ -[host] -name = "hpomen" diff --git a/hypr/hpomen.conf b/hypr/framework.conf similarity index 74% rename from hypr/hpomen.conf rename to hypr/framework.conf index 8a072ce..ca6bc11 100644 --- a/hypr/hpomen.conf +++ b/hypr/framework.conf @@ -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 diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf new file mode 100644 index 0000000..6aac63c --- /dev/null +++ b/hypr/hypridle.conf @@ -0,0 +1,34 @@ +general { + lock_cmd = pidof hyprlock || hyprlock + before_sleep_cmd = loginctl lock-session + after_sleep_cmd = hyprctl dispatch dmps on + inhibit_sleep = 0 +} + +listener { + timeout = 120 + on-timeout = brightnessctl -sd amdgpu_bl1 set 66- + on-resume = brightnessctl -rd amdgpu_bl1 +} + +listener { + timeout = 240 + on-timeout = brightnessctl -d amdgpu_bl1 set 0 && brightnessctl -sd chromeos::kbd_backlight set 0 + on-resume = brightnessctl -rd chromeos::kbd_backlight +} + +listener { + timeout = 270 + on-timeout = loginctl lock-session +} + +listener { + timeout = 300 + on-timeout = hyprctl dispatch dpms off + on-resume = hyprctl dispatch dpms on +} + +listener { + timeout = 330 + on-timeout = systemctl suspend +} diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index d5d3d9c..1b8a943 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -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 @@ -97,7 +97,7 @@ bind = SUPER, RETURN, exec, $terminal bind = SUPER SHIFT, Q, killactive, bind = SUPER SHIFT, S, exec, uwsm-app -- env sh ~/scripts/screenshot.sh bind = SUPER SHIFT, C, exec, uwsm-app -- hyprpicker -a -bind = SUPER SHIFT, L, exec, uwsm-app -- swaylock +bind = SUPER, L, exec, uwsm-app -- hyprlock bind = SUPER, F, togglefloating, diff --git a/hypr/hyprlock.conf b/hypr/hyprlock.conf new file mode 100644 index 0000000..529ba0f --- /dev/null +++ b/hypr/hyprlock.conf @@ -0,0 +1,37 @@ +general { + hide_cursor = true + ignore_empty_input = true +} + +background { + monitor = + path = screenshot + blur_passes = 3 + blur_size = 5 +} + +input-field { + monitor = + size = 300, 300 + outline_thickness = 30 + outer_color = rgb(0, 205, 0) + inner_color = rgba(0, 0, 0, 0) + fade_on_empty = false + placeholder_text = + hide_input = true + capslock_color = rgb(205, 0, 0) +} + +label { + monitor = + text = cmd[update:1000] date '+%y/%-m/%-d' + font_size = 20 + position = 0, -250 +} + +label { + monitor = + text = cmd[update:1000] date '+%H:%M:%S' + font_size = 40 + position = 0, 250 +} diff --git a/rofi/config.rasi b/rofi/config.rasi index 3c63950..f744126 100644 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -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}"; diff --git a/rofi/launch.sh b/rofi/launch.sh index 5a4bff3..a4388fd 100755 --- a/rofi/launch.sh +++ b/rofi/launch.sh @@ -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' diff --git a/scripts/get-weather.sh b/scripts/get-weather.sh index d0ba996..a434bfe 100755 --- a/scripts/get-weather.sh +++ b/scripts/get-weather.sh @@ -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 diff --git a/scripts/lib/swww.py b/scripts/lib/swww.py index 7eb5650..394ba01 100644 --- a/scripts/lib/swww.py +++ b/scripts/lib/swww.py @@ -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", diff --git a/scripts/screenshot.sh b/scripts/screenshot.sh index b210fd9..14a8e13 100755 --- a/scripts/screenshot.sh +++ b/scripts/screenshot.sh @@ -1,5 +1,5 @@ #!/bin/env sh -if [ "$(pidof slurp)" = "" ]; then - grimblast copy area +if ! pidof slurp; then + GRIMBLAST_HIDE_CURSOR=0 grimblast copy area fi diff --git a/swaylock/config b/swaylock/config deleted file mode 100644 index b795914..0000000 --- a/swaylock/config +++ /dev/null @@ -1,7 +0,0 @@ -daemonize -indicator-caps-lock -indicator-idle-visible -screenshots -clock -fade-in=1 -effect-blur=10x3 diff --git a/uwsm/env b/uwsm/env index 3037bf3..ce1bbb9 100644 --- a/uwsm/env +++ b/uwsm/env @@ -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 %}