diff options
| -rw-r--r-- | emacs/emacs.bash | 14 | ||||
| -rw-r--r-- | scripts/p7s/bash.py | 6 |
2 files changed, 16 insertions, 4 deletions
diff --git a/emacs/emacs.bash b/emacs/emacs.bash index 055e15ec..7be90a38 100644 --- a/emacs/emacs.bash +++ b/emacs/emacs.bash @@ -1,5 +1,13 @@ # source this file from your bash startup script -alias emacs="emacs --emacs-appimage-run-as emacsclient --create-frame -t" -export ALTERNATE_EDITOR="" -export EDITOR="emacs --emacs-appimage-run-as emacsclient -t" +test -f /usr/bin/emacs && { + alias emacs="emacsclient --create-frame -t" + export ALTERNATE_EDITOR="" + export EDITOR="emacsclient -t" +} + +test -f ~/.local/bin/emacs && { + alias emacs="emacs --emacs-appimage-run-as emacsclient --create-frame -t" + export ALTERNATE_EDITOR="" + export EDITOR="emacs --emacs-appimage-run-as emacsclient -t" +} diff --git a/scripts/p7s/bash.py b/scripts/p7s/bash.py index b5c503d0..22271dee 100644 --- a/scripts/p7s/bash.py +++ b/scripts/p7s/bash.py @@ -7,8 +7,12 @@ def is_ubuntu_2204(): return platform.freedesktop_os_release().get("VERSION_CODENAME") == "jammy" +def is_ubuntu_2404(): + return platform.freedesktop_os_release().get("VERSION_CODENAME") == "noble" + + def setup_bash(): - if is_ubuntu_2204(): + if is_ubuntu_2204() or is_ubuntu_2404(): # clone the handy ~/.bashrc.d from Fedora bash_aliases = pathlib.Path.home() / ".bash_aliases" bash_aliases.write_text(textwrap.dedent(""" |
