mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-08-09 17:41:12 +10:00
Minor edits.
This commit is contained in:
@@ -134,7 +134,7 @@ local modkey1 = "Control"
|
|||||||
local browser = "firefox"
|
local browser = "firefox"
|
||||||
local editor = os.getenv("EDITOR") or "vim"
|
local editor = os.getenv("EDITOR") or "vim"
|
||||||
local editorgui = "geany"
|
local editorgui = "geany"
|
||||||
local filemanager = "thunar"
|
local filemanager = "pcmanfm"
|
||||||
local mailclient = "geary"
|
local mailclient = "geary"
|
||||||
local mediaplayer = "vlc"
|
local mediaplayer = "vlc"
|
||||||
local scrlocker = "slimlock"
|
local scrlocker = "slimlock"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ mark-ovredir-focused = true;
|
|||||||
detect-client-opacity = true;
|
detect-client-opacity = true;
|
||||||
unredir-if-possible = true;
|
unredir-if-possible = true;
|
||||||
refresh-rate = 0;
|
refresh-rate = 0;
|
||||||
vsync = "false";
|
vsync = false;
|
||||||
dbe = false;
|
dbe = false;
|
||||||
focus-exclude = [ "class_g = 'Cairo-clock'" ];
|
focus-exclude = [ "class_g = 'Cairo-clock'" ];
|
||||||
detect-transient = true;
|
detect-transient = true;
|
||||||
|
|||||||
@@ -135,6 +135,7 @@
|
|||||||
|
|
||||||
(require 'exwm)
|
(require 'exwm)
|
||||||
(require 'exwm-config)
|
(require 'exwm-config)
|
||||||
|
(exwm-config-default)
|
||||||
(require 'exwm-systemtray)
|
(require 'exwm-systemtray)
|
||||||
(exwm-systemtray-enable)
|
(exwm-systemtray-enable)
|
||||||
(require 'exwm-randr)
|
(require 'exwm-randr)
|
||||||
@@ -214,6 +215,23 @@
|
|||||||
([?\s-m] . exwm-layout-toggle-mode-line)
|
([?\s-m] . exwm-layout-toggle-mode-line)
|
||||||
([f11] . exwm-layout-toggle-fullscreen)))
|
([f11] . exwm-layout-toggle-fullscreen)))
|
||||||
|
|
||||||
|
(defun dt/exwm-start-picom ()
|
||||||
|
(interactive)
|
||||||
|
(start-process-shell-command "picom" nil "picom"))
|
||||||
|
|
||||||
|
(defun dt/exwm-start-nm-applet ()
|
||||||
|
(interactive)
|
||||||
|
(start-process-shell-command "nm-applet" nil "nm-applet"))
|
||||||
|
|
||||||
|
(defun dt/exwm-start-volume-icon ()
|
||||||
|
(interactive)
|
||||||
|
(start-process-shell-command "volume-icon" nil "volume-icon"))
|
||||||
|
|
||||||
|
(after! exwm-config
|
||||||
|
(dt/exwm-start-picom)
|
||||||
|
(dt/exwm-start-nm-applet)
|
||||||
|
(dt/exwm-start-volume-icon))
|
||||||
|
|
||||||
(setq doom-font (font-spec :family "SauceCodePro Nerd Font Mono" :size 15)
|
(setq doom-font (font-spec :family "SauceCodePro Nerd Font Mono" :size 15)
|
||||||
doom-variable-pitch-font (font-spec :family "Ubuntu" :size 15)
|
doom-variable-pitch-font (font-spec :family "Ubuntu" :size 15)
|
||||||
doom-big-font (font-spec :family "SauceCodePro Nerd Font Mono" :size 24))
|
doom-big-font (font-spec :family "SauceCodePro Nerd Font Mono" :size 24))
|
||||||
@@ -346,6 +364,26 @@
|
|||||||
"DONE(d)" ; Task has been completed
|
"DONE(d)" ; Task has been completed
|
||||||
"CANCELLED(c)" )))) ; Task has been cancelled
|
"CANCELLED(c)" )))) ; Task has been cancelled
|
||||||
|
|
||||||
|
(defun dt/org-babel-tangle-async (file)
|
||||||
|
"Invoke `org-babel-tangle-file' asynchronously."
|
||||||
|
(message "Tangling %s..." (buffer-file-name))
|
||||||
|
(async-start
|
||||||
|
(let ((args (list file)))
|
||||||
|
`(lambda ()
|
||||||
|
(require 'org)
|
||||||
|
;;(load "~/.emacs.d/init.el")
|
||||||
|
(let ((start-time (current-time)))
|
||||||
|
(apply #'org-babel-tangle-file ',args)
|
||||||
|
(format "%.2f" (float-time (time-since start-time))))))
|
||||||
|
(let ((message-string (format "Tangling %S completed after " file)))
|
||||||
|
`(lambda (tangle-time)
|
||||||
|
(message (concat ,message-string
|
||||||
|
(format "%s seconds" tangle-time)))))))
|
||||||
|
|
||||||
|
(defun dt/org-babel-tangle-current-buffer-async ()
|
||||||
|
"Tangle current buffer asynchronously."
|
||||||
|
(dt/org-babel-tangle-async (buffer-file-name)))
|
||||||
|
|
||||||
(map! :leader
|
(map! :leader
|
||||||
:desc "Copy to register"
|
:desc "Copy to register"
|
||||||
"r c" #'copy-to-register
|
"r c" #'copy-to-register
|
||||||
|
|||||||
@@ -277,6 +277,7 @@ Emacs can be your window manager. You need to install the exwm package (make su
|
|||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(require 'exwm)
|
(require 'exwm)
|
||||||
(require 'exwm-config)
|
(require 'exwm-config)
|
||||||
|
(exwm-config-default)
|
||||||
(require 'exwm-systemtray)
|
(require 'exwm-systemtray)
|
||||||
(exwm-systemtray-enable)
|
(exwm-systemtray-enable)
|
||||||
(require 'exwm-randr)
|
(require 'exwm-randr)
|
||||||
@@ -357,6 +358,27 @@ Emacs can be your window manager. You need to install the exwm package (make su
|
|||||||
([f11] . exwm-layout-toggle-fullscreen)))
|
([f11] . exwm-layout-toggle-fullscreen)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Below, I define a few functions that are really just some programs that I want to autostart when logging in to EXWM. Note that I don't execute these until after EXWM has started.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun dt/exwm-start-picom ()
|
||||||
|
(interactive)
|
||||||
|
(start-process-shell-command "picom" nil "picom"))
|
||||||
|
|
||||||
|
(defun dt/exwm-start-nm-applet ()
|
||||||
|
(interactive)
|
||||||
|
(start-process-shell-command "nm-applet" nil "nm-applet"))
|
||||||
|
|
||||||
|
(defun dt/exwm-start-volume-icon ()
|
||||||
|
(interactive)
|
||||||
|
(start-process-shell-command "volume-icon" nil "volume-icon"))
|
||||||
|
|
||||||
|
(after! exwm-config
|
||||||
|
(dt/exwm-start-picom)
|
||||||
|
(dt/exwm-start-nm-applet)
|
||||||
|
(dt/exwm-start-volume-icon))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* FONTS
|
* FONTS
|
||||||
Settings related to fonts within Doom Emacs:
|
Settings related to fonts within Doom Emacs:
|
||||||
+ 'doom-font' -- standard monospace font that is used for most things in Emacs.
|
+ 'doom-font' -- standard monospace font that is used for most things in Emacs.
|
||||||
@@ -570,6 +592,31 @@ Note that I wrapped most of this in (after! org). Without this, my settings mig
|
|||||||
"|" ; The pipe necessary to separate "active" states and "inactive" states
|
"|" ; The pipe necessary to separate "active" states and "inactive" states
|
||||||
"DONE(d)" ; Task has been completed
|
"DONE(d)" ; Task has been completed
|
||||||
"CANCELLED(c)" )))) ; Task has been cancelled
|
"CANCELLED(c)" )))) ; Task has been cancelled
|
||||||
|
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
I was tired of having to run org-babel-tangle after saving my literate dotfiles. So the following function runs org-babel-tangle upon saving any org-mode buffer. This is asynchronous meaning that it dispatches the tangle function to a subprocess, so that the main Emacs is not blocked while it runs.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(defun dt/org-babel-tangle-async (file)
|
||||||
|
"Invoke `org-babel-tangle-file' asynchronously."
|
||||||
|
(message "Tangling %s..." (buffer-file-name))
|
||||||
|
(async-start
|
||||||
|
(let ((args (list file)))
|
||||||
|
`(lambda ()
|
||||||
|
(require 'org)
|
||||||
|
;;(load "~/.emacs.d/init.el")
|
||||||
|
(let ((start-time (current-time)))
|
||||||
|
(apply #'org-babel-tangle-file ',args)
|
||||||
|
(format "%.2f" (float-time (time-since start-time))))))
|
||||||
|
(let ((message-string (format "Tangling %S completed after " file)))
|
||||||
|
`(lambda (tangle-time)
|
||||||
|
(message (concat ,message-string
|
||||||
|
(format "%s seconds" tangle-time)))))))
|
||||||
|
|
||||||
|
(defun dt/org-babel-tangle-current-buffer-async ()
|
||||||
|
"Tangle current buffer asynchronously."
|
||||||
|
(dt/org-babel-tangle-async (buffer-file-name)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* REGISTERS
|
* REGISTERS
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
|
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
|
||||||
;(unpin! t)
|
;(unpin! t)
|
||||||
(package! all-the-icons-dired)
|
(package! all-the-icons-dired)
|
||||||
|
(package! async)
|
||||||
(package! dired-open)
|
(package! dired-open)
|
||||||
(package! dmenu)
|
(package! dmenu)
|
||||||
(package! elfeed)
|
(package! elfeed)
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
mem="$(free -h | awk '/^Mem:/ {print $3 "/" $2}')"
|
mem="$(free -h | awk '/^Mem:/ {print $3 "/" $2}')"
|
||||||
echo -e "$mem "
|
echo -e "$mem RAM "
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cupd=$(checkupdates | wc -l)
|
cupd=$(checkupdates | wc -l)
|
||||||
echo "$cupd available "
|
echo "$cupd updates "
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
vol="$(amixer get Master | tail -n1 | sed -r 's/.*\[(.*)%\].*/\1/')"
|
vol="$(amixer get Master | tail -n1 | sed -r 's/.*\[(.*)%\].*/\1/')"
|
||||||
echo "${vol}% "
|
echo "${vol}% volume "
|
||||||
|
|||||||
+6
-6
@@ -1,17 +1,17 @@
|
|||||||
//Modify this file to change what commands output to your statusbar, and recompile using the make command.
|
//Modify this file to change what commands output to your statusbar, and recompile using the make command.
|
||||||
static const Block blocks[] = {
|
static const Block blocks[] = {
|
||||||
/*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
|
/*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
|
||||||
{" Kernel: ", "/home/dt/.local/bin/kernel", 360, 2},
|
{" 🐧 ", "/home/dt/.local/bin/kernel", 360, 2},
|
||||||
|
|
||||||
{" Uptime: ", "/home/dt/.local/bin/upt", 60, 2},
|
{" 🔺 ", "/home/dt/.local/bin/upt", 60, 2},
|
||||||
|
|
||||||
{" Updates: ", "/home/dt/.local/bin/pacupdate", 360, 9},
|
{" 📦 ", "/home/dt/.local/bin/pacupdate", 360, 9},
|
||||||
|
|
||||||
{" Mem: ", "/home/dt/.local/bin/memory", 6, 1},
|
{" 💻 ", "/home/dt/.local/bin/memory", 6, 1},
|
||||||
|
|
||||||
{" Vol: ", "/home/dt/.local/bin/volume", 2, 10},
|
{" 🔊 ", "/home/dt/.local/bin/volume", 2, 10},
|
||||||
|
|
||||||
{" Time: ", "/home/dt/.local/bin/clock", 5, 0},
|
{" 🕑 ", "/home/dt/.local/bin/clock", 5, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
//sets delimeter between status commands. NULL character ('\0') means no delimeter.
|
//sets delimeter between status commands. NULL character ('\0') means no delimeter.
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user