summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortslil clingman <>2020-04-24 14:51:42 -0700
committertslil clingman <>2020-04-24 14:51:42 -0700
commit18bb5178ea2d2d1f2f0e788ab33bfbdf59376837 (patch)
tree89e597d08d0a1d656a1a5f4772c7e138fb36a0e9
parent6ba333c21a29be757a5f7735ae8bcde153346e60 (diff)
EXWM workspace fixes & tray, Verilog, still not good input method
-rw-r--r--emacs/inits/00-exwm.el36
-rw-r--r--emacs/inits/01-basic.el4
-rw-r--r--emacs/inits/02-modeline.el4
-rw-r--r--emacs/inits/03-miscload.el2
-rw-r--r--emacs/inits/04-input_method.el18
-rw-r--r--emacs/inits/11-selectrum.el12
-rw-r--r--emacs/inits/20-programming.el19
-rw-r--r--emacs/inits/30-irc.el2
-rw-r--r--emacs/inits/70-global-keybinds.el6
9 files changed, 73 insertions, 30 deletions
diff --git a/emacs/inits/00-exwm.el b/emacs/inits/00-exwm.el
index 7ad3deb..7735629 100644
--- a/emacs/inits/00-exwm.el
+++ b/emacs/inits/00-exwm.el
@@ -1,4 +1,4 @@
-;; Time-stamp: <2020-04-01 22:13:15 (tslil@bison)>
+;; Time-stamp: <2020-04-21 19:17:12 (tslil@bison)>
(defun banish-rat ()
(interactive)
@@ -65,22 +65,36 @@
(exwm-workspace-switch-create ,i))))
;; buffer and window management
- (exwm-input-set-key (kbd "s-<tab>") 'next-buffer)
+ (exwm-input-set-key (kbd "s-SPC") 'switch-to-buffer)
+
+ (defvar exwm-workspace-last-index 0)
+
+ (defun exwm-workspace-lighter ()
+ (format " @%d (*%d)" exwm-workspace-current-index exwm-workspace-last-index))
+
+ (defun exwm-store-workspace-last-index (next)
+ (when (/= next exwm-workspace-current-index)
+ (setq exwm-workspace-last-index exwm-workspace-current-index)))
+
+ (advice-add 'exwm-workspace-switch-create :before #'exwm-store-workspace-last-index)
+ ;; (advice-add 'exwm-workspace-switch :before #'exwm-store-workspace-last-index)
+
+ (defun exwm-sanitise-workspace-last-index ()
+ (when (> (1+ exwm-workspace-last-index) (exwm-workspace--count))
+ (setq exwm-workspace-last-index exwm-workspace-current-index)))
+
+ (push #'exwm-sanitise-workspace-last-index exwm-workspace-list-change-hook)
- (defvar exwm-last-workspace-index 0)
(defun exwm-last-workspace ()
(interactive)
- (let ((temp exwm-workspace-current-index))
- (exwm-workspace-switch exwm-last-workspace-index)
- (setq exwm-last-workspace-index temp)))
+ (exwm-workspace-switch-create exwm-workspace-last-index))
(defun exwm-last-buffer ()
(interactive)
(switch-to-buffer (other-buffer (current-buffer) 1)))
- (exwm-input-set-key (kbd "s-n") 'ivy-switch-buffer)
(exwm-input-set-key (kbd "s-o") 'exwm-last-buffer)
- (exwm-input-set-key (kbd "s-\\") 'exwm-last-workspace)
+ (exwm-input-set-key (kbd "s-<tab>") 'exwm-last-workspace)
(exwm-input-set-key (kbd "s-b") 'banish-rat)
@@ -99,6 +113,12 @@
(start-process-shell-command command nil command)))
;; -------------------------------------------------------------------
+ ;; Tray
+
+ (require 'exwm-systemtray)
+ (exwm-systemtray-enable)
+
+ ;; -------------------------------------------------------------------
;; RandR
(require 'exwm-randr)
diff --git a/emacs/inits/01-basic.el b/emacs/inits/01-basic.el
index 8128ccf..ecbfb45 100644
--- a/emacs/inits/01-basic.el
+++ b/emacs/inits/01-basic.el
@@ -1,4 +1,4 @@
-;; Time-stamp: <2020-03-18 18:37:35 (tslil@bison)>
+;; Time-stamp: <2020-04-16 10:44:32 (tslil@bison)>
;; -----------------------------------------------------------------------------
;; Interface
@@ -118,7 +118,7 @@
(add-hook 'kill-buffer-query-functions 'immortal-scratch)
-;; I couldn't figure the config options out, so this is the next best thing
+;; I couldn't understand the config options, so this is the next best thing
(defun display-startup-echo-area-message () nil)
(setq initial-scratch-message nil
diff --git a/emacs/inits/02-modeline.el b/emacs/inits/02-modeline.el
index 0d61cb3..aba6e9c 100644
--- a/emacs/inits/02-modeline.el
+++ b/emacs/inits/02-modeline.el
@@ -1,4 +1,4 @@
-;; Time-stamp: <2020-04-13 14:34:03 (tslil@bison)>
+;; Time-stamp: <2020-04-24 14:49:48 (tslil@bison)>
;; -----------------------------------------------------------------------------
;; Battery status and CPU temperature
@@ -44,7 +44,7 @@
display-time-string
(sys-status sys-status)
(:eval (mortality))
- (:eval (exwm-workspace-lighter))
+ (:eval (when (functionp 'exwm-workspace-lighter) (exwm-workspace-lighter)))
" " (:eval (abbreviate-file-name default-directory))))
;; We redefine this function to centre the text
;; Is there a better way?
diff --git a/emacs/inits/03-miscload.el b/emacs/inits/03-miscload.el
index dc483be..61395fb 100644
--- a/emacs/inits/03-miscload.el
+++ b/emacs/inits/03-miscload.el
@@ -1,4 +1,4 @@
-;; Time-stamp: <2019-12-12 10:31:44 (tslil@bison)>
+;; Time-stamp: <2020-03-28 13:00:51 (tslil@bison)>
;;(add-to-list 'load-path (expand-file-name "~/.emacs.d/scripts/"))
diff --git a/emacs/inits/04-input_method.el b/emacs/inits/04-input_method.el
index fff167c..a310b57 100644
--- a/emacs/inits/04-input_method.el
+++ b/emacs/inits/04-input_method.el
@@ -1,4 +1,4 @@
-;; Time-stamp: <2019-09-11 20:37:56 (tslil@bison)>
+;; Time-stamp: <2020-04-06 13:46:34 (tslil@bison)>
(use-package agda-input
:load-path "~/.emacs.d/scripts/"
@@ -12,4 +12,18 @@
(add-to-list 'agda-input-user-translations sym))
(agda-input-setup))
-(setq-default default-input-method "Agda")
+(setq-default default-input-method "TeX")
+
+(defvar use-default-input-method t)
+
+(make-variable-buffer-local 'use-default-input-method)
+
+(defun activate-default-input-method ()
+ (interactive)
+ (if use-default-input-method
+ (activate-input-method default-input-method)
+ (inactivate-input-method)))
+
+;; (add-hook 'text-mode-hook #'activate-default-input-method)
+;; (add-hook 'mail-mode-hook #'activate-default-input-method)
+;; (add-hook 'isearch-mode-hook #'activate-default-input-method)
diff --git a/emacs/inits/11-selectrum.el b/emacs/inits/11-selectrum.el
index f9ed8b0..5704635 100644
--- a/emacs/inits/11-selectrum.el
+++ b/emacs/inits/11-selectrum.el
@@ -1,4 +1,4 @@
-;; Time-stamp: <2020-04-23 20:59:13 (tslil@bison)>
+;; Time-stamp: <2020-04-24 14:39:20 (tslil@bison)>
(use-package deadgrep
:ensure t
@@ -12,7 +12,7 @@
(defun selectrum-yank ()
(interactive)
(let ((selectrum-should-sort-p nil))
- (insert (selectrum-completing-read "Yank: " (delete-duplicates kill-ring :test #'equal) nil t))))
+ (insert (selectrum-completing-read "Yank: " (delete-dups kill-ring) nil t))))
(use-package selectrum
:bind (("C-x f" . selectrum-recentf)
@@ -20,6 +20,9 @@
:config
(setq selectrum-num-candidates-displayed 7
selectrum-count-style 'matches)
+ ;; If i don't want `enable-recursive-minibuffers' this is the next best thing:
+ ;; (setq-default completion-in-region-function selectrum--old-completion-in-region-function)
+ (setq enable-recursive-minibuffers t)
(selectrum-mode +1))
(use-package prescient
@@ -29,10 +32,7 @@
:ensure t
:config
(selectrum-prescient-mode +1)
- (prescient-persist-mode +1)
- ;; I don't want enable-recursive-minibuffers so this is the next best thing:
- (setq-default completion-in-region-function selectrum--old-completion-in-region-function)
- )
+ (prescient-persist-mode +1))
;; (use-package ctrlf
;; :ensure t
diff --git a/emacs/inits/20-programming.el b/emacs/inits/20-programming.el
index 18ba4b0..69d71b1 100644
--- a/emacs/inits/20-programming.el
+++ b/emacs/inits/20-programming.el
@@ -1,13 +1,13 @@
-;; Time-stamp: <2020-01-29 10:47:16 (tslil@bison)>
+;; Time-stamp: <2020-04-24 14:51:05 (tslil@bison)>
;; -----------------------------------------------------------------------------
;; General setup
;; Always split horizontally when compiling
-(defadvice compile (around split-horizontally activate)
- (let ((split-width-threshold 0)
- (split-height-threshold nil))
- ad-do-it))
+;; (defadvice compile (around split-horizontally activate)
+;; (let ((split-width-threshold 0)
+;; (split-height-threshold nil))
+;; ad-do-it))
;; Resize to fill column (and a little bit)
(defadvice compile (after resize-window-properly activate)
@@ -181,4 +181,11 @@
(use-package verilog-mode
:ensure t
- :defer t)
+ :defer t
+ :mode "\\.vl$"
+ :hook (verilog-mode . (lambda ()
+ (setq verilog-tool 'verilog-compiler)
+ (verilog-set-compile-command)))
+ :config
+ (setq-default verilog-compiler "iverilog"
+ verilog-tool 'verilog-compiler))
diff --git a/emacs/inits/30-irc.el b/emacs/inits/30-irc.el
index f4e3759..efd4bdc 100644
--- a/emacs/inits/30-irc.el
+++ b/emacs/inits/30-irc.el
@@ -1,4 +1,4 @@
-;; Time-stamp: <2020-04-13 14:37:20 (tslil@bison)>
+;; Time-stamp: <2020-04-13 14:38:51 (tslil@bison)>
(use-package rcirc
:ensure t
diff --git a/emacs/inits/70-global-keybinds.el b/emacs/inits/70-global-keybinds.el
index 4e3d6f4..c86419a 100644
--- a/emacs/inits/70-global-keybinds.el
+++ b/emacs/inits/70-global-keybinds.el
@@ -1,8 +1,8 @@
-;; Time-stamp: <2020-02-08 22:08:09 (tslil@bison)>
+;; Time-stamp: <2020-04-24 14:34:02 (tslil@bison)>
(setq time-stamp-active t
time-stamp-line-limit 3
- time-stamp-format "%04y-%02m-%02d %02H:%02M:%02S (%u@%s)")
+ time-stamp-format "%Y-%02m-%02d %02H:%02M:%02S (%u@%s)")
(add-hook 'before-save-hook #'time-stamp)
@@ -36,3 +36,5 @@
(global-set-key (kbd "M-i") 'indent-region)
(global-set-key (kbd "C-v") 'delete-indentation)
+
+(global-set-key (kbd "C-c C-k") 'kill-whole-line)