summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/doom/config.el25
-rw-r--r--.config/doom/config.org42
-rw-r--r--.config/doom/custom-packages/private.el.example4
-rw-r--r--.config/doom/custom.el4
-rw-r--r--.config/doom/init.el3
-rw-r--r--.config/doom/packages.el3
-rw-r--r--.config/fish/config.fish4
-rw-r--r--.config/i3/config26
-rwxr-xr-x.config/i3/i3status_script.delete.later.sh (renamed from .config/i3/i3status_script.sh)0
-rwxr-xr-x.config/i3/scripts/i3lock_script.sh (renamed from .config/i3/i3lock_script.sh)0
-rwxr-xr-x.config/i3/scripts/toggle_dnd.sh10
-rw-r--r--.config/polybar/config7
-rwxr-xr-x.config/polybar/dnd_status.sh11
-rwxr-xr-x.config/polybar/protonvpn_status.sh11
14 files changed, 107 insertions, 43 deletions
diff --git a/.config/doom/config.el b/.config/doom/config.el
index 11eb6571..9d67a4d2 100644
--- a/.config/doom/config.el
+++ b/.config/doom/config.el
@@ -74,11 +74,9 @@
("B" "Book on the to-read-list" entry (file+headline "~/org/private.org" "Libros para leer") (file "~/org/templates/book.org") :empty-lines-after 2)
("p" "Create a daily plan")
("pP" "Daily plan private" plain (file+olp+datetree "~/org/plan-free.org") (file "~/org/templates/dailyplan.org") :immediate-finish t :jump-to-captured t)
- ("pX" "Daily plan X-Team" plain (file+olp+datetree "~/org/plan-xteam.org") (file "~/org/templates/dailyplan.org") :immediate-finish t :jump-to-captured t)
("pL" "Daily plan Lazer" plain (file+olp+datetree "~/org/plan-lazer.org") (file "~/org/templates/dailyplan.org") :immediate-finish t :jump-to-captured t)
("j" "Journal entry")
("jP" "Journal entry private" entry (file+olp+datetree "~/org/journal-private.org") "** %U - %^{Heading}")
- ("jX" "Journal entry X-Team" entry (file+olp+datetree "~/org/journal-xteam.org") "** %U - %^{Heading}")
("jL" "Journal entry Lazer" entry (file+olp+datetree "~/org/journal-lazer.org") "** %U - %^{Heading}")
)))
;; Custom agenda views
@@ -183,10 +181,6 @@
(interactive)
(setq org-agenda-files '("~/org/private.org"))
(message "Focusing on private Org files"))
- (defun org-focus-xteam() "Set focus on X-Team things."
- (interactive)
- (setq org-agenda-files '("~/org/xteam.org"))
- (message "Focusing on X-Team Org files"))
(defun org-focus-lazer() "Set focus on Lazer things."
(interactive)
(setq org-agenda-files '("~/org/lazer.org"))
@@ -259,7 +253,8 @@ text and copying to the killring."
;; (require 'auto-virtualenv)
(after! python
:init
- (add-hook 'python-mode-hook #'poetry-tracking-mode)
+ (require 'auto-virtualenv)
+ (add-hook 'python-mode-hook 'auto-virtualenv-set-virtualenv)
(setq enable-local-variables :all)
(setq poetry-tracking-strategy 'projectile))
@@ -336,7 +331,6 @@ text and copying to the killring."
(:prefix-map ("a" . "applications")
:desc "HTTP Status cheatsheet" "h" #'helm-httpstatus)
(:prefix-map ("ao" . "org")
- :desc "Org focus X-Team" "x" #'org-focus-xteam
:desc "Org focus Lazer" "l" #'org-focus-lazer
:desc "Org focus private" "p" #'org-focus-private
:desc "Org focus all" "a" #'org-focus-all
@@ -352,9 +346,20 @@ text and copying to the killring."
(add-hook 'magit-mode-hook (lambda () (magit-delta-mode +1)))
-(setq chatgpt-shell-model-version "gpt-4-1106-preview")
+(setq chatgpt-shell-model-version "gpt-4o")
(setq chatgpt-shell-streaming "t")
(setq chatgpt-shell-system-prompt "You are a senior developer knowledgeable in every programming language")
+(setq chatgpt-shell-openai-key openai-key)
+(setq dall-e-shell-openai-key openai-key)
+
+(require 'llm-openai)
+(setq magit-gptcommit-llm-provider (make-llm-openai :key openai-key))
+(setq llm-warn-on-nonfree nil)
+
+(after! magit
+ (magit-gptcommit-mode 1)
+ (setq magit-gptcommit-prompt "You are an expert programmer writing a commit message. You went over every file diff that was changed in it. Summarize the commit into a single specific and cohesive theme. Remember to write in only one line, no more than 50 characters. Write your response using the imperative tense following the kernel git commit style guide. Write a high level title. THE FILE DIFFS:```%s```. Now write Commit message in follow template: [one line of summary]")
+ (magit-gptcommit-status-buffer-setup))
(use-package! copilot
:hook (prog-mode . copilot-mode)
@@ -374,4 +379,4 @@ text and copying to the killring."
(setq org-babel-default-header-args:plantuml
'((:results . "verbatim") (:exports . "results") (:cache . "no")))
(after! org
-(add-to-list 'org-src-lang-modes '("plantuml" . plantuml)))
+ (add-to-list 'org-src-lang-modes '("plantuml" . plantuml)))
diff --git a/.config/doom/config.org b/.config/doom/config.org
index bef6bce4..776132a9 100644
--- a/.config/doom/config.org
+++ b/.config/doom/config.org
@@ -142,11 +142,9 @@ TODO: Breakup later
("B" "Book on the to-read-list" entry (file+headline "~/org/private.org" "Libros para leer") (file "~/org/templates/book.org") :empty-lines-after 2)
("p" "Create a daily plan")
("pP" "Daily plan private" plain (file+olp+datetree "~/org/plan-free.org") (file "~/org/templates/dailyplan.org") :immediate-finish t :jump-to-captured t)
- ("pX" "Daily plan X-Team" plain (file+olp+datetree "~/org/plan-xteam.org") (file "~/org/templates/dailyplan.org") :immediate-finish t :jump-to-captured t)
("pL" "Daily plan Lazer" plain (file+olp+datetree "~/org/plan-lazer.org") (file "~/org/templates/dailyplan.org") :immediate-finish t :jump-to-captured t)
("j" "Journal entry")
("jP" "Journal entry private" entry (file+olp+datetree "~/org/journal-private.org") "** %U - %^{Heading}")
- ("jX" "Journal entry X-Team" entry (file+olp+datetree "~/org/journal-xteam.org") "** %U - %^{Heading}")
("jL" "Journal entry Lazer" entry (file+olp+datetree "~/org/journal-lazer.org") "** %U - %^{Heading}")
)))
;; Custom agenda views
@@ -251,10 +249,6 @@ TODO: Breakup later
(interactive)
(setq org-agenda-files '("~/org/private.org"))
(message "Focusing on private Org files"))
- (defun org-focus-xteam() "Set focus on X-Team things."
- (interactive)
- (setq org-agenda-files '("~/org/xteam.org"))
- (message "Focusing on X-Team Org files"))
(defun org-focus-lazer() "Set focus on Lazer things."
(interactive)
(setq org-agenda-files '("~/org/lazer.org"))
@@ -346,7 +340,8 @@ text and copying to the killring."
;; (require 'auto-virtualenv)
(after! python
:init
- (add-hook 'python-mode-hook #'poetry-tracking-mode)
+ (require 'auto-virtualenv)
+ (add-hook 'python-mode-hook 'auto-virtualenv-set-virtualenv)
(setq enable-local-variables :all)
(setq poetry-tracking-strategy 'projectile))
#+end_src
@@ -498,7 +493,6 @@ This is a custom menu for my own functions
(:prefix-map ("a" . "applications")
:desc "HTTP Status cheatsheet" "h" #'helm-httpstatus)
(:prefix-map ("ao" . "org")
- :desc "Org focus X-Team" "x" #'org-focus-xteam
:desc "Org focus Lazer" "l" #'org-focus-lazer
:desc "Org focus private" "p" #'org-focus-private
:desc "Org focus all" "a" #'org-focus-all
@@ -552,11 +546,34 @@ I had to do this to manage multiple git profiles.
:ID: 0a32d2a9-2156-42a3-90f7-419ac1a25496
:END:
+*** ChatGPT Shell
+:PROPERTIES:
+:ID: 9bdfbd96-deec-4335-8d2c-77fff0283708
+:END:
+
#+begin_src emacs-lisp
-(setq chatgpt-shell-model-version "gpt-4-1106-preview")
+(setq chatgpt-shell-model-version "gpt-4o")
(setq chatgpt-shell-streaming "t")
(setq chatgpt-shell-system-prompt "You are a senior developer knowledgeable in every programming language")
+(setq chatgpt-shell-openai-key openai-key)
+(setq dall-e-shell-openai-key openai-key)
#+end_src
+*** Magit GPT
+:PROPERTIES:
+:ID: 3f720f16-b7a3-4127-81e9-87d849827639
+:END:
+
+#+begin_src emacs-lisp
+(require 'llm-openai)
+(setq magit-gptcommit-llm-provider (make-llm-openai :key openai-key))
+(setq llm-warn-on-nonfree nil)
+
+(after! magit
+ (magit-gptcommit-mode 1)
+ (setq magit-gptcommit-prompt "You are an expert programmer writing a commit message. You went over every file diff that was changed in it. Summarize the commit into a single specific and cohesive theme. Remember to write in only one line, no more than 50 characters. Write your response using the imperative tense following the kernel git commit style guide. Write a high level title. THE FILE DIFFS:```%s```. Now write Commit message in follow template: [one line of summary]")
+ (magit-gptcommit-status-buffer-setup))
+#+end_src
+
** Github Copilot
:PROPERTIES:
:ID: 7f88ce20-846c-47e4-aeed-d853212c9db5
@@ -588,5 +605,10 @@ I had to do this to manage multiple git profiles.
(setq org-babel-default-header-args:plantuml
'((:results . "verbatim") (:exports . "results") (:cache . "no")))
(after! org
-(add-to-list 'org-src-lang-modes '("plantuml" . plantuml)))
+ (add-to-list 'org-src-lang-modes '("plantuml" . plantuml)))
#+end_src
+
+** Magit GPT
+:PROPERTIES:
+:ID: e7d6eea5-9fc2-478c-9bb3-6eb6c5665875
+:END:
diff --git a/.config/doom/custom-packages/private.el.example b/.config/doom/custom-packages/private.el.example
index 73355fb1..6b71a3d1 100644
--- a/.config/doom/custom-packages/private.el.example
+++ b/.config/doom/custom-packages/private.el.example
@@ -1,7 +1,5 @@
;;; custom-packages/private.el -*- lexical-binding: t; -*-
-
-(setq chatgpt-shell-openai-key "my-openai-key")
-(setq dall-e-shell-openai-key "my-openai-key")
+(defvar openai-key "a-big-openai-key")
(provide 'private)
diff --git a/.config/doom/custom.el b/.config/doom/custom.el
index 3c0a1382..6dd06f51 100644
--- a/.config/doom/custom.el
+++ b/.config/doom/custom.el
@@ -5,7 +5,9 @@
;; If there is more than one, they won't work right.
'(magit-todos-insert-after '(bottom) nil nil "Changed by setter of obsolete option `magit-todos-insert-at'")
'(safe-local-variable-values
- '((lsp-pylsp-plugins-ruff-enabled . t)
+ '((magit-gptcommit-prompt . "You are an expert programmer writing a commit message. You went over every file diff that was changed in it. Summarize the commit into a single specific and cohesive theme. Remember to write in only one line, no more than 50 characters. Write your response using the imperative tense following the kernel git commit style guide. Write a high level title. THE FILE DIFFS:```%s```. Now write Commit message in follow template: [one line of summary]")
+ (lsp-eslint-working-directories . \./src)
+ (lsp-pylsp-plugins-ruff-enabled . t)
(poetry-tracking-strategy . "projectile")
(poetry-tracking-mode quote projectile)
(poetry-tracking-strategy quote projectile)
diff --git a/.config/doom/init.el b/.config/doom/init.el
index 9dc03c7d..8c58483c 100644
--- a/.config/doom/init.el
+++ b/.config/doom/init.el
@@ -161,8 +161,7 @@
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
(python
- +lsp
- +poetry) ; beautiful is better than ugly
+ +lsp)
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
diff --git a/.config/doom/packages.el b/.config/doom/packages.el
index 14e44121..0df2bb35 100644
--- a/.config/doom/packages.el
+++ b/.config/doom/packages.el
@@ -72,4 +72,5 @@
(package! deferred)
(package! ox-slack)
(package! org-auto-tangle)
-;; (package! poetry)
+(package! auto-virtualenv)
+(package! magit-gptcommit)
diff --git a/.config/fish/config.fish b/.config/fish/config.fish
index 72ad6db0..b2592b76 100644
--- a/.config/fish/config.fish
+++ b/.config/fish/config.fish
@@ -28,6 +28,7 @@ source "$HOME/.config/fish/abbreviations.fish"
alias cpuinfo="watch -n1 'grep \"^[c]pu MHz\" /proc/cpuinfo'"
alias vpn-on="sudo protonvpn c --cc US -p UDP"
alias vpn-off="sudo protonvpn d"
+alias fix-bluetooth="sudo systemctl restart bluetooth.service && sleep 10 && sudo systemctl restart logid.service && bash ~/.config/i3/connect-speakers.sh > /dev/null 2>&1"
# tabtab source for packages
# uninstall by removing these lines
@@ -45,3 +46,6 @@ end
if command -v kubectl >/dev/null
eval (kubectl completion fish | source)
end
+
+# ASDF
+source ~/.asdf/asdf.fish
diff --git a/.config/i3/config b/.config/i3/config
index f8ff71bb..38fc4892 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -29,7 +29,7 @@ font pango:DejaVu Sans Mono 8
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
-exec --no-startup-id xss-lock --transfer-sleep-lock ~/.config/i3/i3lock_script.sh
+exec --no-startup-id xss-lock --transfer-sleep-lock ~/.config/i3/scripts/i3lock_script.sh
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
@@ -192,7 +192,7 @@ bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# lock the screen
-set $Locker exec "~/.config/i3/i3lock_script.sh"
+set $Locker exec "~/.config/i3/scripts/i3lock_script.sh"
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
@@ -227,14 +227,17 @@ bindsym $aux+Shift+u exec setxkbmap us
bindsym Print exec scrot ~/Pictures/%Y-%m-%d-%H%M%S.png
bindsym --release Shift+F12 exec scrot -s -f ~/Pictures/%Y-%m-%d-%H%M%S.png
bindsym --release Ctrl+Shift+F12 exec scrot -s -f -o "/tmp/image.png" && xclip -selection clipboard -t image/png -i /tmp/image.png
-bindsym --release Ctrl+Shift+F11 exec ksnip -r -p "/tmp/image.png"
+bindsym --release Ctrl+Shift+F11 exec flameshot gui
+
+# Do not disturb
+bindsym $mod+m exec "~/.config/i3/scripts/toggle_dnd.sh"
# Shortcuts
bindsym $aux+g exec loffice ~/Documents/Gastos/Gastos\ USD.ods
bindsym $aux+u exec loffice ~/Documents/Gastos/Gastos\ UYU.ods
bindsym $aux+b exec loffice ~/Documents/Gastos/BTC.ods
-bindsym $aux+l exec lollypop
+bindsym $aux+l exec feishin
# Disable focus follows
focus_follows_mouse no
@@ -257,10 +260,9 @@ assign [class="Element"] $ws4
assign [class="Evolution"] $ws5
assign [class="thunderbird"] $ws5
assign [class="Mailspring"] $ws5
-assign [class="Liferea"] $ws9
-assign [class="NewsFlash"] $ws9
for_window [class = "Spotify"] move to workspace $ws6
assign [class="Lollypop"] $ws6
+assign [class="feishin"] $ws6
assign [class="Clementine"] $ws6
assign [class="Sublime-music"] $ws6
assign [class="Thunar"] $ws7
@@ -269,6 +271,8 @@ assign [class="KeePassXC"] $ws8
assign [class="Bitwarden"] $ws8
assign [class="Joplin"] $ws9
assign [class="kdeconnect.app"] $ws9
+assign [class="Liferea"] $ws9
+assign [class="NewsFlash"] $ws9
# Open specific applications in floating mode
for_window [title="File Transfer*"] floating enable
@@ -281,12 +285,7 @@ for_window [urgent=latest] focus
# Autostarts
exec --no-startup-id sleep 20; exec /usr/bin/thunderbird
-# exec --no-startup-id exec /usr/bin/mailspring
-exec --no-startup-id exec /usr/bin/nextcloud --background
-# exec --no-startup-id exec /usr/bin/evolution
-# exec_always --no-startup-id .config/conky/start.sh
exec --no-startup-id exec emacsclient -c -a emacs
-# exec --no-startup-id exec /usr/bin/librewolf
exec --no-startup-id sleep 5; exec /usr/bin/firefox
exec --no-startup-id sleep 5; exec $terminal
exec --no-startup-id sleep 10; exec nitrogen --restore
@@ -295,13 +294,10 @@ exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id /usr/bin/unclutter
exec --no-startup-id xfce4-power-manager
exec --no-startup-id pamac-tray
-exec --no-startup-id exec /opt/Mullvad\ VPN/mullvad-gui --no-sandbox
exec_always --no-startup-id sleep 5; exec picom
exec --no-startup-id /usr/lib/xfce4/notifyd/xfce4-notifyd
exec_always --no-startup-id autotiling
exec --no-startup-id xinput set-prop 14 345 1
-exec --no-startup-id exec /usr/bin/bitwarden-desktop
-# exec --no-startup-id exec /usr/bin/keepassxc
exec --no-startup-id exec /usr/bin/play-with-mpv
exec --no-startup-id exec "~/.config/i3/connect-speakers.sh"
exec --no-startup-id sleep 5; exec /usr/bin/kdeconnect-app
@@ -309,7 +305,7 @@ exec dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPL
# Random scripts
## Generate a random password and copy it to the clipboard
-bindsym $aux+p exec --no-startup-id "tr -dc 'A-Za-z0-9!#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' </dev/urandom | head -c 50 | xclip -selection clipboard && notify-send 'Copied a random password to the clipboard'"
+bindsym $aux+p exec --no-startup-id "tr -dc 'A-Za-z0-9!#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' </dev/urandom | head -c 50 | xclip -selection clipboard && notify-send 'Copied a random password to the clipboard' -i password"
# Window colors
# class border backgr. text indicator child_border
diff --git a/.config/i3/i3status_script.sh b/.config/i3/i3status_script.delete.later.sh
index b7788360..b7788360 100755
--- a/.config/i3/i3status_script.sh
+++ b/.config/i3/i3status_script.delete.later.sh
diff --git a/.config/i3/i3lock_script.sh b/.config/i3/scripts/i3lock_script.sh
index 4af57b56..4af57b56 100755
--- a/.config/i3/i3lock_script.sh
+++ b/.config/i3/scripts/i3lock_script.sh
diff --git a/.config/i3/scripts/toggle_dnd.sh b/.config/i3/scripts/toggle_dnd.sh
new file mode 100755
index 00000000..a11a4f83
--- /dev/null
+++ b/.config/i3/scripts/toggle_dnd.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+state=$(xfconf-query -c xfce4-notifyd -p /do-not-disturb)
+if [ "$state" = "true" ]; then
+ xfconf-query -c xfce4-notifyd -p /do-not-disturb -s false
+ notify-send "Do not disturb: Disabled" -t 2000 -i notification
+else
+ xfconf-query -c xfce4-notifyd -p /do-not-disturb -s true
+ notify-send -u critical "Do not disturb: Enabled" -t 2000 -i notification
+fi
diff --git a/.config/polybar/config b/.config/polybar/config
index e05f08bc..3f035d54 100644
--- a/.config/polybar/config
+++ b/.config/polybar/config
@@ -35,7 +35,7 @@ font-4 = FontAwesome:size=10;0
font-5 = Noto Color Emoji:scale=12;0
modules-left = i3 music
modules-center = xwindow
-modules-right = pulseaudio xkeyboard cpu memory wireless-network protonvpn-status battery clock
+modules-right = pulseaudio xkeyboard cpu memory wireless-network protonvpn-status dnd battery clock
[module/i3]
@@ -141,6 +141,11 @@ type = custom/script
exec = /home/roger/.config/polybar/protonvpn_status.sh
interval = 5
+[module/dnd]
+type = custom/script
+exec = /home/roger/.config/polybar/dnd_status.sh
+interval = 1
+
[module/cpu-temperature]
type = internal/temperature
interval = 0.5
diff --git a/.config/polybar/dnd_status.sh b/.config/polybar/dnd_status.sh
new file mode 100755
index 00000000..c4e798c7
--- /dev/null
+++ b/.config/polybar/dnd_status.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+set -euo pipefail
+IFS=$'\n\t'
+
+STATE=$(xfconf-query -c xfce4-notifyd -p /do-not-disturb)
+
+if [ "$STATE" = "true" ]; then
+ echo "DND ✅"
+else
+ echo "DND ❌"
+fi
diff --git a/.config/polybar/protonvpn_status.sh b/.config/polybar/protonvpn_status.sh
new file mode 100755
index 00000000..1e2b90a4
--- /dev/null
+++ b/.config/polybar/protonvpn_status.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+set -euo pipefail
+IFS=$'\n\t'
+
+PROTONVPN_STATUS=$(curl -s https://am.i.mullvad.net/country)
+
+if echo $PROTONVPN_STATUS | grep -q 'Uruguay'; then
+ echo "%{u#f90000}VPN %{T5}🚫%{T-}"
+ else
+ echo "%{u#75d85a}VPN %{T5}✅%{T-}"
+fi