From 7b512256eccc1cf64b97b79b177d52a8418caa1d Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Fri, 25 Aug 2023 18:11:02 -0400 Subject: [PATCH] Enable pgtk and native comp for emacs. --- .../editors_emacs/options | 44 +++++++++++++++++++ .../waybar_available_memory_freebsd.bash | 15 +++++-- 2 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 ansible/roles/poudriere/files/poudriere.d/13amd64-default-framework-options/editors_emacs/options diff --git a/ansible/roles/poudriere/files/poudriere.d/13amd64-default-framework-options/editors_emacs/options b/ansible/roles/poudriere/files/poudriere.d/13amd64-default-framework-options/editors_emacs/options new file mode 100644 index 0000000..7b81841 --- /dev/null +++ b/ansible/roles/poudriere/files/poudriere.d/13amd64-default-framework-options/editors_emacs/options @@ -0,0 +1,44 @@ +# This file is auto-generated by 'make config'. +# Options for emacs-29.1,3 +_OPTIONS_READ=emacs-29.1,3 +_FILE_COMPLETE_OPTIONS_LIST=ACL DBUS GNUTLS GSETTINGS HARFBUZZ JSON LCMS2 M17N MAILUTILS MODULES NATIVECOMP OTF PGTK SCROLLBARS SOURCES SQLITE3 THREADS TREESITTER XFT XIM XML XWIDGETS GFILE KQUEUE ALSA OSS GTK2 GTK3 MOTIF XAW XAW3D CAIRO GIF JPEG MAGICK PNG SVG TIFF WEBP XPM +OPTIONS_FILE_SET+=ACL +OPTIONS_FILE_SET+=DBUS +OPTIONS_FILE_SET+=GNUTLS +OPTIONS_FILE_SET+=GSETTINGS +OPTIONS_FILE_SET+=HARFBUZZ +OPTIONS_FILE_SET+=JSON +OPTIONS_FILE_SET+=LCMS2 +OPTIONS_FILE_UNSET+=M17N +OPTIONS_FILE_SET+=MAILUTILS +OPTIONS_FILE_SET+=MODULES +OPTIONS_FILE_SET+=NATIVECOMP +OPTIONS_FILE_SET+=OTF +OPTIONS_FILE_SET+=PGTK +OPTIONS_FILE_SET+=SCROLLBARS +OPTIONS_FILE_SET+=SOURCES +OPTIONS_FILE_SET+=SQLITE3 +OPTIONS_FILE_SET+=THREADS +OPTIONS_FILE_SET+=TREESITTER +OPTIONS_FILE_UNSET+=XFT +OPTIONS_FILE_UNSET+=XIM +OPTIONS_FILE_SET+=XML +OPTIONS_FILE_UNSET+=XWIDGETS +OPTIONS_FILE_UNSET+=GFILE +OPTIONS_FILE_SET+=KQUEUE +OPTIONS_FILE_UNSET+=ALSA +OPTIONS_FILE_SET+=OSS +OPTIONS_FILE_UNSET+=GTK2 +OPTIONS_FILE_SET+=GTK3 +OPTIONS_FILE_UNSET+=MOTIF +OPTIONS_FILE_UNSET+=XAW +OPTIONS_FILE_UNSET+=XAW3D +OPTIONS_FILE_SET+=CAIRO +OPTIONS_FILE_SET+=GIF +OPTIONS_FILE_SET+=JPEG +OPTIONS_FILE_UNSET+=MAGICK +OPTIONS_FILE_SET+=PNG +OPTIONS_FILE_SET+=SVG +OPTIONS_FILE_SET+=TIFF +OPTIONS_FILE_SET+=WEBP +OPTIONS_FILE_UNSET+=XPM diff --git a/ansible/roles/waybar/files/waybar_scripts/waybar_available_memory_freebsd.bash b/ansible/roles/waybar/files/waybar_scripts/waybar_available_memory_freebsd.bash index 8041755..2817947 100644 --- a/ansible/roles/waybar/files/waybar_scripts/waybar_available_memory_freebsd.bash +++ b/ansible/roles/waybar/files/waybar_scripts/waybar_available_memory_freebsd.bash @@ -9,15 +9,24 @@ SLEEP_INTERVAL=${SLEEP_INTERVAL:-30} while true; do # TODO: Why not vm.stats.vm.v_page_size ? Are these the same? - page_size=$(sysctl -n hw.pagesize) - free_pages=$(sysctl -n vm.stats.vm.v_free_count) - free_bytes=$((page_size * free_pages)) total_pages=$(sysctl -n vm.stats.vm.v_page_count) + page_size=$(sysctl -n hw.pagesize) + active=$(sysctl -n vm.stats.vm.v_active_count) + inactive=$(sysctl -n vm.stats.vm.v_inactive_count) + in_use_pages=$((active + inactive)) + free_pages=$((total_pages - in_use_pages)) + free_bytes=$((page_size * free_pages)) free_percent=$((100 * free_pages / total_pages)) text="" if [ $free_bytes -ge $((1024 * 1024 * 1024)) ]; then text="$((free_bytes / 1024 / 1024 / 1024)) GiB" + elif [ $free_bytes -ge $((1024 * 1024)) ]; then + text="$((free_bytes / 1024 / 1024)) MiB" + elif [ $free_bytes -ge 1024 ]; then + text="$((free_bytes / 1024)) KiB" + else + text="$(free_bytes) B" fi tooltip="${free_percent}%"