20 lines
779 B
EmacsLisp
20 lines
779 B
EmacsLisp
|
;; Run a terminal in the current folder
|
||
|
;; TODO: Check the command for your terminal emulator for this to work properly
|
||
|
(defun phga/run-terminal-here ()
|
||
|
(interactive "@")
|
||
|
(shell-command (concat "TERM_FROM_EMACS=true alacritty -e sh -c 'cd " default-directory
|
||
|
"; /run/current-system/sw/bin/bash' > /dev/null 2>&1 & disown ")
|
||
|
nil nil))
|
||
|
|
||
|
;; https://gist.github.com/mads-hartmann/3402786
|
||
|
;; Allows for emacs to toggle window "maximization"
|
||
|
(defun toggle-maximize-buffer ()
|
||
|
"Maxmize current buffer, when called again, restore previous buffer setup"
|
||
|
(interactive)
|
||
|
(if (= 1 (length (window-list)))
|
||
|
(jump-to-register '_)
|
||
|
(progn
|
||
|
(window-configuration-to-register '_)
|
||
|
(delete-other-windows))))
|
||
|
|
||
|
(provide 'functions)
|