Compare commits

...

4 commits

5 changed files with 91 additions and 38 deletions

View file

@ -134,7 +134,6 @@ hc pad 0 0 0 0 0
# Load layouts for the dev and web tags.
hc load web '(clients max:0)'
hc load dev '(split horizontal:0.75:1 (split horizontal:0.33:1 (clients max:0 0x420000e) (clients max:0 0x3800086)) (clients vertical:0 0x1a0000e))'
# Make sure the "Emacs" frame is selected.
hc focus_edge left

View file

@ -1,6 +1,6 @@
#!/usr/bin/env zsh
hc load dev '(split horizontal:0.535:1 (clients max:0) (clients vertical:0))'
hc load dev '(split horizontal:0.75:1 (split horizontal:0.33:1 (clients max:0 0x420000e) (clients max:0 0x3800086)) (clients vertical:0 0x1a0000e))'
# Lock each tag to its specific monitor.
lock-tag-to-monitor dev 0

View file

@ -192,4 +192,8 @@ LocalForward 2812 localhost:2812"))
(color6 . "#828eca3cca3c")
(color14 . "#7126f01ff01f")
(color7 . "#969696")
(color15 . "#ededed"))))))
(color15 . "#ededed")
;; This doesn't appear to work.
; (map . "ctrl+alt+o focus_visible_window")
(map . "alt+2 new_window")
(map . "alt+0 close_window"))))))

View file

@ -11,7 +11,7 @@
#:use-module (oni packages go))
(define-public emacs-oni-config
(let ((commit "ec54fa9d049c349701039a4b3ee9150505a1a1cb")
(let ((commit "4ab9d3c4b3c7ff057b68cc45e39730a406a37612")
(revision "0"))
(package
(name "emacs-oni-config")
@ -24,7 +24,7 @@
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32 "03jwqzhq6p1xs0lmn8q5pp0bli6m9qpf42har2lndf5xnqffjf1z"))))
(base32 "0ipzspx4kkry8gi534yd62qq8506s9phvymw4m719mm4l2wi3mq6"))))
(build-system emacs-build-system)
(home-page "https://code.ryuslash.org/ryuslash/emacs-config")
(synopsis "My Emacs configuration")

View file

