Commit graph

17 commits

Author SHA1 Message Date
William Carroll
11d8336733 Support custom fish prompt
Today I wrote myself a custom fish prompt. It's mostly what I'd like, but I'd
like to finely tune it a bit. I'd like to create a separate repository to
release this. In that repository, I'll explain why I wrote this.
2020-03-04 19:49:45 +00:00
William Carroll
ef2ce90aa7 Consolidate fish configuration
Months ago when I was revisiting Nix, I decided to nixify my fish
configuration. This was a useful learning exercise. I've had two config.fish
files floating around this repository ever since then. I sometimes update one
and other times I update the other. I'm consolidating these files into one, so I
that this is no longer as issue.
2020-03-01 22:32:24 +00:00
William Carroll
fc8283ff6e Define briefcase alias to cd into my monorepo
Defining an alias in my config.fish makes me realize that I should prune many of
my abbreviations and change the ones that remain into aliases.
2020-02-12 17:01:12 +00:00
William Carroll
185fa0dda5 Escape sub-shell in config.fish to prevent evaluation
`stack path --local-doc-root` gets evaluated when I create a shell, which is not
what I intended.
2020-02-07 11:01:24 +00:00
William Carroll
0009ba2d71 Drop support for dkish
dkish was an idea to quickly create REPLs for all sorts of languages like
Haskell, Elixir, Clojure. I haven't used these, and if I started wanting these
with my newfound comfort with Nix, I think I'd reach for that instead.
2020-02-07 11:01:24 +00:00
William Carroll
7c2933f3c3 Support hgwhat alias
Support a Mercurial alias for listing the files that have changed on a
particular branch.

This commit is particularly noisy because I reformatted the above aliases to
align with the new width.
2020-02-05 14:41:20 +00:00
William Carroll
837cfe07c7 Rename dotfiles -> briefcase
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-31 15:27:48 +00:00
William Carroll
d28690d814 Remove PAGER prefix from hgst abbreviation
1. This isn't correct fish syntax.
2. I'm not sure that I need this.
2020-01-28 11:35:02 +00:00
William Carroll
fb51c8b458 Support nix-eval fish function
Wrapping the `nix eval` incantation in a fish function for two reasons:
1. Document that this is how to evaluate Nix from a file.
2. Provide a more ergonomic way of evaluating Nix from a file.
2020-01-27 11:39:02 +00:00
William Carroll
16dfa55df7 Ensure EDITOR and similar variables work with EXWM setup
After some confusion about my `emacsclient` is currently working as
expected. Perhaps it always did. I had `emacs --daemon` in my
`~/.xsessionrc.shared` for awhile, which may have confused
`emacsclient`. Whatever happened, I'm glad it's working now.
2020-01-22 21:13:06 +00:00
William Carroll
2640397131 Drop support for nix_find fish function
This function was causing problems with my Emacs. For example, when I ran
`wpc/find-file`, which is bound <leader>f and a KBD that I call frequently, the
internals would startup fish with my configuration file. Then `nix_find
autojump` would fail and the entire command would error. To make things worse,
the error was a bit opaque.

TODO: Why do certain commands `counsel-projectile-find-file` startup fish and
load my configuration file? I'd prefer it used something like bash and didn't
attempt to load a configuration file since that would most likely slow things
down.
2020-01-17 10:56:21 +00:00
William Carroll
2515304c77 Prefer eval to source for direnv in config.fish
Calling `source` on `(direnv hook fish)` was creating startup problems with
fish. These problems leaked into a few of my Emacs file-searching commands as
well, which was pretty irritating for awhile. I'm still unsure of the
differences between `eval` and `source`. I'm moving on for now.
2020-01-17 10:56:21 +00:00
William Carroll
7175d230c2 Nixify fish configuration
This isn't 100% usable, but it works. You can build it with `nix-env` and then
run it with `wpcarros-fish`.
2020-01-17 10:56:21 +00:00
William Carroll
73e988c298 Define nix_find command in fish
Defining a function for outputting the /nix/store path to a package built with
Nix.
2020-01-06 15:25:25 +00:00
William Carroll
7ae17daa98 Drop support for i3
While I first switched to EXWM warily and thinking it would only be temporary,
it seems like this switch is here to stay. It turns out that EXWM was exactly
the integration I've been looking for. How serendipitous it that I found it when
I did.

Thank you, @tazjin.
2020-01-06 15:25:25 +00:00
William Carroll
7bb4201905 Support more fish abbr's for git
I'm sure that there is a fish package that supports git aliases or
abbreviations. This time, I'm preferring to write my own.

Side note: The more that I use fish's abbreviations, the less that I like them
-- at least for the way in which I'm using them.
2020-01-06 15:25:25 +00:00
William Carroll
f739534203 Support fish shell!
After some back-and-forth, I'm trialing fish shell instead of zsh as my default
shell. For now, I'm porting the aliases.zsh into config.fish -- defining them as
abbreviations instead of aliases; this preference may change. See the commentary
in config.fish for more information.

A spent a lot of time in zsh and built much configuration, so supporting fish
may take considerable time. Here's some work that remains:

TODO:
- Port functions.zsh
- Port variables.zsh
- Port zle.zsh
2019-12-24 15:21:34 +00:00