My dotfiles
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

13 řádky
383 B

  1. #!/bin/sh
  2. #Detect the name of the display in use
  3. display=":$(find /tmp/.X11-unix/* | sed 's#/tmp/.X11-unix/X##' | head -n 1)"
  4. #Detect the user using such display
  5. user="$(who | grep "tty1" | awk '{print $1}' | head -n 1)"
  6. #Detect the id of the user
  7. uid="$(id -u "$user")"
  8. sudo -u "$user" DISPLAY="$display" DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/"$uid"/bus notify-send "$@"