complete-computing-environment/emacs-helper-scripts.org

44 lines
1.4 KiB
Org Mode

:PROPERTIES:
:ID: 20220723T195008.486029
:ROAM_ALIASES: "Emacs shortcuts scripts"
:END:
#+TITLE: Emacs Helper Scripts
#+ARCOLOGY_KEY: cce/helper-scripts
#+ARCOLOGY_ALLOW_CRAWL: t
When using [[id:20220421T100313.402598][XMonad]] it's really easy to set up custom global keybindings declaratively.
=home-manager= lets me write easy little functions to do this. Previously I had them stuffed away in my [[id:20220208T210931.535051][report on krohnkite]], but they should be hoisted out; I don't define them in the [[id:20220421T100313.402598][XMonad]] module because i used these in other tiling WMs too and sometimes in krunner...
#+AUTO_TANGLE: t
#+ARROYO_HOME_MODULE: hm/emacs-helpers.nix
#+begin_src nix :tangle ~/arroyo-nix/hm/emacs-helpers.nix
{ pkgs, ... }:
{
home.packages = [
(pkgs.writeScriptBin "meta-x" ''
#!${pkgs.stdenv.shell}
emacsclient -c --eval "(execute-extended-command nil)"
'')
(pkgs.writeScriptBin "org-journal" ''
#!${pkgs.stdenv.shell}
emacsclient -c --eval "(cce/open-journal)"
'')
(pkgs.writeScriptBin "org-agenda" ''
#!${pkgs.stdenv.shell}
emacsclient -c --eval "(cce/org-agenda)"
'')
(pkgs.writeScriptBin "org-todos" ''
#!${pkgs.stdenv.shell}
emacsclient -c --eval "(cce/org-agenda t)"
'')
(pkgs.writeScriptBin "mastodon-el" ''
#!${pkgs.stdenv.shell}
emacsclient -c --eval "(cce/my-mastodon.el-buffers)"
'')
];
}
#+end_src