summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dwm-6.2/config.h166
-rw-r--r--dwm-6.2/dwm.c94
-rw-r--r--emacs/inits/20-programming.el345
3 files changed, 272 insertions, 333 deletions
diff --git a/dwm-6.2/config.h b/dwm-6.2/config.h
index db80e04..d2baa43 100644
--- a/dwm-6.2/config.h
+++ b/dwm-6.2/config.h
@@ -1,30 +1,29 @@
/* See LICENSE file for copyright and license details. */
/* appearance */
-static const unsigned int borderpx = 1; /* border pixel of windows */
-static const unsigned int gappx = 6; /* gaps between windows */
-static const unsigned int snap = 16; /* snap pixel */
-static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
-static const unsigned int systrayspacing = 2; /* systray spacing */
-static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
-static const int showsystray = 1; /* 0 means no systray */
-static const int showbar = 1; /* 0 means no bar */
-static const int topbar = 0; /* 0 means bottom bar */
-static const char *fonts[] = { "Sudo:size=10" };
-static const char dmenufont[] = "Sudo:size=24";
-static const char col_gray1[] = "#222222";
-static const char col_gray2[] = "#444444";
-static const char col_gray3[] = "#bbbbbb";
-static const char col_gray4[] = "#eeeeee";
-static const char col_orang[] = "dark orange"; // "#ED9121";
-static const char *colors[][3] = {
+static const unsigned int borderpx = 1; /* border pixel of windows */
+static const unsigned int gappx = 3; /* gaps between windows */
+static const unsigned int snap = 16; /* snap pixel */
+static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
+static const unsigned int systrayspacing = 2; /* systray spacing */
+static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
+static const int showsystray = 1; /* 0 means no systray */
+static const int showbar = 1; /* 0 means no bar */
+static const int topbar = 0; /* 0 means bottom bar */
+static const char *fonts[] = { "Terminus:size=12" };
+static const char col_gray1[] = "#000000";
+static const char col_gray2[] = "#444444";
+static const char col_gray3[] = "#bbbbbb";
+static const char col_gray4[] = "#eeeeee";
+static const char col_orang[] = "dark orange"; // "#ED9121";
+static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
- [SchemeSel] = { col_gray1, col_orang, col_orang },
+ [SchemeSel] = { col_orang, col_gray2, col_orang },
};
/* tagging */
-static const char *tags[] = { "L", "U", "Y", ";", "Q", "W", "F", "B", "P" };
+static const char *tags[] = { "F", "U", "H", ".", "V", "L", "O", "M" };
static const Rule rules[] = {
/* xprop(1):
@@ -59,75 +58,82 @@ static const Layout layouts[] = {
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
-static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
-static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_orang, "-sf", col_gray1, NULL };
-static const char *termcmd[] = { "st", NULL };
-
-/*
-#define XF86MonBrightnessUp 0x1008ff02
-#define XF86MonBrightnessDown 0x1008ff03
-static const char *brightness_up[] = { "brightnessctl", "s", "5%+", NULL };
-static const char *brightness_dn[] = { "brightnessctl", "s", "5%-", NULL };
-*/
+static const char *termcmd[] = { "alacritty", NULL };
+static const char *menucmd[] = { "run", NULL };
+static const char *now_playing[] = { "now_playing", NULL };
+static const char *albumbler[] = { "albumbler.py", NULL };
+static const char *mpc_toggle[] = { "mpc", "toggle", NULL };
+static const char *mpc_next[] = { "mpc", "next", NULL };
+static const char *mpc_prev[] = { "mpc", "prev", NULL };
+static const char *mpc_stop[] = { "mpc", "stop", NULL };
+static const char *lock[] = { "lock", NULL };
+static const char *flameshot[] = { "flameshot", "gui", NULL };
#define XF86AudioLowerVolume 0x1008ff11
-#define XF86AudioRaiseVolume 0x1008ff13
#define XF86AudioMute 0x1008ff12
+#define XF86AudioRaiseVolume 0x1008ff13
+#define XF86AudioPlay 0x1008ff14
+#define XF86AudioStop 0x1008ff15
+#define XF86AudioPrev 0x1008ff16
+#define XF86AudioNext 0x1008ff17
+
static const char *vol_dn[] = { "pactl", "set-sink-volume", "0", "-5%", NULL };
static const char *vol_up[] = { "pactl", "set-sink-volume", "0", "+5%", NULL };
static const char *vol_mt[] = { "pactl", "set-sink-mute", "0", "toggle", NULL };
-#define XF86ScreenSaver 0x1008ff2d
-static const char *lock[] = {"lock", NULL};
-static const char *toggle_autolock[] = { "toggle_autolock", NULL };
-
static Key keys[] = {
- /* modifier key function argument */
-// Commands
- { MODKEY, XK_space, spawn, {.v = dmenucmd } },
- { MODKEY, XK_t, spawn, {.v = termcmd } },
- { 0, XF86AudioLowerVolume, spawn, {.v = vol_dn } },
- { 0, XF86AudioRaiseVolume, spawn, {.v = vol_up } },
- { 0, XF86AudioMute, spawn, {.v = vol_mt } },
- { 0, XF86ScreenSaver, spawn, {.v = lock } },
- { MODKEY, XK_h, spawn, {.v = lock } },
- { MODKEY|ShiftMask, XK_h, spawn, {.v = toggle_autolock } },
-/*
- { 0, XF86MonBrightnessDown, spawn, {.v = brightness_dn } },
- { 0, XF86MonBrightnessUp, spawn, {.v = brightness_up } },
-*/
-// Windows
- { MODKEY, XK_n, focusstack, {.i = +1 } },
- { MODKEY, XK_o, focusstack, {.i = -1 } },
- { MODKEY|ShiftMask, XK_e, incnmaster, {.i = +1 } },
- { MODKEY|ShiftMask, XK_i, incnmaster, {.i = -1 } },
- { MODKEY, XK_e, setmfact, {.f = -0.05} },
- { MODKEY, XK_i, setmfact, {.f = +0.05} },
- { MODKEY, XK_Return, zoom, {0} },
- { MODKEY, XK_Tab, view, {0} },
- { MODKEY|ShiftMask, XK_k, killclient, {0} },
-// Layout
- { MODKEY, XK_a, setlayout, {.v = &layouts[0]} },
- { MODKEY, XK_r, setlayout, {.v = &layouts[1]} },
- { MODKEY, XK_s, setlayout, {.v = &layouts[2]} },
- { MODKEY, XK_d, togglefloating, {0} },
- { MODKEY, XK_comma, focusmon, {.i = -1 } },
- { MODKEY, XK_period, focusmon, {.i = +1 } },
-// Tags
- { MODKEY, XK_0, view, {.ui = ~0 } },
- { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
- { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
- { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
- TAGKEYS( XK_l, 0)
- TAGKEYS( XK_u, 1)
- TAGKEYS( XK_y, 2)
- TAGKEYS( XK_semicolon, 3)
- TAGKEYS( XK_q, 4)
- TAGKEYS( XK_w, 5)
- TAGKEYS( XK_f, 6)
- TAGKEYS( XK_p, 7)
- TAGKEYS( XK_b, 8)
- { MODKEY|ShiftMask|ControlMask, XK_q, quit, {0} },
+ /* modifier key function argument */
+
+ // Commands
+ { MODKEY, XK_t, spawn, {.v = termcmd} },
+ { MODKEY, XK_d, spawn, {.v = menucmd} },
+ { MODKEY|ShiftMask, XK_space, spawn, {.v = albumbler } },
+ { MODKEY|ShiftMask|ControlMask, XK_space, spawn, {.v = now_playing } },
+ { MODKEY, XK_x, spawn, {.v = lock } },
+ { MODKEY, XK_p, spawn, {.v = flameshot } },
+ { MODKEY|ShiftMask|ControlMask, XK_q, quit, {0} },
+
+ // Multimedia
+ { 0, XF86AudioLowerVolume, spawn, {.v = vol_dn } },
+ { 0, XF86AudioMute, spawn, {.v = vol_mt } },
+ { 0, XF86AudioRaiseVolume, spawn, {.v = vol_up } },
+ { 0, XF86AudioPlay, spawn, {.v = mpc_toggle } },
+ { 0, XF86AudioStop, spawn, {.v = mpc_stop } },
+ { 0, XF86AudioPrev, spawn, {.v = mpc_prev } },
+ { 0, XF86AudioNext, spawn, {.v = mpc_next } },
+
+ // Windows
+ { MODKEY, XK_c, focusstack, {.i = +1 } },
+ { MODKEY, XK_i, focusstack, {.i = -1 } },
+ { MODKEY|ShiftMask, XK_c, incnmaster, {.i = +1 } },
+ { MODKEY|ShiftMask, XK_i, incnmaster, {.i = -1 } },
+ { MODKEY, XK_e, setmfact, {.f = -0.05} },
+ { MODKEY, XK_n, setmfact, {.f = +0.05} },
+ { MODKEY, XK_Return, zoom, {0} },
+ { MODKEY, XK_Tab, view, {0} },
+ { MODKEY|ShiftMask, XK_k, killclient, {0} },
+
+ // Layout
+ { MODKEY, XK_s, setlayout, {.v = &layouts[0]} },
+ { MODKEY, XK_r, setlayout, {.v = &layouts[1]} },
+ { MODKEY, XK_a, setlayout, {.v = &layouts[2]} },
+ { MODKEY|ShiftMask, XK_r, togglefloating, {0} },
+ { MODKEY, XK_comma, focusmon, {.i = -1 } },
+ { MODKEY, XK_b, focusmon, {.i = +1 } },
+
+ // Tags
+ { MODKEY, XK_0, view, {.ui = ~0 } },
+ { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
+ { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
+ { MODKEY|ShiftMask, XK_b, tagmon, {.i = +1 } },
+ TAGKEYS( XK_f, 0)
+ TAGKEYS( XK_u, 1)
+ TAGKEYS( XK_h, 2)
+ TAGKEYS( XK_period, 3)
+ TAGKEYS( XK_v, 4)
+ TAGKEYS( XK_l, 5)
+ TAGKEYS( XK_o, 6)
+ TAGKEYS( XK_m, 7)
};
/* button definitions */
diff --git a/dwm-6.2/dwm.c b/dwm-6.2/dwm.c
index 370f484..27e1105 100644
--- a/dwm-6.2/dwm.c
+++ b/dwm-6.2/dwm.c
@@ -225,7 +225,6 @@ static void resizemouse(const Arg *arg);
static void resizerequest(XEvent *e);
static void restack(Monitor *m);
static void run(void);
-static void runautostart(void);
static void scan(void);
static int sendevent(Window w, Atom proto, int m, long d0, long d1, long d2, long d3, long d4);
static void sendmon(Client *c, Monitor *m);
@@ -274,10 +273,6 @@ static void zoom(const Arg *arg);
/* variables */
static Systray *systray = NULL;
-static const char autostartblocksh[] = "autostart_blocking.sh";
-static const char autostartsh[] = "autostart.sh";
-static const char dwmdir[] = "dwm";
-static const char localshare[] = ".local/share";
static const char broken[] = "broken";
static char stext[256];
static int screen;
@@ -1464,17 +1459,17 @@ void
resizeclient(Client *c, int x, int y, int w, int h)
{
XWindowChanges wc;
- unsigned int gapoffset;
- unsigned int gapincr;
+ unsigned int gapoffset;
+ unsigned int gapincr;
wc.border_width = c->bw;
/* Do nothing if layout is floating */
if (c->isfloating || c->mon->lt[c->mon->sellt]->arrange == NULL) {
- gapincr = gapoffset = 0;
+ gapincr = gapoffset = 0;
} else {
- gapoffset = gappx;
- gapincr = 2 * gappx;
+ gapoffset = gappx;
+ gapincr = 2 * gappx;
}
c->oldx = c->x; c->x = wc.x = x + gapoffset;
@@ -1593,82 +1588,6 @@ run(void)
handler[ev.type](&ev); /* call handler */
}
-void
-runautostart(void)
-{
- char *pathpfx;
- char *path;
- char *xdgdatahome;
- char *home;
- struct stat sb;
-
- if ((home = getenv("HOME")) == NULL)
- /* this is almost impossible */
- return;
-
- /* if $XDG_DATA_HOME is set and not empty, use $XDG_DATA_HOME/dwm,
- * otherwise use ~/.local/share/dwm as autostart script directory
- */
- xdgdatahome = getenv("XDG_DATA_HOME");
- if (xdgdatahome != NULL && *xdgdatahome != '\0') {
- /* space for path segments, separators and nul */
- pathpfx = ecalloc(1, strlen(xdgdatahome) + strlen(dwmdir) + 2);
-
- if (sprintf(pathpfx, "%s/%s", xdgdatahome, dwmdir) <= 0) {
- free(pathpfx);
- return;
- }
- } else {
- /* space for path segments, separators and nul */
- pathpfx = ecalloc(1, strlen(home) + strlen(localshare)
- + strlen(dwmdir) + 3);
-
- if (sprintf(pathpfx, "%s/%s/%s", home, localshare, dwmdir) < 0) {
- free(pathpfx);
- return;
- }
- }
-
- /* check if the autostart script directory exists */
- if (! (stat(pathpfx, &sb) == 0 && S_ISDIR(sb.st_mode))) {
- /* the XDG conformant path does not exist or is no directory
- * so we try ~/.dwm instead
- */
- char *pathpfx_new = realloc(pathpfx, strlen(home) + strlen(dwmdir) + 3);
- if(pathpfx_new == NULL) {
- free(pathpfx);
- return;
- }
- pathpfx = pathpfx_new;
-
- if (sprintf(pathpfx, "%s/.%s", home, dwmdir) <= 0) {
- free(pathpfx);
- return;
- }
- }
-
- /* try the blocking script first */
- path = ecalloc(1, strlen(pathpfx) + strlen(autostartblocksh) + 2);
- if (sprintf(path, "%s/%s", pathpfx, autostartblocksh) <= 0) {
- free(path);
- free(pathpfx);
- }
-
- if (access(path, X_OK) == 0)
- system(path);
-
- /* now the non-blocking script */
- if (sprintf(path, "%s/%s", pathpfx, autostartsh) <= 0) {
- free(path);
- free(pathpfx);
- }
-
- if (access(path, X_OK) == 0)
- system(strcat(path, " &"));
-
- free(pathpfx);
- free(path);
-}
void
scan(void)
@@ -1948,8 +1867,6 @@ sigchld(int unused)
void
spawn(const Arg *arg)
{
- if (arg->v == dmenucmd)
- dmenumon[0] = '0' + selmon->num;
if (fork() == 0) {
if (dpy)
close(ConnectionNumber(dpy));
@@ -2665,7 +2582,6 @@ main(int argc, char *argv[])
die("pledge");
#endif /* __OpenBSD__ */
scan();
- runautostart();
run();
cleanup();
XCloseDisplay(dpy);
diff --git a/emacs/inits/20-programming.el b/emacs/inits/20-programming.el
index 9bea91e..e13ae8c 100644
--- a/emacs/inits/20-programming.el
+++ b/emacs/inits/20-programming.el
@@ -1,4 +1,4 @@
-;; Time-stamp: <2021-12-06 12h56 EST (hobbies)>
+;; Time-stamp: <2023-01-18 20h59 CET (anker)>
;; -----------------------------------------------------------------------------
;; General setup
@@ -37,19 +37,29 @@
(use-package hideshow
:bind (("C-c C-f C-f" . hs-toggle-hiding)))
+;; (use-package origami
+;; :ensure t
+;; :bind (("C-c C-f C-f" . origami-recursively-toggle-node)
+;; ("C-c C-f C-o" . origami-show-only-node)
+;; ("C-c C-f C-u" . origami-undo)
+;; ("C-c C-f C-r" . origami-redo))
+;; :config
+;; (global-origami-mode -1))
+
+
;; -----------------------------------------------------------------------------
;; Specific packages
(use-package shift-number
:ensure t
:bind (("C-c s p" . shift-number-up)
- ("C-c s n" . shift-number-down)))
+ ("C-c s n" . shift-number-down)))
(use-package comment-dwim-2
:ensure t
:bind (("M-;" . comment-dwim-2))
:config (setq comment-multi-line t
- comment-style 'extra-line))
+ comment-style 'extra-line))
(use-package aggressive-indent
:ensure t
@@ -64,10 +74,10 @@
:defer t
:config
(setq electric-pair-delete-adjacent-pairs t
- electric-pair-skip-self 'electric-pair-default-skip-self
- electric-pair-preserve-balance t
- electric-pair-skip-whitespace t
- electric-pair-inhibit-predicate 'electric-pair-default-inhibit))
+ electric-pair-skip-self 'electric-pair-default-skip-self
+ electric-pair-preserve-balance t
+ electric-pair-skip-whitespace t
+ electric-pair-inhibit-predicate 'electric-pair-default-inhibit))
(use-package lsp-mode
:ensure t
@@ -78,105 +88,106 @@
;; -----------------------------------------------------------------------------
;; C
-;; What are these?
-;; (setq gdb-show-threads-by-default nil
-;; gdb-many-windows nil
-;; gdb-show-main nil)
+(use-package clang-format
+ :ensure t
+ :defer
+ :config
+ (setq clang-format-style "file"))
(use-package cc-mode
:defer t
:bind (:map c-mode-map
- ("M-/" . lh-matching-delim))
+ ("M-/" . lh-matching-delim))
:hook (c-mode . (lambda ()
- (auto-fill-mode)
- (set-fill-column 80)
- (abbrev-mode 0)
- (flycheck-mode 1)
- (lsp) ;; clangd seems pretty good!
- (c-toggle-hungry-state 1)
- (c-toggle-electric-state 1)
- (c-toggle-syntactic-indentation 1)))
+ (auto-fill-mode)
+ (set-fill-column 80)
+ (abbrev-mode 0)
+ (flycheck-mode 1)
+ (lsp) ;; clangd seems pretty good!
+ (c-toggle-hungry-state 1)
+ (c-toggle-electric-state 1)
+ (c-toggle-syntactic-indentation 1)))
:config
(c-add-style "gnu-mod"
- '("gnu"
- (c-basic-offset . 2) ; Guessed value
- (c-offsets-alist
- (block-close . 0) ; Guessed value
- (case-label . +) ; Guessed value
- (defun-block-intro . +) ; Guessed value
- (defun-close . 0) ; Guessed value
- (statement . 0) ; Guessed value
- (statement-block-intro . +) ; Guessed value
- (statement-case-intro . 0) ; Guessed value
- (substatement . +) ; Guessed value
- (topmost-intro . 0) ; Guessed value
- (access-label . -)
- (annotation-top-cont . 0)
- (annotation-var-cont . +)
- (arglist-close . c-lineup-close-paren)
- (arglist-cont c-lineup-gcc-asm-reg 0)
- (arglist-cont-nonempty . c-lineup-arglist)
- (arglist-intro . +)
- (block-open . 0)
- (brace-entry-open . 0)
- (brace-list-close . 0)
- (brace-list-entry . 0)
- (brace-list-intro . +)
- (brace-list-open . 0)
- (c . c-lineup-C-comments)
- (catch-clause . 0)
- (class-close . 0)
- (class-open . 0)
- (comment-intro . c-lineup-comment)
- (composition-close . 0)
- (composition-open . 0)
- (cpp-define-intro c-lineup-cpp-define +)
- (cpp-macro . -1000)
- (cpp-macro-cont . +)
- (defun-open . 0)
- (do-while-closure . 0)
- (else-clause . 0)
- (extern-lang-close . 0)
- (extern-lang-open . 0)
- (friend . 0)
- (func-decl-cont . +)
- (inclass . +)
- (incomposition . +)
- (inexpr-class . +)
- (inexpr-statement . +)
- (inextern-lang . +)
- (inher-cont . c-lineup-multi-inher)
- (inher-intro . +)
- (inlambda . 0)
- (inline-close . 0)
- (inline-open . +)
- (inmodule . +)
- (innamespace . +)
- (knr-argdecl . 0)
- (knr-argdecl-intro . +)
- (label . 2)
- (lambda-intro-cont . +)
- (member-init-cont . c-lineup-multi-inher)
- (member-init-intro . +)
- (module-close . 0)
- (module-open . 0)
- (namespace-close . 0)
- (namespace-open . 0)
- (objc-method-args-cont . c-lineup-ObjC-method-args)
- (objc-method-call-cont c-lineup-ObjC-method-call-colons c-lineup-ObjC-method-call +)
- (objc-method-intro . [0])
- (statement-case-open . 0)
- (statement-cont . +)
- (stream-op . c-lineup-streamop)
- (string . -1000)
- (substatement-label . 2)
- (substatement-open . +)
- (template-args-cont c-lineup-template-args +)
- (topmost-intro-cont . c-lineup-topmost-intro-cont))))
+ '("gnu"
+ (c-basic-offset . 2) ; Guessed value
+ (c-offsets-alist
+ (block-close . 0) ; Guessed value
+ (case-label . +) ; Guessed value
+ (defun-block-intro . +) ; Guessed value
+ (defun-close . 0) ; Guessed value
+ (statement . 0) ; Guessed value
+ (statement-block-intro . +) ; Guessed value
+ (statement-case-intro . 0) ; Guessed value
+ (substatement . +) ; Guessed value
+ (topmost-intro . 0) ; Guessed value
+ (access-label . -)
+ (annotation-top-cont . 0)
+ (annotation-var-cont . +)
+ (arglist-close . c-lineup-close-paren)
+ (arglist-cont c-lineup-gcc-asm-reg 0)
+ (arglist-cont-nonempty . c-lineup-arglist)
+ (arglist-intro . +)
+ (block-open . 0)
+ (brace-entry-open . 0)
+ (brace-list-close . 0)
+ (brace-list-entry . 0)
+ (brace-list-intro . +)
+ (brace-list-open . 0)
+ (c . c-lineup-C-comments)
+ (catch-clause . 0)
+ (class-close . 0)
+ (class-open . 0)
+ (comment-intro . c-lineup-comment)
+ (composition-close . 0)
+ (composition-open . 0)
+ (cpp-define-intro c-lineup-cpp-define +)
+ (cpp-macro . -1000)
+ (cpp-macro-cont . +)
+ (defun-open . 0)
+ (do-while-closure . 0)
+ (else-clause . 0)
+ (extern-lang-close . 0)
+ (extern-lang-open . 0)
+ (friend . 0)
+ (func-decl-cont . +)
+ (inclass . +)
+ (incomposition . +)
+ (inexpr-class . +)
+ (inexpr-statement . +)
+ (inextern-lang . +)
+ (inher-cont . c-lineup-multi-inher)
+ (inher-intro . +)
+ (inlambda . 0)
+ (inline-close . 0)
+ (inline-open . +)
+ (inmodule . +)
+ (innamespace . +)
+ (knr-argdecl . 0)
+ (knr-argdecl-intro . +)
+ (label . 2)
+ (lambda-intro-cont . +)
+ (member-init-cont . c-lineup-multi-inher)
+ (member-init-intro . +)
+ (module-close . 0)
+ (module-open . 0)
+ (namespace-close . 0)
+ (namespace-open . 0)
+ (objc-method-args-cont . c-lineup-ObjC-method-args)
+ (objc-method-call-cont c-lineup-ObjC-method-call-colons c-lineup-ObjC-method-call +)
+ (objc-method-intro . [0])
+ (statement-case-open . 0)
+ (statement-cont . +)
+ (stream-op . c-lineup-streamop)
+ (string . -1000)
+ (substatement-label . 2)
+ (substatement-open . +)
+ (template-args-cont c-lineup-template-args +)
+ (topmost-intro-cont . c-lineup-topmost-intro-cont))))
(setq c-default-style '((java-mode . "java")
- (awk-mode . "awk")
- (other . "gnu-mod"))))
+ (awk-mode . "awk")
+ (other . "gnu-mod"))))
;; -----------------------------------------------------------------------------
@@ -194,23 +205,23 @@
:ensure t
:defer t
:bind (:map rust-mode-map
- ("M-," . lh-backward-delim)
- ("M-." . lh-forward-delim)
- ("M-/" . lh-matching-delim)
- ("M-p" . beginning-of-defun)
- ("M-n" . end-of-defun)
- ("C-c C-c" . rust-compile)
- ("C-c C-r" . rust-run))
+ ("M-," . lh-backward-delim)
+ ("M-." . lh-forward-delim)
+ ("M-/" . lh-matching-delim)
+ ("M-p" . beginning-of-defun)
+ ("M-n" . end-of-defun)
+ ("C-c C-c" . rust-compile)
+ ("C-c C-r" . rust-run))
:hook (rust-mode . (lambda ()
- (cargo-minor-mode)
- ;; For some reason this is not automatic
- (setq-local electric-pair-pairs
- (cons '(?' . ?') electric-pair-pairs))
- ;; Pair {} in rust format strings ... ?
- (setq-local electric-pair-text-pairs
- (cons '(?{ . ?}) electric-pair-pairs))
- (flycheck-rust-setup)
- (lsp)))
+ (cargo-minor-mode)
+ ;; For some reason this is not automatic
+ (setq-local electric-pair-pairs
+ (cons '(?' . ?') electric-pair-pairs))
+ ;; Pair {} in rust format strings ... ?
+ (setq-local electric-pair-text-pairs
+ (cons '(?{ . ?}) electric-pair-pairs))
+ (flycheck-rust-setup)
+ (lsp)))
:config
(setq rust-indent-offset 4
rust-indent-method-chain t
@@ -222,7 +233,6 @@
;; -----------------------------------------------------------------------------
;; Python
-
(use-package python-black
:ensure t
:after python
@@ -235,7 +245,7 @@
:config
(setq highlight-indent-guides-auto-odd-face-perc 1.5 ;; 10
highlight-indent-guides-auto-even-face-perc 3 ;; 15
-))
+ ))
(use-package python
:hook (python-mode . (lambda ()
@@ -261,33 +271,33 @@
(interactive)
(zig--run-cmd "build run"))
:bind (:map zig-mode-map
- ("M-," . lh-backward-delim)
- ("M-." . lh-forward-delim)
- ("M-/" . lh-matching-delim)
- ("M-p" . beginning-of-defun)
- ("M-n" . end-of-defun)
- ("C-c C-c" . zig-compile)
- ("C-c r" . zig-run)
- ("C-c C-r" . my-zig-run))
+ ("M-," . lh-backward-delim)
+ ("M-." . lh-forward-delim)
+ ("M-/" . lh-matching-delim)
+ ("M-p" . beginning-of-defun)
+ ("M-n" . end-of-defun)
+ ("C-c C-c" . zig-compile)
+ ("C-c r" . zig-run)
+ ("C-c C-r" . my-zig-run))
:config
(require 'lsp)
(setq zig-format-on-save nil
- lsp-zig-zls-executable "~/prog/zig/zls/zig-out/bin/zls"))
+ lsp-zig-zls-executable "~/.local/bin/zls"))
;; -------------------------------------------------------------------
;; OCaml
-(use-package utop
- :ensure t
- :defer t
- :config
- (setq utop-command "opam config exec -- utop -emacs"))
+;; (use-package utop
+;; :ensure t
+;; :defer t
+;; :config
+;; (setq utop-command "opam config exec -- utop -emacs"))
-(use-package tuareg
- :ensure t
- :defer t
- :hook (tuareg-mode . (lambda ()
- (utop-minor-mode))))
+;; (use-package tuareg
+;; :ensure t
+;; :defer t
+;; :hook (tuareg-mode . (lambda ()
+;; (utop-minor-mode))))
;; -------------------------------------------------------------------
;; Misc languages
@@ -297,7 +307,7 @@
:defer t
:config
(setq js-comint-program-command "node"
- js-comint-program-arguments nil))
+ js-comint-program-arguments nil))
(use-package js2-mode
:ensure t
@@ -305,71 +315,78 @@
:after js-comint
:mode "\\.js$"
:bind (:map js2-mode-map
- ("TAB" . js2-indent-line)
- ("C-x C-e" . js-send-last-sexp)
- ("C-c C-b" . js-send-buffer)
- ("C-c C-l" . js-load-file))
+ ("TAB" . js2-indent-line)
+ ("C-x C-e" . js-send-last-sexp)
+ ("C-c C-b" . js-send-buffer)
+ ("C-c C-l" . js-load-file))
:hook (js2-mode . (lambda ()
- (auto-revert-mode -1)
- (yas-minor-mode-on))))
+ (auto-revert-mode -1)
+ (yas-minor-mode-on))))
(use-package nodemcu-mode
:ensure t
:defer t
:config
(setq nodemcu-default-keybindings t
- nodemcu-port "/dev/ttyUSB0"
- nodemcu-backend "nodemcu-uploader")
+ nodemcu-port "/dev/ttyUSB0"
+ nodemcu-backend "nodemcu-uploader")
(defun nodemcu-better-upload-current-file (&optional noreset)
(interactive "P")
(let ((proc (get-process "nodemcu-terminal")))
(when proc
- (delete-process proc))
+ (delete-process proc))
(shell-command
(nodemcu--get-command "upload" (file-name-nondirectory (buffer-file-name))))
(unless noreset
- (shell-command
- (nodemcu--get-command "node restart"))
- (when proc
- (nodemcu-terminal))))))
+ (shell-command
+ (nodemcu--get-command "node restart"))
+ (when proc
+ (nodemcu-terminal))))))
(use-package lua-mode
:after nodemcu-mode
:ensure t
:defer t
:bind (:map lua-mode-map
- ("C-x C-e" . lua-send-current-line)
- ("C-c C-d" . lua-send-defun)
- ("C-c C-e" . lua-send-region)
- ("C-c C-u" . nodemcu-better-upload-current-file)
- ("C-c C-t" . nodemcu-terminal)
- ("M-n" . lua-forward-sexp)
- ("M-p" . lua-backwards-to-block-begin-or-end))
+ ("C-x C-e" . lua-send-current-line)
+ ("C-c C-d" . lua-send-defun)
+ ("C-c C-e" . lua-send-region)
+ ("C-c C-u" . nodemcu-better-upload-current-file)
+ ("C-c C-t" . nodemcu-terminal)
+ ("M-n" . lua-forward-sexp)
+ ("M-p" . lua-backwards-to-block-begin-or-end))
:hook (lua-mode . (lambda ()
- (require 'nodemcu-mode)
- (nodemcu-mode 1))))
+ (require 'nodemcu-mode)
+ (nodemcu-mode 1))))
(use-package verilog-mode
:ensure t
:defer t
:mode "\\.vl$"
:hook (verilog-mode . (lambda ()
- (setq verilog-tool 'verilog-compiler)
- (verilog-set-compile-command)))
+ (setq verilog-tool 'verilog-compiler)
+ (verilog-set-compile-command)))
:config
(setq verilog-compiler "iverilog"
- verilog-tool 'verilog-compiler))
+ verilog-tool 'verilog-compiler))
(use-package gforth
:commands forth-mode
:mode (("\\.fs$" . forth-mode)
- ("\\.fb$" . forth-block-mode)
- ("\\.4th$" . forth-mode)))
+ ("\\.fb$" . forth-block-mode)
+ ("\\.4th$" . forth-mode)))
-(use-package clojure-mode
+;; (use-package clojure-mode
+;; :ensure t
+;; :defer t)
+
+(use-package uxntal-mode
:ensure t
- :defer t)
+ :defer t
+ :config
+ (setq uxntal-mode-strict-comments t))
+
;; -------------------------------------------------------------------
;; JSON and related