about summary refs log tree commit diff
path: root/emacs/.emacs.d/wpc/symbol.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-02-11T11·00+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-02-11T13·56+0000
commitd81f31107d956cd22de7e427132f8f5f362370ba (patch)
tree0b9d52b88a727a3ba65f29f7b4a0d15974469241 /emacs/.emacs.d/wpc/symbol.el
parent61be808a92d84cad45792acd03d9f03acfa3745a (diff)
Support cycling through display configurations
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
Diffstat (limited to 'emacs/.emacs.d/wpc/symbol.el')
0 files changed, 0 insertions, 0 deletions