mirror of
https://github.com/pestctrl/emacs-config.git
synced 2026-02-16 16:24:18 +00:00
Compare commits
7 commits
8c11b7c1de
...
b8c537a588
| Author | SHA1 | Date | |
|---|---|---|---|
| b8c537a588 | |||
|
|
c3c22633fc | ||
|
|
3fdcdb234b | ||
|
|
8c448d4348 | ||
|
|
db66ca381a | ||
|
|
e08f2460a5 | ||
|
|
b854eb3489 |
6 changed files with 77 additions and 53 deletions
|
|
@ -26,7 +26,7 @@
|
|||
(defvar exwm-startup-programs
|
||||
'(("megasync" "QT_SCALE_FACTOR=1 megasync")
|
||||
"/usr/lib/kdeconnectd"
|
||||
("compton" "compton -f -i .7 -b")
|
||||
("compton" "picom --backend=glx -f -i .7 -b")
|
||||
;; ("compton -f -i .7 -b --backend glx --blur-background --blur-method kawase --blur-strength 2")
|
||||
"start-pulseaudio-x11;pactl upload-sample /usr/share/sounds/gnome/default/alerts/drip.ogg beep; pactl load-module module-x11-bell sample=beep; xset b 100"
|
||||
"kdeconnect-indicator"
|
||||
|
|
@ -46,6 +46,7 @@
|
|||
(start-process-shell-command (file-name-nondirectory program) nil program))))
|
||||
|
||||
(defun call-startup-programs ()
|
||||
(interactive)
|
||||
(start-minimum-programs)
|
||||
(when (y-or-n-p "Run startup programs? ")
|
||||
(dolist (program exwm-startup-programs)
|
||||
|
|
|
|||
|
|
@ -75,18 +75,21 @@
|
|||
(let ((compiler-action (aml/get-map-prop ll/c-file-action-map action :compiler-action))
|
||||
(compiler (lls/prompt-tool "clang$")))
|
||||
(string-join
|
||||
(list (lls/get-clang-command-fun
|
||||
:compiler compiler
|
||||
:file file
|
||||
:action compiler-action
|
||||
:output output
|
||||
:flags
|
||||
(list
|
||||
(pcase action
|
||||
('debug (format "-mllvm -debug-only=%s" (ll/read-pass-name "Which pass? ")))
|
||||
('before-after (let ((pass (ll/read-pass-name "Which pass? ")))
|
||||
(format "-mllvm -print-before=%s -mllvm -print-after=%s" pass pass)))
|
||||
('changed "-mllvm -print-before-all"))))
|
||||
(list
|
||||
(when (y-or-n-p "Would you like to `rr record`? ")
|
||||
"rr record ")
|
||||
(lls/get-clang-command-fun
|
||||
:compiler compiler
|
||||
:file file
|
||||
:action compiler-action
|
||||
:output output
|
||||
:flags
|
||||
(list
|
||||
(pcase action
|
||||
('debug (format "-mllvm -debug-only=%s" (ll/read-pass-name "Which pass? ")))
|
||||
('before-after (let ((pass (ll/read-pass-name "Which pass? ")))
|
||||
(format "-mllvm -print-before=%s -mllvm -print-after=%s" pass pass)))
|
||||
('changed "-mllvm -print-before-all"))))
|
||||
" ")
|
||||
" "))))
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,29 @@
|
|||
;;; Code:
|
||||
(require 'org)
|
||||
|
||||
(defclass debugger-stacktrace-data ()
|
||||
((file-name :initarg :file-name :type string)
|
||||
(line-number :initarg :line-number :type number)
|
||||
(func-name :initarg :func-name :type string)
|
||||
(stack-number :initarg :stack-number :type number)))
|
||||
|
||||
(defun stacktrace-to-org-table (stacktrace)
|
||||
(save-excursion
|
||||
(beginning-of-buffer)
|
||||
(insert "|-\n|#|Function Name|Link|\n|-\n")
|
||||
(dolist (stack-entry stacktrace)
|
||||
(insert (format "|%s|%s|%s|\n"
|
||||
(slot-value stack-entry 'stack-number)
|
||||
(slot-value stack-entry 'func-name)
|
||||
(let ((fname (slot-value stack-entry 'file-name)))
|
||||
(format "[[%s:%d][%s]]"
|
||||
fname
|
||||
(slot-value stack-entry 'line-number)
|
||||
(file-name-nondirectory fname))))))
|
||||
(insert "|-")
|
||||
(org-table-align)
|
||||
(org-table-sort-lines nil ?N)))
|
||||
|
||||
(defun gdb-stacktrace-to-org-table ()
|
||||
(interactive)
|
||||
(let ((regexp (rx (and line-start
|
||||
|
|
@ -52,35 +75,20 @@
|
|||
(group
|
||||
(+ digit))
|
||||
line-end
|
||||
))))
|
||||
(beginning-of-buffer)
|
||||
)))
|
||||
stacktrace)
|
||||
(save-excursion
|
||||
(beginning-of-buffer)
|
||||
(while (re-search-forward regexp nil 'noerror)
|
||||
(replace-match
|
||||
(let ((path (match-string 3)))
|
||||
(save-match-data
|
||||
(format "|\\1|\\2|%s:\\4|[[\\3::\\4][Link]]|"
|
||||
(cond ((string-match (rx (and "/scratch/benson/_repos-work/tools"
|
||||
(* digit)
|
||||
"/llvm_cgt/llvm-project/"
|
||||
(group
|
||||
(+ nonl))))
|
||||
path)
|
||||
(format "$LLVM_PROJECT/%s" (match-string 1 path)))
|
||||
((string-match (rx (and "/scratch/benson/_repos-work/tools"
|
||||
(* digit)
|
||||
"/"
|
||||
(group
|
||||
(+ nonl))))
|
||||
path)
|
||||
(format "$SANDBOX/%s" (match-string 1 path)))
|
||||
(t path))))))))
|
||||
(org-table-sort-lines nil ?N)
|
||||
(save-excursion
|
||||
(insert "|-\n|#|Function Name|File & Line Number|Link|\n|-\n")
|
||||
(end-of-buffer)
|
||||
(insert "\n|-"))
|
||||
(org-table-align)))
|
||||
(push
|
||||
(make-instance 'debugger-stacktrace-data
|
||||
:stack-number (string-to-number (match-string 1))
|
||||
:func-name (match-string 2)
|
||||
:file-name (match-string 3)
|
||||
:line-number (string-to-number (match-string 4)))
|
||||
stacktrace))
|
||||
(erase-buffer))
|
||||
(stacktrace-to-org-table stacktrace)))
|
||||
|
||||
(defun lldb-filename-to-org-link (filename)
|
||||
(setq filename
|
||||
|
|
|
|||
|
|
@ -27,15 +27,15 @@
|
|||
|
||||
(deftheme dark-default)
|
||||
|
||||
|
||||
(let ((rainbow-purple "#9E1CB2")
|
||||
(rainbow-green "#47B04B")
|
||||
(rainbow-blue "#1194f6")
|
||||
(rainbow-red "#C90067")
|
||||
(rainbow-yellow "#FFED18")
|
||||
(rainbow-orange "#E7B500")
|
||||
(rainbow-7 "#00AA5D")
|
||||
(rainbow-8 "#FE7380"))
|
||||
(let* ((rainbow-purple "#9E1CB2")
|
||||
(rainbow-green "#47B04B")
|
||||
(rainbow-red "#C90067")
|
||||
(rainbow-blue "#1194f6")
|
||||
(rainbow-yellow "#FFED18")
|
||||
(rainbow-white "#FFFFFF")
|
||||
(rainbow-pink "#FE7380")
|
||||
(rainbow-cyan "Cyan")
|
||||
(rainbow-orange "#E7B500"))
|
||||
(custom-theme-set-faces
|
||||
'dark-default
|
||||
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
`(rainbow-delimiters-depth-5-face ((t :foreground ,rainbow-yellow)))
|
||||
`(rainbow-delimiters-depth-6-face ((t :foreground ,rainbow-blue)))
|
||||
`(rainbow-delimiters-depth-7-face ((t :foreground ,rainbow-red)))
|
||||
`(rainbow-delimiters-depth-8-face ((t :foreground ,rainbow-8)))
|
||||
`(rainbow-delimiters-depth-8-face ((t :foreground ,rainbow-pink)))
|
||||
|
||||
;; '(vertico-current ((t :foreground "black" :background "#65a7e2")))
|
||||
'(vertico-current ((t :background "gray30")))
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@
|
|||
(setf old-beg (point-min) old-end (point-max)
|
||||
narrow-p t)
|
||||
(narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end)))))))
|
||||
(let* ((org-todo-keywords-1 '("EMPTY" "ONE" "META" "META1" "TODO"))
|
||||
(let* ((org-todo-keywords-1 '("EMPTY" "ONE" "META" "META1" "TODO" "TASK"))
|
||||
(items (mapcan #'my/get-project-stuck-displayables
|
||||
(org-ql-select from
|
||||
`(and ,@(when (and tag
|
||||
(not (zerop (length tag))))
|
||||
`((tags ,tag)))
|
||||
(todo "TODO" "ONE" "META" "META1" "EMPTY" "SEQ")
|
||||
(todo "TODO" "TASK" "ONE" "META" "META1" "EMPTY" "SEQ")
|
||||
(my/top-level)
|
||||
(not (property "DELAYED"))
|
||||
(or (eq 'stuck (opr/type-of-task))
|
||||
|
|
|
|||
|
|
@ -259,9 +259,21 @@
|
|||
|
||||
(setq org-agenda-span 'day)
|
||||
|
||||
(defun days-since (date)
|
||||
(let ((target-date (date-to-time date))
|
||||
(current-date (current-time)))
|
||||
(ceiling
|
||||
(time-to-number-of-days
|
||||
(time-subtract current-date target-date)))))
|
||||
|
||||
(setq org-agenda-custom-commands
|
||||
`(("p" . "\tprod")
|
||||
,@(agenda-suite "all" "pa" "prod")))
|
||||
,@(agenda-suite "all" "pa" "prod")
|
||||
("w" "\tWindows Diary"
|
||||
((agenda ""
|
||||
((org-agenda-start-day "2025-10-29")
|
||||
(org-agenda-start-on-weekday 3)
|
||||
(org-agenda-span (days-since "2025-10-29"))))))))
|
||||
|
||||
(setq org-outline-path-complete-in-steps nil)
|
||||
(setq org-refile-use-outline-path t)
|
||||
|
|
|
|||
Loading…
Reference in a new issue