diff options
Diffstat (limited to '.config/emacs/modules/bd--exwm-windowing.el')
-rw-r--r-- | .config/emacs/modules/bd--exwm-windowing.el | 73 |
1 files changed, 2 insertions, 71 deletions
diff --git a/.config/emacs/modules/bd--exwm-windowing.el b/.config/emacs/modules/bd--exwm-windowing.el index ef4aa0f..2825b1a 100644 --- a/.config/emacs/modules/bd--exwm-windowing.el +++ b/.config/emacs/modules/bd--exwm-windowing.el @@ -3,76 +3,7 @@ ;;; Code: -(defun bd/lock () - "Lock the screen." - (interactive) - (start-process "lock" nil "slock")) - -(defun bd/shoot-full () - "Take a full-screen screenshot." - (interactive) - (let ((default-directory (xdg-user-dir "PICTURES"))) - (start-process-shell-command "flameshot" nil "flameshot full"))) - -(defun bd/shoot-part () - "Take a selective screen screenshot." - (interactive) - (let ((default-directory (xdg-user-dir "PICTURES"))) - (start-process-shell-command "flameshot" nil "flameshot launcher"))) - -(defun bd/toggle-mute () - "Toggle between muted and unmuted." - (interactive) - (start-process "sound toggle" nil "pactl" "set-sink-mute" "@DEFAULT_SINK@" "toggle")) - -(defun bd/set-volume (value) - "Sets the volume to VALUE." - (start-process "set volume" nil "pactl" "set-sink-volume" "@DEFAULT_SINK@" value)) - -(defun bd/decrement-volume () - "Decrements the volume." - (interactive) - (bd/set-volume "-4%")) - -(defun bd/increment-volume () - "Increments the volume." - (interactive) - (bd/set-volume "+4%")) - -(defun bd/set-brightness (value) - "Sets the brightness to VALUE." - (start-process "set brightness" nil "brightnessctl" "set" value)) - -(defun bd/decrement-brightness () - "decrements the brightness." - (interactive) - (bd/set-brightness "5%-")) - -(defun bd/increment-brightness () - "Increments the brightness." - (interactive) - (bd/set-brightness "5%+")) - -(defun set-bg (&optional arg) - "Set the current wallpaper using feh. -ARG can be one of the following: - -- nil: set the most recent wallpaper -- directory: set a random image from the directory -- file: set the specified file" - (interactive "f") - (let ((wall (expand-file-name "~/wf/wall/current"))) - (when arg - (cond - ((file-regular-p arg) (copy-file arg wall t)) - ((file-directory-p arg) - (let* ((images (f-files arg (lambda (f) (string-match-p "\\.jpeg\\'" f)))) - (rfile (nth (random (length images)) images))) - (and rfile (copy-file rfile wall t)))))) - (start-process "set wallpaper" nil "feh" "--bg-fill" wall) - (message "Set wallpaper."))) -(set-bg) - +(bd/set-bg) (use-package exwm :config @@ -164,4 +95,4 @@ that buffer." (add-to-list 'global-mode-string bd/external-mode-line) (provide 'bd--exwm-windowing) -;;; bd-exwm ends here +;;; bd--exwm-windowing.el ends here |