summaryrefslogtreecommitdiffstats
path: root/configs/bash
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2025-07-17 12:00:05 +0200
committertv <tv@krebsco.de>2025-07-17 12:04:47 +0200
commit34ea4cacef3c12a45d774cff652651557d422161 (patch)
tree18d622bef31fc7074b5e0f89348b67a07266985d /configs/bash
parentb2bc4253dc57a42b9a05aa1feea878cde24d2f2b (diff)
xextras: init with net-current-desktop
Diffstat (limited to 'configs/bash')
-rw-r--r--configs/bash/default.nix13
1 files changed, 1 insertions, 12 deletions
diff --git a/configs/bash/default.nix b/configs/bash/default.nix
index 0ec6bf0..70c94da 100644
--- a/configs/bash/default.nix
+++ b/configs/bash/default.nix
@@ -23,18 +23,7 @@
case $UID in
${mylib.shell.escape (toString config.krebs.users.tv.uid)})
if test ''${SHLVL-1} = 1 && test -n "''${DISPLAY-}"; then
- _CURRENT_DESKTOP_NAME=''${_CURRENT_DESKTOP_NAME-$(
- ${pkgs.xorg.xprop}/bin/xprop -notype -root \
- 32i _NET_CURRENT_DESKTOP \
- 8s _NET_DESKTOP_NAMES \
- |
- ${pkgs.gnused}/bin/sed -r 's/.* = //;s/"//g;s/, /\a/g' |
- {
- read -r _NET_CURRENT_DESKTOP
- IFS=$'\a' read -ra _NET_DESKTOP_NAMES
- echo "''${_NET_DESKTOP_NAMES[$_NET_CURRENT_DESKTOP]}"
- }
- )}
+ _CURRENT_DESKTOP_NAME=''${_CURRENT_DESKTOP_NAME-$(${pkgs.xextras}/bin/net-current-desktop)}
case $_CURRENT_DESKTOP_NAME in
hrm)
cd ~/hrm