Commit graph

191 commits

Author SHA1 Message Date
William Carroll
a8704bb54d Define KBDs for ibuffer
I'd like to start using ibuffer more, so I'm making it a more hospitable place
by defining useful KBDs.
2020-10-03 14:51:04 +01:00
William Carroll
990b6278a8 Define KBDs for Info-mode
I took the Info-mode tutorial (finally) and I found some things from
evil-collection that I liked, other things that I didn't like.
2020-10-03 14:50:38 +01:00
William Carroll
4c809ebf59 Set ibuffer's default sort to major-mode
I find this a more intuitive default.
2020-10-03 14:50:10 +01:00
William Carroll
b4b929a55b Define window-manager-swap-workspaces
This is a wrapper around the existing `exwm-workspace-swap` except it's aware of
my `window-manager-workspace` struct.
2020-10-03 14:49:33 +01:00
William Carroll
869bcf3fc8 Define fn for outputting the current workspace's label
This is a useful helper fn, and hopefully something I'll support in my mode line
soon.
2020-10-03 14:49:02 +01:00
William Carroll
8137eed738 Rename workspaces
Prefer "Web Browsing" and "Coding".
2020-10-03 14:48:46 +01:00
William Carroll
174d676c93 Ensure "RET" follows links in Info-mode
Shouldn't this be handled by evil-collection?
2020-10-03 11:01:00 +01:00
William Carroll
fb5952857e Prefer doom-acario-dark theme
I recently looked at the updated Doom themes, and the screenshot for this one
looked appealing. I'm going to give it a try.
2020-10-02 11:30:02 +01:00
William Carroll
204c0beb83 Create a workspace for logs
Now that I have a vertical monitor, I'd like to use it for terminals and logs.
2020-09-29 13:54:41 +01:00
William Carroll
ce61987959 Extend named-workspace struct to include display information
I want to couple my EXWM workspaces with monitors. E.g. - I'd like my "Chatter"
workspace to prefer my `4k-vertical`. This change supports that.

I also did a small amount of formatting, which I don't think belongs in a
separate commit.
2020-09-29 11:21:09 +01:00
William Carroll
fc0c795c4e Debug failed Emacs initialization
My newly minted macro for defining monitors introduced two bugs:
1. Laptop defined its position in terms of 4k-horizontal and 4k-horizontal
   defined its position in terms of laptop, I introduced a circular dependency.
2. The identifier, `laptop-monitor`, which `window-manager.el` depends on, is
   now defined as `laptop`.

A friendly reminder to myself to always test new Emacs builds to make sure that
everything can initialize properly. This is something that my CI should be
automating, but ever since I moved flats, I lost my CI and need to restore it.

This is another reminder to drop into a TTY when Emacs fails to initialize, run
`nix-env --rollback`, then attempt to restart X. But this time, debugging this
entirely from a TTY wasn't so disappointing.
2020-09-29 10:10:24 +01:00
William Carroll
e41ca803c6 Support display-4k-vertical in exwm-randr-workspace-monitor-plist
EXWM needs to know about my newly defined monitor.
2020-09-28 13:43:24 +01:00
William Carroll
831dba20bf Define display-4k-vertical
I recently acquired a new monitor, which I'm orienting vertically for logs,
chats, etc. As such I needed to add more functions, KBDs to wrangle the
setup. To DRY up my code, I define a macro, `display-register`, as a DSL for
supporting new monitors. This:
- defines two functions for enabling and disabling the displays
- defines a constant, `display-<name>`

It's basically just a wrapper around `xrandr`, and that's good enough for now.
2020-09-28 13:41:24 +01:00
William Carroll
34ec3104f7 Debug dottime in modeline
My modeline was displaying the local time (not UTC time) and appending the UTC
timezone offset, which was confusing me.

When it was `00:03` in London, my modeline would read `00:03+01`. One way of
interpreting this is that it's `00:03` in London and the `+01` is a reminder
that I'm one hour ahead of UTC. However, I was reading it as though it was
`00:03` UTC and thus `01:03` in London.

I had to set `display-time-string-forms` instead of `display-time-string` to
pass the `t` argument to the `ZONE` parameter to indicate that I'd prefer to use
UTC time and not local time when expanding the variables.
2020-09-28 00:02:40 +01:00
William Carroll
1ad6c30acc Reuse helpful-mode buffers when traversing documentation
Instead of scattering helpful-mode buffers, reuse existing buffers when
traversing documentation.

