;;; package --- Summary ;;; Commentary: ;;; Random functions for my daily use. ;;; Code: (defun apollo/html-boostrap-boilerplate () "Insert html boilerplate with boostrap link." (interactive) (insert " My Title

Starting point

" )) (defun apollo/center-buffer () "Centers/Uncenters selected buffer" (interactive) (if visual-fill-column-center-text (setq visual-fill-column-center-text nil) (setq visual-fill-column-center-text t)) (visual-fill-column-mode 1) (message "General's task completed!")) (defun apollo/rofi-switch-window () "Navigate X11 buffers using rofi." (interactive) (start-process-shell-command "rofi" nil "rofi -show window")) (defun apollo/run-in-background (command) "Run COMMAND in the background." (let ((command-parts (split-string command "[ ]+"))) (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts))))) (defun rofi () "Run Rofi." (interactive) (apollo/run-in-background "rofi -show drun")) (defun apollo/volume-increase () "Increase Volume." (interactive) (start-process-shell-command "amixer" nil "amixer sset Master 5%+")) (defun apollo/volume-decrease () "Decrease Volume." (interactive) (start-process-shell-command "amixer" nil "amixer sset Master 5%-")) (defun apollo/restore-wallpaper () "Set NAME as wallpaper." (interactive) (start-process-shell-command "feh" nil "feh --bg-scale ~/dotfiles/wallpaper.png")) (defun apollo/emacs-keys () "Swap caps with ctrl." (interactive) (start-process-shell-command "setxkbmap" nil "setxkbmap us -option ctrl:swapcaps")) (defun apollo/greek-keyboard () "Swap caps with ctrl." (interactive) (start-process-shell-command "setxkbmap" nil "setxkbmap gr")) (defun apollo/exwm-init-hook () "Do this upon start." (display-battery-mode 0) ;;Change to 1 to display battery (setq display-time-day-and-date t) (display-time-mode 1) ;;Launch apps that will run in the background ;; (apollo/run-in-background "blueman-applet") (apollo/run-in-background "picom") ;; (apollo/run-in-background "nm-applet") (apollo/emacs-keys) (apollo/set-wallpaper) (start-polybar) ) (defun apollo/exwm-update-class () (exwm-workspace-rename-buffer exwm-class-name)) (defun eshell-new() "Open a new instance of eshell." (interactive) (eshell 'N)) (defun make-mini-buffer () (interactive) (split-window-below 40) (other-window 1)) (defun make-mini-geiser () (interactive) (split-window-below 60) (geiser nil)) (defun start-polybar () "Check which system is running, start polybar accordingly." (interactive) (if (string= (system-name) "fsociety") (start-process-shell-command "polybar" nil "polybar main & polybar second") (start-process-shell-command "polybar" nil "polybar main"))) ;;; my-functions.el ends here