Merge remote-tracking branch 'origin/unstable' into unstable

unstable^2
Penguin 2 months ago
commit d74b3c3fdc

@ -23,6 +23,7 @@
(load! "penguin/misc.el")
(load! "penguin/local.el")
(load! "penguin/serial-terminator.el")
(load! "penguin/wgetpaste.el")
(setq x-super-keysym 'meta)
;; credit: yorickvP on Github

@ -9,8 +9,9 @@
org-directory "~/Documents/org/"
org-roam-directory "~/Documents/org/"
org-attach-id-dir ".attach/"
org-journal-dir "~/Documents/org/"
+org-capture-journal-file "journal.org"
org-agenda-files '("agendas.org" "todo.org")
org-agenda-files '("agendas.org" "todo.org" "journal.org")
org-fancy-priorities-list '("󰈅󰈅󰈅" "󰈅󰈅" "󰈅")
org-link-file-path-type 'relative)
(use-package! ox-extra

@ -0,0 +1,99 @@
;;; wgetpaste.el --- -*- lexical-binding: t; -*-
;; Copyright (C) 2024 John Turner
;; Author: John Turner <jturner.usa@gmail.com>
;; Keywords:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
(defgroup wgetpaste nil
"Wgetpaste interface for emacs")
(defcustom wgetpaste-stdout-buffer "*wgetpaste stdout*"
"Wgetpaste stdout buffer")
(defcustom wgetpaste-stderr-buffer "*wgetpaste stderr*"
"Wgetpaste stderr buffer")
(defcustom wgetpaste-executable "wgetpaste"
"Wgetpaste executable")
(defcustom wgetpaste-args nil
"Wgetpaste arguments")
(defcustom wgetpaste-install-hooks t
"Install default wgetpaste hooks")
(defcustom wgetpaste-before-upload-hook nil
"Hooks to run before uploading a paste")
(defcustom wgetpaste-after-upload-hook nil
"Hooks to run after wgetpaste process exits successfully")
(defcustom wgetpaste-upload-failure-hook nil
"Hooks to run after wgetpaste process exits unsuccessfully")
(defun wgetpaste-buffer ()
(run-hooks 'wgetpaste-before-upload-hook)
(let ((process (make-process
:name "wgetpaste"
:command `(,wgetpaste-executable ,@wgetpaste-args)
:connection-type 'pipe
:buffer (get-buffer-create wgetpaste-stdout-buffer)
:stderr (get-buffer-create wgetpaste-stderr-buffer)
:sentinel (lambda (process event)
(unless (process-live-p process)
(when (zerop (process-exit-status process))
(run-hooks 'wgetpaste-after-upload-hook)))))))
(process-send-region process (point-min) (point-max))
(process-send-eof process)
process))
(defun wgetpaste ()
(interactive)
(let* ((region (if (region-active-p)
(cons (region-beginning) (region-end))
(cons (point-min) (point-max))))
(work-buffer (generate-new-buffer " *wgetpaste work buffer*" t)))
(copy-to-buffer work-buffer (car region) (cdr region))
(with-current-buffer work-buffer
(wgetpaste-buffer))))
;; hooks
(defun wgetpaste-clear-stdout-buffer ()
(if (get-buffer wgetpaste-stdout-buffer)
(with-current-buffer wgetpaste-stdout-buffer (erase-buffer))
(message "wgetpaste failed, see wgetpaste stderr buffer for error information")))
(defun wgetpaste-save-url-to-clipboard ()
(if (get-buffer wgetpaste-stdout-buffer)
(progn
(with-current-buffer wgetpaste-stdout-buffer
(let ((url (buffer-substring (point-min) (point-max))))
(message "%s saved to kill ring" url)
(kill-ring-save (point-min) (point-max)))))
(message "wgetpaste failed, see wgetpaste stderr buffer for error information")))
(defun wgetpaste-failed ()
(message "wgetpaste failed, see wgetpaste stderr buffer for error information"))
(when wgetpaste-install-hooks
(add-hook 'wgetpaste-before-upload-hook 'wgetpaste-clear-stdout-buffer)
(add-hook 'wgetpaste-after-upload-hook 'wgetpaste-save-url-to-clipboard)
(add-hook 'wgetpaste-upload-failure-hook 'wgetpaste-failed))
(provide 'wgetpaste)
;;; wgetpaste.el ends here

@ -41,7 +41,8 @@ bindsym $mod+Shift+q kill
# start program launcher
#bindsym $mod+d exec --no-startup-id dmenu_recency
bindsym $mod+d exec --no-startup-id rofi -run-list-command ". ~/.bash_aliases" -run-command "/bin/bash -i -c '{cmd}'" -show run -theme "$HOME/.config/rofi/launchers/type-6/style-3.rasi"
bindsym $mod+z exec --no-startup-id morc_menu
# bindsym $mod+z exec --no-startup-id morc_menu
bindsym $mod+z exec --no-startup-id flameshot gui
################################################################################################
## sound-section - DO NOT EDIT if you wish to automatically upgrade Alsa -> Pulseaudio later! ##

@ -1,22 +1,78 @@
# Table of Contents
1. [Background](#org55f2a10)
2. [Usage](#orgd4ac34e)
1. [Background](#org2052e5d)
2. [Prerequisites](#orgcf6f1f4)
3. [Usage](#orgca8ca43)
4. [Fonts](#org876630a)
5. [Doom Emacs](#org10bd73b)
1. [Install Doom Emacs](#org5c95f01)
2. [Install optional programs for doom to use](#orga4740be)
3. [Check doom status](#org7ff8edf)
<a id="org55f2a10"></a>
<a id="org2052e5d"></a>
# Background
This is my config. Maybe one day I&rsquo;ll make a readme on how to use it idk
I only use gentoo now and rely on some gentoo specific packages. You&rsquo;ll need to find your own alternatives to use this config. This is not a guide. This is just documentation of my setup, and it is largely incomplete.
<a id="orgd4ac34e"></a>
<a id="orgcf6f1f4"></a>
# Prerequisites
sudo emerge -a emacs neovim
<a id="orgca8ca43"></a>
# Usage
chmod u+x ./update-symlinks.sh
./update-symlinks.sh
<a id="org876630a"></a>
# Fonts
cat << EOF | sudo tee -a /etc/portage/package.accept_keywords/config.accept
media-fonts/robotomono-nerdfont ~amd64
media-fonts/firacode-nerdfont ~amd64
media-fonts/jetbrainsmono-nerdfont ~amd64
EOF
sudo emerge -a media-fonts/robotomono-nerdfont media-fonts/firacode-nerdfont media-fonts/jetbrainsmono-nerdfont
<a id="org10bd73b"></a>
# Doom Emacs
<a id="org5c95f01"></a>
## Install Doom Emacs
See instructions [here](https://github.com/doomemacs/doomemacs).
<a id="orga4740be"></a>
## Install optional programs for doom to use
These are optional and based on need. Don&rsquo;t use zig? Don&rsquo;t emerge it. Nothing will break.
sudo emerge -a sci-visualization/gnuplot dev-python/{black,pyflakes,isort,nose,poetry} dev-lang/zig
<a id="org7ff8edf"></a>
## Check doom status
doom doctor
This will let you know if you&rsquo;re missing anything.

@ -1,12 +1,48 @@
#+title: Penguin Config
#+author: Penguin
#+options: toc:t
* Background
This is my config. Maybe one day I'll make a readme on how to use it idk
I only use gentoo now and rely on some gentoo specific packages. You'll need to find your own alternatives to use this config. This is not a guide. This is just documentation of my setup, and it is largely incomplete.
* Prerequisites
#+begin_src bash
sudo emerge -a emacs neovim
#+end_src
* Usage
#+begin_src bash
chmod u+x ./update-symlinks.sh
./update-symlinks.sh
#+end_src
* Fonts
#+begin_src bash
cat << EOF | sudo tee -a /etc/portage/package.accept_keywords/config.accept
media-fonts/robotomono-nerdfont ~amd64
media-fonts/firacode-nerdfont ~amd64
media-fonts/jetbrainsmono-nerdfont ~amd64
EOF
sudo emerge -a media-fonts/robotomono-nerdfont media-fonts/firacode-nerdfont media-fonts/jetbrainsmono-nerdfont
#+end_src
* Doom Emacs
** Install Doom Emacs
See instructions [[https://github.com/doomemacs/doomemacs][here]].
** Install optional programs for doom to use
These are optional and based on need. Don't use zig? Don't emerge it. Nothing will break.
#+begin_src bash
sudo emerge -a sci-visualization/gnuplot dev-python/{black,pyflakes,isort,nose,poetry} dev-lang/zig
#+end_src
** Check doom status
#+begin_src bash
doom doctor
#+end_src
This will let you know if you're missing anything.

Loading…
Cancel
Save