See this blog post for more information:
https://d12frosted.io/posts/2019-06-26-emacs-helpful.html
2020-09-27 23:49:38 +01:00
William Carroll
12bd12434d Define KBD gu to browse-url-at-point
This is handy!
2020-09-08 13:12:47 +01:00
William Carroll
34af54eb04 Prefer .ssh/config instead of Tramp's defaults
Instruct Tramp to use my SSH settings in .ssh/config.
2020-09-08 13:12:17 +01:00
William Carroll
74f1359924 Install additional KBDs for bookmark.el
Generate KBDs to call `find-file` on the bookmark.
2020-09-07 23:37:58 +01:00
William Carroll
a599e7a1c7 Define KBDs for quickly visiting BRIEFCASE magit-status
I'd rather be able to jump straight here instead of visiting a file or directory
first.
2020-09-07 23:22:30 +01:00
William Carroll
1ece8c083b Drop support for Nix home-manager
On my work machines, I'm finding home-manager to be more bothersome than
helpful. I'm preferring a simpler workflow for the time being.
2020-09-07 23:01:59 +01:00
William Carroll
62a7478bd2 defgroup for timestring.el
Trying to be more idiomatic.
2020-09-07 19:48:27 +01:00
William Carroll
8022b7a811 Increase the default size of my workstation font
Consider moving some of this logic into my work-specific configuration.
2020-09-07 19:47:54 +01:00
William Carroll
b01ce5059d Debug defensive call to (server-start)
I was previously relying on the variable `server-process` being set, but this
only resulted in false-negatives and broken initializations. This should make my
Emacs initialization more stable.
2020-09-07 16:30:54 +01:00
William Carroll
3a87f3485f Conditionally load-theme
When the `window-system` is set, use `solarized-light`. When it's not,
use `wombat`.
2020-09-07 16:14:42 +01:00
William Carroll
bdd9d963be Conditionally start Emacs server
Only attempt to start the Emacs server if there isn't already one
running.
2020-09-07 16:14:42 +01:00
William Carroll
0f2a13a32a Vertically align search results conditionally
Only when `window-system` is set.
2020-09-07 16:14:42 +01:00
William Carroll
3dc10f167b Install keybindings for bookmark.el
I would like to restore these KBDs.
2020-09-07 16:14:42 +01:00
William Carroll
cc1a91078a Drop support for building emacs.glinux
I'm defining a fork of this function in my work configuration, so I longer want
this here.
2020-09-07 15:47:17 +01:00
William Carroll
12b5a10b05 Debug project-find-file for briefcase
As the name suggests, `f-parent-of?` only returns true when A is a *parent* of
B. What I want instead if `f-ancestor-of?`.
2020-09-07 15:41:54 +01:00
William Carroll
43fc1d93fb Prefer 'vc as the project-find-file type when at briefcase's root
See the explanatory comment that I left in the code.
2020-09-06 18:20:19 +01:00
William Carroll
5cf6a0b23d Add defgroup vterm-mgt for vterm-mgt
In the past I used `defconst` in many of my Elisp libraries where I should've
used something like:

```elisp
;; some/path/to/some-lib.el

(defgroup some-lib nil)

(defcustom some-lib-setting nil
  :group 'some-lib)
```

When I encounter code that I should've structured this way, I'm cleaning it up
to prefer this more idiomatic pattern.
2020-09-06 13:49:53 +01:00
William Carroll
b89d1f0a1f Call make-process instead of call-process in scrot.el
While attempting to debug why pressing `C-s-s` from an X-window screenshots my
entire screen, I switched from `call-process` to `make-process`, which is
async.

