tecosaur / emacs-everywhere

Mirror of https://git.tecosaur.net/tec/emacs-everywhere
GNU General Public License v3.0
551 stars 56 forks source link

Auto-detect fails on X if loginctl lists multiple sessions for a given user #51

Closed elizagamedev closed 2 years ago

elizagamedev commented 2 years ago

Due to some issue with my system configuration, logout/logins were not closing my loginctl sessions, and this has unintentionally led me to discover a bug with emacs-everywhere. When multiple sessions are open, the output of the command...

loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}') -p Type

Fails to correctly evaluate to "x11". Adding a | tail -1 after fixes this.

tecosaur commented 2 years ago

That's a funny edge case, thanks for the fix!