emacs packages, omf, fish config, wakatime, setup

This commit is contained in:
Hedy Li 2021-08-16 19:37:45 +08:00
parent 515353207a
commit 0e37266a43
Signed by: hedy
GPG Key ID: B51B5A8D1B176372
10 changed files with 112 additions and 18 deletions

View File

@ -63,7 +63,7 @@
:init
(savehist-mode))
;; A few more useful configurations...
;; Pasted from vertico
(use-package emacs
:init
;; Add prompt indicator to `completing-read-multiple'.
@ -85,7 +85,9 @@
;; Enable recursive minibuffers
(setq enable-recursive-minibuffers t))
;; End of straight?
(straight-use-package 'diminish)
;; End of straight stuff hopefully
(global-wakatime-mode)
;;(setq dracula-use-24-bit-colors-on-256-colors-terms t)
@ -98,7 +100,20 @@
(global-hl-line-mode 1)
(set-face-background hl-line-face "gray13")
;; Sometimes I disable this so I can experience how inefficient emacs's default
;; editting experience.
;; Sometimes I disable this so I can experience how inefficient emacs's default editting experience is
(require 'evil)
(evil-mode 1)
;; Modules
;; Force the load path thing at the head to reduce startup time
;; People have both lisp and site-lisp. what the heck. I'll name it modules just because.
(defun update-load-path (&rest _)
"Update `load-path'."
(dolist (dir '("modules"))
(push (expand-file-name dir user-emacs-directory) load-path)))
;; I have no idea if I need the add subdirs to load path thingy (see centaur emacs)
(advice-add #'pckage-initialize :after #'update-load-path)
(update-load-path)
(require 'init-highlight)

View File

@ -1,11 +1,10 @@
bass 'export GEM_HOME=$HOME/gems'
if command -sq links
bass 'export BROWSER=links'
else
bass 'export BROWSER=w3m'
end
source ~/.config/fish/config_local.fish
source ~/.aliases
bass 'export GPG_TTY=$(tty)'
set -x TERM xterm-256color
# Environment variables
for line in (cat ~/.exportenvs)
bass $line
end
if test -f ~/.config/fish/config_local.fish
source ~/.config/fish/config_local.fish
end

4
.config/omf/bundle Normal file
View File

@ -0,0 +1,4 @@
package bass
package pj
package z
theme default

1
.config/omf/channel Normal file
View File

@ -0,0 +1 @@
stable

1
.config/omf/theme Normal file
View File

@ -0,0 +1 @@
default

View File

@ -8,3 +8,4 @@
.ssh/config
cert.pem
key.pem
.wakatime.cfg

9
.exportenvs Normal file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
export EDITOR=nv
export DOOMDIR=~/.config/doom/
export EMACSDIR=~/.doomemacs/
export BROWSER=w3m
export FILEMAN=ranger
export TERM=xterm-256color
export GPG_TTY=$(tty)

Binary file not shown.

View File

@ -1,10 +1,53 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
echo "First you need chemacs"
if [ -d ~/.emacs.d ]; then
echo ".emacs.d already exists!"
echo "What would you like to do?"
cat <<EOF
1. Remove dir and continue to installing chemacs to .emacs.d
2. Backup the dir in .emacs.d.bak and install chemacs [DEFAULT]
3. Skip installation of chemacs (you should make sure .emacs.d already contains chemacs!)
4. Same as above but run git pull in the directory
5. ABORT
EOF
read -p "1/2/3/4/5> " option
case option in
"1")
rm -rf ~/.emacs.d;;
"2"|"")
mv ~/.emacs.d ~/.emacs.d.bak;;
"3")
echo "Skipping chemacs installation"
install_chemacs=no;;
"4")
cd ~/.emacs.d
git pull
install_chemacs=no;;
"5")
echo "aborting :)"
exit;;
*)
echo "Unknown option!"
exit 1;;
esac
fi
if [[ $install_chemacs != "no" ]]; then
echo "Installing chemacs"
mkdir ~/.emacs.d
cd ~/.emacs.d
git clone https://github.com/plexus/chemacs2 .
fi
read -p "Run emacs? [y/N] " run
if [[ run == "y" ]]; then
cd
emacs .config/emacsd/
fi
### DOOM ###
echo "First you need chemacs..."
echo "clone chemacs into .emacs.d"
echo "then try running emacs and see if default emacs runs ok, not sure how packages will work though"
echo
echo "Wanna try doom?"
echo "Clone doom into .doomemacs"
echo "set up your fish_user_paths and run doom sync"
echo "run edoom and get ready for some errors probably lol"

21
_scripts/setup-fish Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
if ! command -v fish &> /dev/null; then
echo "I'm sorry but I can't help you install fish"
echo "Please install fish before running this script lol"
exit 1
fi
echo -n "Setting up fish_user_paths..."
cat <<END | fish
set -Ux fish_user_paths /home/hedy/bin /home/hedy/local/bin /home/hedy/.local/bin /home/hedy/go/bin $fish_user_paths
END
echo "done"
echo Maybe add ~/local/share/man to manpath but I forgot how as of writing
echo
echo "Installing oh my fish"
curl -L https://get.oh-my.fish | fish
echo "Installing oh my fish packages"
omf install