I figure I would share this one more time. The thing is so handy I put it on my desktop but the original is blinding white and 1.5:1 aspect ratio. This is a quick recolor and resize to 16:9. There is a 90px margin on top that is sized for the GNOME header so that the content remains visible. Sorry if this post seems redundant. For me, having this reminder to keep trying to use Emacs is just the motivation I need to open a file in Emacs instead of just using gedit quickly.

bonus tip!

On Fedora 40, if you have darkmode set to the default in GNOME, GNU Emacs does not follow the darkmode styling directive for the menu bar. I spent forever trying to make this work in darkmode. If the app is launched using $ GTK_THEME=Adwaita:dark emacs it will start with the menu bar set to dark mode.

However there is a script that actually launches Emacs in /user/bin/emacs-desktop. If you open that file and modify it by adding export GTK_THEME=Adwaita:dark emacs just before the last line, it will launch with darkmode enabled. This is the entire contents of that file:

#!/usr/bin/sh

# The pure GTK build of emacs is not supported on X11, so try to avoid
# using if there is an alternative.

if [ "$XDG_SESSION_TYPE" = 'x11' ]; then
    case "$(readlink -f /usr/bin/emacs)" in
    */emacs-*.*-pgtk)
        if type emacs-gtk+x11 >/dev/null; then
            exec emacs-gtk+x11 "$@"
        elif type emacs-lucid >/dev/null; then
            exec emacs-lucid "$@"
        fi
        ;;
    esac
fi

export GTK_THEME=Adwaita:dark emacs
exec emacs "$@"

I’m not claiming it is the right way. It just worked when I tried it.

  • Buildout@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    2 months ago

    I would recommend learning vim in that case. I’m not sure about the availability of vi(m)/emacs on the systems you remote into, but if I was a betting man I’d say vi is more available than vim is more available than emacs. But if you learn vim and are stuck with vi one time it’s still better than nano (for me, but I’m sure you’re quite good with nano). Another benefit that extends outside of your text editing experience is that vim motions are offered out of the box for a lot of linux utilities (less) with no setup, or can be trivially added (tmux), which gives you familiar keybinding almost everywhere as well as an improved ergonomic (and likely speed) advantage.

    • j4k3@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      I would argue that the only relevant small system is busybox now. That has Vi and Nano IIRC. In most cases, there is likely a way of mounting that system on a host machine or using Emacs to dial into the target. The evilmode bindings are Vim bindings for Emacs.

      When I’m stuck with such a system, the editor is the least of my concerns. All the other Bash commands missing in Ash are the part I struggle with. Like the first thing I’m doing is recreating basic compgen and tree functional equivalents in scripts so that I know my available tools and can navigate the unknown. The lack of manpages, and full flag options descriptions are crippling.