about summary refs log tree commit diff
path: root/emacs/.emacs.d/wpc
AgeCommit message (Collapse)AuthorFilesLines
2020-02-14 Prefer newest-to-oldest sortingWilliam Carroll1-0/+3
The default sorting order of results from notmuch.el are in oldest-to-newest. This prefers the opposite.
2020-02-14 Define notmuch KBDsWilliam Carroll1-0/+44
Until I have more opinions about my workflow with notmuch, I will redefine the KBDs from Gmail that I'm comfortable with. While not many KBDs are defined here, evil-collection defines dozens, many of which I find reasonable; those that I disagree with, I've unbound in this commit. Composing emails in notmuch feels similar to writing a commit message with magit. I want to be able to type :x or :wq, but these commands don't DWIM. For magit, I'd like that behavior to be the same as `C-c C-c`; not surprisingly, for notmuch, I'd like the same. I've bound :x to do this for notmuch. I'd like to define a macro that can easily define buffer-local evil-ex commands for particular modes. This should lower the cost of defining evil-ex commands and hopefully convince me to support some of this desired behavior.
2020-02-14 Configure saved searches for notmuchWilliam Carroll1-1/+25
Mimmicking the "action", "review", and "waiting" labels that I had in Gmail using the equivalent labels as tags in notmuch.
2020-02-14 Support list/xs-distinct-by?William Carroll1-0/+5
Supporting a predicate to check that all elements in a list are distinct after applying a transformation function to them.
2020-02-12 Disable auto pairing parens, brackets, quotesWilliam Carroll1-3/+0
I don't see much value in this tool for my workflow.
2020-02-11 Support cycling through display configurationsWilliam Carroll2-18/+31
Today when I opened my laptop, I wasn't sure if it was powered off or on because the display was blank. Thankfully the volume was muted and the LED indicator was on, which informed me that the laptop was powered on. This saved me from unnecessarily rebooting. What happened was that last night I was working from home and using my external monitor. Usually I enable my external display and disable my laptop display. But when I left for work this morning, I unplugged the HDMI cable from my laptop without disabling the external display or enabling the laptop display. I noticed a XF86 button on my laptop entitled XF86Display. I figured that this could be a nice place to bind a key to toggle my laptop display on or off. At the last minute, I had the idea to just cycle through all possible display configurations that I use; there are only three anyways. When dealing with more than two states, I realized I should use a cycle to model the configuration states. Now I'm thinking that I should be using cycles to model toggles as well - instead of just using a top-level variable that I `setq` over. I haven't refactored existing toggles to be cycles, but I am excited about this new keybinding. This commit additionally: - Moves keybindings out of display.el and into keybindings.el - Conditionally sets KBDs if using work laptop
2020-02-10 Support C-k for upward movement in ivy-switch-buffer-mapWilliam Carroll1-1/+1
Without these KBDs, C-k kills buffers. As an evil-mode user, I expect C-k to move upwards. As such, adding the `ivy-switch-buffer-map` to my existing ivy KBDs that handle a similar use-case. Note: I'm unsure why the KBDs in evil-collection didn't cover this.
2020-02-10 Disable ido-modeWilliam Carroll1-2/+0
For awhile I had a mixture of ivy and ido. Disabling ido and preferring ivy for everything.
2020-02-10 Support vterm-mgt.elWilliam Carroll3-4/+145
I enjoyed using term-switcher so much that I ended up adopting vterm as my primary terminal. After reaching for vterm as often as I did, I realized that I would enjoy supporting cycling through instances, creating new instances, deleting existing instances, renaming instances. Thus spawned vterm-mgt.el. I'm particularly excited about the KBD to toggle between vterm instances and source code buffers.
2020-02-10 Support cycle/{append,remove}William Carroll1-1/+49
Supporting these functions was a little tricky. For example, how should we handle calling cycle/remove on the item that is currently focused? After attempting to be clever, I decided to just set the value to nil and let the consumer decide what is best for them. I can always support a more opinionated version that fallsback to previous-index if previous-index is set. But until I have a better idea of how I'm going to consume this, I think nil is the best option.
2020-02-08 Support cycle/focus-itemWilliam Carroll1-0/+5
I oftentimes call `cycle/focus` and pass `(lambda (a) (equal a b))`. This function should tighten up my code.
2020-02-08 Support cycle/empty?William Carroll1-9/+19
Add predicate for determining if a cycle contains items. Updated cycle/{new,from-list} to support setting current-index to nil when a consumer calls it with an empty list.
2020-02-07 Remove assertions that prelude/executable-exists?William Carroll4-12/+0
I'm in the midst of transitioning onto a few new tools. My previous workflow just used `nix-env` to install *some* packages. I didn't have a prescribed methodology for which packages I would install using `nix-env` and which ones I would install using `sudo apt-get install`. Sometimes if a package would be available in my aptitude repositories, I'd use that; other times when it wasn't available I'd use `nix-env`. One complication about being on gLinux intead of NixOS is that some packages (e.g. nixpkgs.terminator) is available via `nix-env -iA nixpkgs.terminator`, but the installation won't actually run on my gLinux. In these instances, I would install terminator from the aptitude repositories. Then @tazjin introduced me to his Emacs configuration that he builds using Nix. What appealed to me about his built Emacs is that it worked as expected on either a NixOS machine and on gLinux (and presumably on other non-NixOS machines as well). A setup towards which I'm working is to own one or a few NixOS machines whose configurations are entirely managed with Nix. On devices like my work machines, which cannot run NixOS, I can build as much of the software that I need using Nix and attempt to minimize the ad hoc configuration either with shell scripts, python, golang, or more Nix code... it's clear that I still don't have a clear idea of how that part will work. For now, I'm adopting nix, nix-env, lorri, direnv, and weening off of aptitude as much as I can. Things are a bit messy, but my general trend feels positive. Stay tuned for more updates.
2020-02-05 Temporarily disable initialization codeWilliam Carroll1-1/+0
My Emacs initialization fails for a few reasons, which I haven't prioritized time to investigate yet: - Some OCaml deps are absent - godoc is absent
2020-02-05 Further configure Go toolingWilliam Carroll1-0/+23
- Prefer goimports to gofmt. goimports calls gofmt; it also adds and removes dependencies. - Assert the presence of goimports, godoc, godef - KBD godef to M-. - Support the M-x compile command for calling `go build -v`
2020-02-03 Remove KBDs supporting undesired Ergodox configurationWilliam Carroll2-15/+1
I mistakenly mapped one of my dual-function keys on my Ergodox to send Shift+CMD instead of CMD. When some of my Emacs keybindings weren't firing, I noticed that the key event they received was some like `C-S-s-<char>` instead of say `C-s-<char>`. As a quick fix, I duplicated each of my keybindings that relied on the CMD key to support Shift+CMD as well until I remapped the key on my Ergodox. This morning, I remapped the Shift+CMD key to CMD, so I'm bidding adieu to this code.
2020-02-02 Add KBDs to vtermWilliam Carroll1-0/+14
Support pasting and scrolling.
2020-02-02 Support emacs fn for rebuilding wpcarros-emacsWilliam Carroll1-0/+7
Call `M-x` `nix/rebuild-emacs` to build and link `wpcarros-emacs`.
2020-02-02 Support focusing EXWM X-application buffersWilliam Carroll2-5/+31
Press `<M-escape.` to display a list of buffers hosting X applications. Use `completing-read` to select and focus one of these. See the function docs and TODOs for more information.
2020-02-02 Blacklist additional non-source-code modesWilliam Carroll1-0/+2
I don't want vterm buffers or magit buffers showing up when I cycle throw buffers.
2020-02-02 Attempt to debug xrandr behavior in display.elWilliam Carroll1-1/+1
Currently, after I connect my monitor to my laptop, I run `display/enable-4k`, which will use `xrandr` to enable the display. The scaling of the enabled display is not what I expect. So I've habituated re-running the same function, `display/enable-4k`, which scales the display and meets my expectations. What's strange is that if instead of running `display/enable-4k` the first time from Emacs, I call `xrandr ...` from a terminal, this enables the display and scales it properly on the first invocation. I'm unsure how to explain this behavior. It's possible that a environment variable is set properly in the terminal that isn't set in my Emacs, but this is just a guess. I'm going to using a different invocation in display.el that explicitly passes the monitors dimensions. Let's see if that works.
2020-02-02 Support KBDs for term-switcher packageWilliam Carroll2-92/+6
To facilitate transitioning from using `terminator` to using `vterm`, I'm defining some KBDs that I hope will help me habituate my usage of `vterm`.
2020-02-02 Support timestring.elWilliam Carroll1-0/+71
Quickly access strings that encode time is various formats. See the module docs in timestring.el for more information.
2020-01-31 Support golangWilliam Carroll1-0/+23
I decided to start writing go code for scripts instead of python. I think this will be a learning opportunity for me and should increase the integrity of my scripts by adding some static type checking.
2020-01-31 Rename dotfiles -> briefcaseWilliam Carroll5-25/+25
Renaming my mono-repo briefcase. I first introduced this commit in master, but it introduced a bug where one of two things would happen: 1. Emacs wouldn't start and would crash X. 2. Emacs would start but my keyboard wouldn't work. I learned some valuable debugging skills in the process. Here are some of them: When my keyboard was broken, I wanted to control my computer using my laptop. Thankfully this is possible by using `x2x`, which forward X events from the SSH client to the SSH host. ```shell > # I'm unsure if this is the *exact* command > ssh -X desktop x2x -west :0.0 ``` Git commit-local bisecting. I didn't need to do a `git bisect` because I knew which commit introduced the bug; it was HEAD, master. But -- as you can see from the size of this commit -- there are many changes involved. I wanted to binary search through the changes, so I did the following workflow using `magit`: - git reset --soft HEAD^ - git stash 1/2 of the files changed - re-run `nix-env -f ~/briefcase/emacs -i` - restart X session - If the problem persists, the bug exists in the non-stashed files. Repeat the process until you find the bug. In my case, the bug was pretty benign. Calling `(exwm/switch "Dotfiles")` at the bottom of `window-manager.el` was failing because "Dotfiles" is the name of a non-existent workspace; it should've been `(exwm/switch "Briefcase")`. There may have been more problems. I changed a few other things along the way, including exposing the env vars BRIEFCASE to `wpcarros-emacs` inside of `emacs/default.nix`. The important part is that this was a valuable learning opportunity, and I'm glad that I'm walking away from the two days of "lost productivity" feeling actually productive.
2020-01-30 Move move .emacs.d out of configs/sharedWilliam Carroll102-0/+11033
Moving all of my Emacs-related files into their own directory at the root of this repository.