This commit is contained in:
The-Repo-Club 2023-08-02 09:34:21 +01:00
parent 08cd7160a0
commit ba8724c248
No known key found for this signature in database
GPG Key ID: E30EC2FBFB05C44F
4 changed files with 48 additions and 0 deletions

Binary file not shown.

34
localbin/.local/bin/repomacs Executable file
View File

@ -0,0 +1,34 @@
#!/usr/bin/env bash
#-*-coding:utf-8 -*-
#Auto updated?
# Yes
#File:
# repomacs
#Author:
# The-Repo-Club [wayne6324@gmail.com]
#Github:
# https://github.com/The-Repo-Club/
#
#Created:
# Wed 02 August 2023, 09:30:44 AM [GMT+1]
#Modified:
# Wed 02 August 2023, 09:33:35 AM [GMT+1]
#
#Description:
# run emacs in client mode
#
#Dependencies:
# emacs
#
if command -v emacsclient &>/dev/null; then
if ! pgrep -f "emacsclient" >/dev/null; then
(
emacsclient -c
) &
else
echo "repomacs already Running"
fi
else
echo "emacsclient can not be found"
fi

View File

@ -0,0 +1 @@
/home/repo/.config/systemd/user/emacs.service

View File

@ -0,0 +1,13 @@
[Unit]
Description=Emacs text editor
Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
[Service]
Type=forking
ExecStart=/usr/bin/emacs --daemon
ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)"
Environment=SSH_AUTH_SOCK=%t/keyring/ssh
Restart=on-failure
[Install]
WantedBy=default.target