diff --git a/modules/common/development/debug-tools.nix b/modules/common/development/debug-tools.nix index 24fa805706..61152eb252 100644 --- a/modules/common/development/debug-tools.nix +++ b/modules/common/development/debug-tools.nix @@ -36,26 +36,25 @@ in # For lsusb: usbutils - # Useful in NetVM - ethtool + ethtool # Basic monitors + iftop iotop traceroute dig evtest - # For deleting Linux Boot Manager entries in automated testing - efibootmgr + efibootmgr # Performance testing + speedtest-cli iperf tree file - # to build ghaf on target git diff --git a/modules/desktop/graphics/ewwbar.nix b/modules/desktop/graphics/ewwbar.nix index 274c7781c8..d7f0c1a6b9 100644 --- a/modules/desktop/graphics/ewwbar.nix +++ b/modules/desktop/graphics/ewwbar.nix @@ -252,8 +252,8 @@ in :class "keyboard-layout" :halign "center" :valign "center" - (label :text keyboard_layout))) - (defpoll keyboard_layout :interval "1s" "${pkgs.sway}/bin/setxkbmap -query | ${pkgs.gawk}/bin/awk '/layout/{print $2}' | tr a-z A-Z") + (label :text keyboard_layout))) + (defpoll keyboard_layout :interval "1s" "${pkgs.xorg.setxkbmap}/bin/setxkbmap -query | ${pkgs.gawk}/bin/awk '/layout/{print $2}' | tr a-z A-Z") ;; Bluetooth Widget ;; (defwidget bluetooth [] @@ -397,7 +397,7 @@ in :reserve (struts :distance "50px" :side "bottom") :wm-ignore false :windowtype "dock" - :hexpand "true" + :hexpand "false" :vexpand "false" :stacking "fg" :exclusive "true" diff --git a/modules/desktop/graphics/fonts.nix b/modules/desktop/graphics/fonts.nix index b14f5d01dd..fda3967d25 100644 --- a/modules/desktop/graphics/fonts.nix +++ b/modules/desktop/graphics/fonts.nix @@ -11,14 +11,6 @@ let in { config = lib.mkIf labwc.enable { - fonts.packages = builtins.attrValues { - inherit (pkgs) - inter - fira-code-nerdfont - material-icons - jetbrains-mono - hack-font - ; - }; + fonts.packages = builtins.attrValues { inherit (pkgs) inter fira-code-nerdfont hack-font; }; }; } diff --git a/packages/wifi-signal-strength-grpc/default.nix b/packages/wifi-signal-strength-grpc/default.nix deleted file mode 100644 index c23185b731..0000000000 --- a/packages/wifi-signal-strength-grpc/default.nix +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors -# SPDX-License-Identifier: Apache-2.0 -{ - networkmanager, - openssh, - util-linux, - gawk, - coreutils-full, - grpcurl, - jq, - writeShellApplication, - ... -}: -writeShellApplication { - name = "wifi-signal-strength-grpc"; - runtimeInputs = [ - networkmanager - openssh - gawk - util-linux - coreutils-full - grpcurl - jq - ]; - text = '' - NETWORK_STATUS_FILE=/tmp/network-status - - #export DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/ssh_session_dbus.sock - #export DBUS_SYSTEM_BUS_ADDRESS=unix:path=/tmp/ssh_system_dbus.sock - - # Lock the script to reuse - LOCK_FILE=/tmp/wifi-signal.lock - exec 99>"$LOCK_FILE" - flock -w 60 -x 99 || exit 1 - - # Return the result as json format for waybar and use the control socket to close the ssh tunnel. - #trap 'ssh -q -S /tmp/nmcli_socket -O exit ghaf@net-vm && cat "$NETWORK_STATUS_FILE"' EXIT - - # Connect to netvm - #ssh -M -S /tmp/nmcli_socket \ - # -f -N -q ghaf@net-vm \ - # -i /run/waypipe-ssh/id_ed25519 \ - # -o StrictHostKeyChecking=no \ - # -o UserKnownHostsFile=/dev/null \ - # -o StreamLocalBindUnlink=yes \ - # -o ExitOnForwardFailure=yes \ - # -L /tmp/ssh_session_dbus.sock:/run/user/1000/bus \ - # -L /tmp/ssh_system_dbus.sock:/run/dbus/system_bus_socket - #signal0="\UF091F" - #signal1="\UF0922" - #signal2="\UF0925" - #signal3="\UF0928" - #no_signal="\UF092D" - # IP address of netvm - address="192.168.101.1:9000" - ca_cert="/run/givc/ca-cert.pem" - cert="/etc/givc/gui-vm.ghaf-cert.pem" - key="/etc/givc/gui-vm.ghaf-key.pem" - # Get signal strength and ssi - #mapfile -t connection < <(nmcli -f IN-USE,SIGNAL,SSID dev wifi | awk '/^\*/{if (NR!=1) {print $2; print $3}}') - mapfile -t connection < <(grpcurl -plaintext -cacert ''${ca_cert} -cert ''${ca_cert} -key ''${key} ''${address} systemd.WifiService.ListNetwork | jq -r '.[] | select(.inUse) | "\(.signal)\n\(.name)"') - connection[0]=$(if [ -z "''${connection[0]}" ]; then echo "-1"; else echo "''${connection[0]}"; fi) - # Set the icon of signal level - signal_level=$(if [ "''${connection[0]}" -gt 80 ]; then echo "''${signal3}"; elif [ "''${connection[0]}" -gt 60 ]; then echo "''${signal2}"; elif [ "''${connection[0]}" -gt 30 ]; then echo "''${signal1}"; elif [ "''${connection[0]}" -gt 0 ]; then echo "''${signal0};" else echo "''${no_signal}"; fi) - tooltip=$(if [ -z "''${address}" ]; then echo "''${connection[0]}%"; else echo "''${address} ''${connection[0]}%"; fi) - text=$(if [ -z "''${connection[1]}" ]; then echo "No connection"; else echo "''${connection[1]} $signal_level"; fi) - # Save the result in json format - RESULT="{\"percentage\":\"''${connection[0]}\", \"text\":\"''${text}\", \"tooltip\":\"''${tooltip}\", \"class\":\"1\"}" - echo -e "$RESULT">/tmp/network-status - flock -u 99 - ''; -}