Browse Source

Add custom command 'g' to run 'startx' from anywhere

main
parent
commit
704b3d8b00
Signed by: chris GPG Key ID: 3025DCBD46F81C0F
  1. 39
      README.org
  2. 5
      modules/emacs.nix

39
README.org

@ -1647,6 +1647,11 @@ epkgs.exwm
pkgs.arandr pkgs.arandr
pkgs.nitrogen pkgs.nitrogen
pkgs.autorandr pkgs.autorandr
(pkgs.writeShellScriptBin "g" ''
pushd $HOME
startx
popd /dev/null
'')
#+END_SRC #+END_SRC
I wanted to leave ~(exwm-enable)~ out of my Emacs configuration (which does no harm anyways). This can be called when using the daemon to start [[https://github.com/ch11ng/exwm][EXWM]]. I wanted to leave ~(exwm-enable)~ out of my Emacs configuration (which does no harm anyways). This can be called when using the daemon to start [[https://github.com/ch11ng/exwm][EXWM]].
@ -1717,6 +1722,23 @@ home.file.".xinitrc" = {
(dotfiles/run-in-background "autorandr --change --force"))) ;; Swap to the next screen config. (dotfiles/run-in-background "autorandr --change --force"))) ;; Swap to the next screen config.
#+END_SRC #+END_SRC
*** Which Key
[[https://github.com/justbur/emacs-which-key][Which Key]] is an [[https://gnu.org/software/emacs/][Emacs]] minor mode that displays the key bindings following your currently entered incomplete command (prefix) in a popup or mini-buffer.
#+NAME: emacs-which-key-package
#+BEGIN_SRC nix
epkgs.which-key
#+END_SRC
#+NAME: emacs-which-key-elisp
#+BEGIN_SRC emacs-lisp
;; Configure `which-key' to see keyboard bindings in the
;; mini-buffer and when using M-x.
(setq which-key-idle-delay 0.0)
(which-key-mode +1)
#+END_SRC
*** General *** General
#+NAME: emacs-general-package #+NAME: emacs-general-package
@ -1767,23 +1789,6 @@ epkgs.general
"s" '((lambda () (interactive) (switch-to-buffer "*scratch*")) :which-key "Scratch")) "s" '((lambda () (interactive) (switch-to-buffer "*scratch*")) :which-key "Scratch"))
#+END_SRC #+END_SRC
*** Which Key
[[https://github.com/justbur/emacs-which-key][Which Key]] is an [[https://gnu.org/software/emacs/][Emacs]] minor mode that displays the key bindings following your currently entered incomplete command (prefix) in a popup or mini-buffer.
#+NAME: emacs-which-key-package
#+BEGIN_SRC nix
epkgs.which-key
#+END_SRC
#+NAME: emacs-which-key-elisp
#+BEGIN_SRC emacs-lisp
;; Configure `which-key' to see keyboard bindings in the
;; mini-buffer and when using M-x.
(setq which-key-idle-delay 0.0)
(which-key-mode +1)
#+END_SRC
*** EWW *** EWW
[[https://emacswiki.org/emacs/eww][Emacs Web Wowser (EWW)]] is a Web browser written in [[https://www.gnu.org/software/emacs/manual/html_node/elisp/index.html][Emacs Lisp]] based on the ~shr.el~ library. It's my primary browser when it comes to text-based browsing. [[https://emacswiki.org/emacs/eww][Emacs Web Wowser (EWW)]] is a Web browser written in [[https://www.gnu.org/software/emacs/manual/html_node/elisp/index.html][Emacs Lisp]] based on the ~shr.el~ library. It's my primary browser when it comes to text-based browsing.

5
modules/emacs.nix

@ -94,6 +94,11 @@ in {
pkgs.arandr pkgs.arandr
pkgs.nitrogen pkgs.nitrogen
pkgs.autorandr pkgs.autorandr
(pkgs.writeShellScriptBin "g" ''
pushd $HOME
startx
popd /dev/null
'')
pkgs.pass pkgs.pass
(pkgs.writeShellScriptBin "pass-init" '' (pkgs.writeShellScriptBin "pass-init" ''
${pkgs.git}/bin/git clone git@git.chrishayward.xyz:chris/passwords /home/chris/.password-store ${pkgs.git}/bin/git clone git@git.chrishayward.xyz:chris/passwords /home/chris/.password-store

Loading…
Cancel
Save