I still haven't debugged the original issue, but I think this is an improvement
regardless.
2020-09-04 21:06:18 +01:00
William Carroll
4763c7ca45 Restore KBDs for changing my font size
When I removed the KBD logic from fonts.el, I should have moved it here, but I
did not.
2020-09-04 21:04:56 +01:00
William Carroll
73af825389 Debug broken pulse-audio KBDs
Looks like when I linted my Emacs I forgot to change the prefix from
`pulse-audio/` to `pulse-audio-`.
2020-09-04 21:04:10 +01:00
William Carroll
aae5b4c88c Enable font ligatures for Emacs 27!
Now that Emacs is capable a rendering font ligatures, I defined a function to
enable them in fonts.el. Everything works, and it's beautiful.
2020-09-04 21:03:16 +01:00
William Carroll
97c2706821 Prevent warning during Emacs initialization
Now that my `script.el` is behaving as expected (wahoo!), start linting away
anything that shows up in the `*Warnings*` and `*Errors*` buffers.
2020-09-02 15:24:30 +01:00
William Carroll
f089f3c550 Linting Elisp
TL;DR:
- Prefer cl-lib
- Prefer spaces to tabs
- Resolve various checkdoc complaints
2020-09-02 15:23:46 +01:00
William Carroll
ea274f924a Remove KBD installations from more Elisp modules
I originally liked this pattern, but now I'd prefer to put everything in
keybindings.el.
2020-09-02 15:03:04 +01:00
William Carroll
d1ee517461 Require general.el for packages that depend on it
Since I'm calling `(require 'general)` in `wpc-package.el`, which gets called at
the beginning of my `init.el` file, all sub-modules have `general`. I originally
wanted this, but I'm beginning to rethink that preference.

After `script.el` broke my CI because of a missing `general` dependency, I'm
fixing it for `buffer.el` and all other modules that consume `general`.
2020-09-02 15:01:43 +01:00
William Carroll
f9be81b23e Add missing ts.el dependency to buffer.el
Since script.el depends on buffer.el now, buffer.el fails to evaluate because of
a missing dependency on ts.el.

Blindspots like this make me want to eventually support testing individual loads
of each of the libraries in my .emacs.d/wpc directory.
2020-09-02 14:52:17 +01:00
William Carroll
924c7fa419 Debug undefined add-hook-before-save
`use-package` complains that `add-hook-before-save` doesn't exist. This is
because it's now named `macros-add-hook-before-save`.

This fixes that.
2020-09-02 14:49:10 +01:00
William Carroll
2200daeea4 Add missing Elisp dependencies
TL;DR:
- Require cl-macs.el for modules using CL-style macros like `cl-defun`
- Require struct.el for call to `struct-set!`
2020-09-02 14:39:41 +01:00
William Carroll
4a69371065 General Elisp linting
TL;DR:
- Remove `require` statements from init.el
- Remove unused, auto-install KBDs for bookmark.el
- Remove unused `require` statements from clipboard
- Remove unused, commented-out code

I would like for an Elisp linting stage to test for unused `require` statements,
but I'm unsure how practical that is to support.
2020-09-02 14:09:15 +01:00
William Carroll
dffb224023 Remove circular Elisp dependency
maybe.el -> prelude.el -> maybe.el

I should test for circular-dependencies in CI...
2020-09-02 14:08:14 +01:00
William Carroll
9c71c78abc Pull Emacs 27 from @tazjin's depot
Here's what happened:

My `emacs.glinux` derivation relies on gLinux `/usr/bin/emacs`, and Google
recently published version 27, so all corporate machines (i.e. this laptop)
switched from Emacs 26 to Emacs 27 overnight.

However, my Nix derivation was building all of the packages for Emacs 26, so
some packages were compatible while others weren't.

The Elisp package, `emr`, doesn't build for version 27, so I dropped it
altogether.
2020-09-02 14:07:39 +01:00
William Carroll
c17796a60d Rename alist.el to al.el
After switching my namespace separator from "/" to "-" the function,
`alist-get`, clashed (surprise!) with the pre-existing function, `alist-get`. As
I was struggling to debug my broken Emacs (it broke bc Emacs 27 rolled out), and
I changed the module name, "alist", to "al" attempting to defuse the issue.
2020-09-02 14:00:43 +01:00
William Carroll
baf08416cf Apply checkdoc fixes to set.el
While I don't agree with what checkdoc is advising here, I'd rather not fight
it.
2020-09-01 16:27:42 +01:00
William Carroll
75a9a156a0 Redefine >> macro as >-> in >.el
I created a strangely named Elisp module, >.el, just to appease the CI gods. My
gut tells me that this is a desperate idea and fails the smell test. I'm pretty
eager to pass the linting phase of my Elisp CI, however, and I can always revert
this.
2020-09-01 16:26:39 +01:00
William Carroll
718899c629 More Elisp linting
In order for this to scale, I need to solve two things:
1. Ad-hoc ignore fill-column rules for URLs and other exceptions.
2. Run Elisp flychecker without evaluating my Elisp code and firing its
   side-effects.
2020-09-01 14:00:42 +01:00
William Carroll
fb5ec068dd More Elisp linting
This should cover most of the remaining linting errors. After this, I expect
fewer than ten linting errors.
2020-09-01 10:17:43 +01:00