summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.emacs.d/init.el9
-rwxr-xr-xemacs.org173
2 files changed, 96 insertions, 86 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index bdc5b16..786b6db 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -532,7 +532,7 @@ you have the correctly set the OPENAI_API_KEY variable"
</head>
<body>
<main>
- <h1>Starting point</h1>
+ <h1>Starting point</h1>
</main>
<script src=\"index.js\"></script>
</body>
@@ -594,7 +594,7 @@ you have the correctly set the OPENAI_API_KEY variable"
(interactive)
(start-process-shell-command
"setxkbmap" nil "setxkbmap gr"))
-
+
(defun apollo/exwm-update-class ()
(exwm-workspace-rename-buffer exwm-class-name))
@@ -617,6 +617,11 @@ you have the correctly set the OPENAI_API_KEY variable"
(start-process-shell-command
"polybar" nil "polybar main")))
+(defun create-scratch-writter-buffer nil
+ "create a scratch buffer"
+ (interactive)
+ (switch-to-buffer (get-buffer-create "*scratch-writter*")))
+
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
(global-set-key (kbd "s-=") 'text-scale-increase)
(global-set-key (kbd "s--") 'text-scale-decrease)
diff --git a/emacs.org b/emacs.org
index 6f2c693..7787360 100755
--- a/emacs.org
+++ b/emacs.org
@@ -610,106 +610,111 @@ Hook with ~dired-mode~
#+end_src
** Random functions
#+begin_src emacs-lisp
-(defun apollo/html-boostrap-boilerplate ()
- "Insert html boilerplate with boostrap link."
- (interactive)
- (insert
-"<!DOCTYPE html>
-<html lang=\"en\">
- <head>
- <meta charset=\"UTF-8\">
- <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
- <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">
- <title>My Title</title>
- <link rel=\"stylesheet\" href=\"./style.css\">
- <link href=\"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi\" crossorigin=\"anonymous\">
- </head>
- <body>
- <main>
- <h1>Starting point</h1>
- </main>
- <script src=\"index.js\"></script>
- </body>
-</html>" ))
-
-
-(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/html-boostrap-boilerplate ()
+ "Insert html boilerplate with boostrap link."
+ (interactive)
+ (insert
+ "<!DOCTYPE html>
+ <html lang=\"en\">
+ <head>
+ <meta charset=\"UTF-8\">
+ <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
+ <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">
+ <title>My Title</title>
+ <link rel=\"stylesheet\" href=\"./style.css\">
+ <link href=\"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi\" crossorigin=\"anonymous\">
+ </head>
+ <body>
+ <main>
+ <h1>Starting point</h1>
+ </main>
+ <script src=\"index.js\"></script>
+ </body>
+ </html>" ))
+
+
+ (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/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/rofi-switch-window ()
+ "Navigate X11 buffers using rofi."
+ (interactive)
+ (start-process-shell-command
+ "rofi" nil "rofi -show window"))
-(defun apollo/volume-increase ()
- "Increase Volume."
- (interactive)
- (start-process-shell-command
- "amixer" nil "amixer sset Master 5%+"))
+ (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 apollo/volume-decrease ()
- "Decrease Volume."
- (interactive)
- (start-process-shell-command
- "amixer" nil "amixer sset Master 5%-"))
+ (defun rofi ()
+ "Run Rofi."
+ (interactive)
+ (apollo/run-in-background "rofi -show drun"))
-(defun apollo/restore-wallpaper ()
- "Set NAME as wallpaper."
- (interactive)
- (start-process-shell-command
- "feh" nil "feh --bg-scale ~/dotfiles/wallpaper.png"))
+ (defun apollo/volume-increase ()
+ "Increase Volume."
+ (interactive)
+ (start-process-shell-command
+ "amixer" nil "amixer sset Master 5%+"))
-(defun apollo/emacs-keys ()
- "Swap caps with ctrl."
+ (defun apollo/volume-decrease ()
+ "Decrease Volume."
(interactive)
(start-process-shell-command
- "setxkbmap" nil "setxkbmap us -option ctrl:swapcaps"))
+ "amixer" nil "amixer sset Master 5%-"))
-(defun apollo/greek-keyboard ()
- "Swap caps with ctrl."
+ (defun apollo/restore-wallpaper ()
+ "Set NAME as wallpaper."
(interactive)
(start-process-shell-command
- "setxkbmap" nil "setxkbmap gr"))
+ "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-update-class ()
- (exwm-workspace-rename-buffer exwm-class-name))
+ (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 eshell-new()
+ "Open a new instance of eshell."
+ (interactive)
+ (eshell 'N))
-(defun make-mini-geiser ()
- (interactive)
- (split-window-below 60)
- (geiser nil))
+ (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")
+ (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 & polybar second")
- (start-process-shell-command
- "polybar" nil "polybar main")))
+ "polybar" nil "polybar main")))
+
+ (defun create-scratch-writter-buffer nil
+ "create a scratch buffer"
+ (interactive)
+ (switch-to-buffer (get-buffer-create "*scratch-writter*")))
#+end_src
** Key-bindings
#+begin_src emacs-lisp