@ -10,6 +10,88 @@
(define (first-binding)
"First binding"
;; These are dangerous keybindings, they could be very annoying if they're
;; accidentally pressed, so using Shift here to make it a little less easy to
;; do this is a good idea.
(xbindkey `(,modkey q) "shutdown-rofi")
(xbindkey `(,modkey shift r) "herbstclient reload")
;; Usually I close the applications I use through a menu or keybinding inside
;; the application, but not all applications offer this. Sometimes need to
;; tell the window manager to do so.
(xbindkey `(,modkey k) "herbstclient close")
;; Normally I try to have frames set-up the way I like them programmatically,
;; not manually, but sometimes I need to do it manually anyway and remove them
;; afterwards.
(xbindkey `(,modkey mod1 k) "herbstclient remove")
;; Always spawn an instance of kitty.
(xbindkey `(,modkey Return) "herbstclient spawn kitty")
;; Switch to a running instance of URxvt, Hyper, or kitty or start one.
(xbindkey `(,modkey t) "herbstclient spawn hlwm-run-or-raise \"\\(URxvt\\|Hyper\\|kitty\\)\" kitty")
;; Switch to a running instance of Conceror, Firefox, Chromium, Nyxt, or
;; qutebrowser or start one.
(xbindkey `(,modkey b) "herbstclient spawn hlwm-run-or-raise \"\\(Conkeror\\|[Ff]irefox\\|Chromium\\|Nyxt\\|qutebrowser\\)\" firefox")
;; Switch to a running instance of Emacs, or create an Emacs client frame.
(xbindkey `(,modkey e) "herbstclient spawn hlwm-run-or-raise Emacs emacsclient --create-frame")
;; Lock the screen with C-M-l.
(xbindkey '(control mod1 l) "herbstclient spawn i3lock")
;; Swap visible tags
(xbindkey `(,modkey x) "herbstclient spawn hlwm-switch-tags")
;; Since I use the colemak keyboard layout, hjkl doesn't make much sense. I
;; use bnpf instead since that is what I'm used to using in Emacs. I try to
;; use my run-or-raise script as much as I can, and have the layouts set-up
;; correctly already, but sometimes I still need to move around, resize and
;; move clients.
(xbindkey `(,modkey shift b) "herbstclient shift left")
(xbindkey `(,modkey shift n) "herbstclient shift down")
(xbindkey `(,modkey shift p) "herbstclient shift up")
(xbindkey `(,modkey shift f) "herbstclient shift right")
(xbindkey `(,modkey control b) "herbstclient resize left +0.05")
(xbindkey `(,modkey control n) "herbstclient resize down +0.05")
(xbindkey `(,modkey control p) "herbstclient resize up +0.05")
(xbindkey `(,modkey control f) "herbstclient resize right +0.05")
;; I usually try to have my layouts set-up programmatically, but this isn't
;; always possible or practical.
(xbindkey `(,modkey shift underscore) "herbstclient split bottom 0.5")
(xbindkey `(,modkey shift bar) "herbstclient split right 0.5")
;; Switching tags by number (key) isn't always practical, sometimes switching
;; to next/previous tag is easiest.
(xbindkey `(,modkey period) "herbstclient use_index +1 --skip-visible")
(xbindkey `(,modkey comma) "herbstclient use_index -1 --skip-visible")
;; Games and sometimes other applications don't always like being forced into
;; a strangely sized box, floating mode helps.
(xbindkey `(,modkey shift control f) "herbstclient floating toggle")
;; Playing games in fullscreen mode can end badly by having the game spread
;; across both monitors. Also watching a twitch stream with lots of text is
;; best in fullscreen.
(xbindkey `(,modkey f) "herbstclient cycle_layout 1 vertical max")
(xbindkey `(,modkey m) "herbstclient fullscreen toggle")
(xbindkey `(,modkey p) "herbstclient pseudotile toggle")
;; The following cycles through the available layouts within a frame, but
;; skips layouts, if the layout change wouldn't affect the actual window
;; positions. I.e. if there are two windows within a frame, the grid layout is
;; skipped.
(xbindkey `(,modkey space) "herbstclient or , and . compare tags.focus.curframe_wcount = 2 . cycle_layout +1 vertical horizontal max vertical grid , cycle_layout +1")
;; focus
(xbindkey `(,modkey BackSpace) "herbstclient cycle_monitor")
;; Use u because i is already used by by navigation commands.
(xbindkey `(,modkey u) "herbstclient jumpto urgent")
;; Add some media key bindings for MPD.
(xbindkey '(XF86AudioPlay) "herbstclient spawn mpc toggle")
(xbindkey '(XF86AudioNext) "herbstclient spawn mpc next")
(xbindkey '(XF86AudioPrev) "herbstclient spawn mpc prev")
(xbindkey-function `(,modkey c) move-bindings)
(xbindkey-function `(,modkey s) screenshot-bindings)
(xbindkey `(,modkey bracketleft) "herbstclient use_index 0")
@ -22,39 +104,7 @@
(xbindkey `(,modkey shift equal) "herbstclient use_index 7")
(xbindkey `(,modkey bracketright) "herbstclient use_index 8")
(xbindkey `(,modkey shift "1") "herbstclient use_index 9")
(xbindkey `(,modkey shift q) "herbstclient quit")
(xbindkey `(,modkey shift r) "herbstclient reload")
(xbindkey `(,modkey k) "herbstclient close")
(xbindkey `(,modkey mod1 k) "herbstclient remove")
(xbindkey `(,modkey Return) "herbstclient spawn kitty")
(xbindkey `(,modkey t) "herbstclient spawn hlwm-run-or-raise \"\\(URxvt\\|Hyper\\|kitty\\)\" kitty")
(xbindkey `(,modkey b) "herbstclient spawn hlwm-run-or-raise \"\\(Conkeror\\|[Ff]irefox\\|Chromium\\|Next\\|qutebrowser\\)\" firefox")
(xbindkey `(,modkey e) "herbstclient spawn hlwm-run-or-raise Emacs emacsclient --create-frame")
(xbindkey '(control mod1 l) "herbstclient spawn i3lock")
(xbindkey `(,modkey x) "herbstclient spawn hlwm-switch-tags")
(xbindkey `(,modkey shift b) "herbstclient shift left")
(xbindkey `(,modkey shift n) "herbstclient shift down")
(xbindkey `(,modkey shift p) "herbstclient shift up")
(xbindkey `(,modkey shift f) "herbstclient shift right")
(xbindkey `(,modkey control b) "herbstclient resize left +0.05")
(xbindkey `(,modkey control n) "herbstclient resize down +0.05")
(xbindkey `(,modkey control p) "herbstclient resize up +0.05")
(xbindkey `(,modkey control f) "herbstclient resize right +0.05")
(xbindkey `(,modkey shift underscore) "herbstclient split bottom 0.5")
(xbindkey `(,modkey shift bar) "herbstclient split right 0.5")
(xbindkey `(,modkey period) "herbstclient use_index +1 --skip-visible")
(xbindkey `(,modkey comma) "herbstclient use_index -1 --skip-visible")
(xbindkey `(,modkey shift control f) "herbstclient floating toggle")
(xbindkey `(,modkey f) "herbstclient cycle_layout 1 vertical max")
(xbindkey `(,modkey m) "herbstclient fullscreen toggle")
(xbindkey `(,modkey p) "herbstclient pseudotile toggle")
(xbindkey `(,modkey space) "herbstclient or , and . compare tags.focus.curframe_wcount = 2 . cycle_layout +1 vertical horizontal max vertical grid , cycle_layout +1")
(xbindkey `(,modkey BackSpace) "herbstclient cycle_monitor")
(xbindkey `(,modkey u) "herbstclient jumpto urgent")
(xbindkey '(XF86AudioPlay) "herbstclient spawn mpc toggle")
(xbindkey '(XF86AudioNext) "herbstclient spawn mpc next")
(xbindkey '(XF86AudioPrev) "herbstclient spawn mpc prev")
(xbindkey `(,modkey r) "herbstclient spawn rofi -show run")
(xbindkey `(,modkey r) "herbstclient spawn rofi -modi drun -show drun -config /home/chelys/.config/rofi/rofi.rasi")
(xbindkey `(,modkey w) "herbstclient spawn rofi -show window -window-command \"/home/chelys/usr/bin/hlwm-switch-to-window {window}\" -config /home/chelys/.config/rofi/windows.rasi"))
(define (move-bindings)