Compare commits

..

5 Commits

Author SHA1 Message Date
Luis Guilherme Coelho 58a9713d4a
home-environments: radio: Fix fzf colors 2024-11-25 23:17:37 -03:00
Luis Guilherme Coelho ef7f250fdb
radio: packages: Add tree 2024-11-25 18:34:43 -03:00
Luis Guilherme Coelho bc43456bcd
home-environments: radio: Use mime-type lists from (radio mime-types) 2024-11-25 18:33:58 -03:00
Luis Guilherme Coelho 54004bf4bc
radio: Add mime-types 2024-11-25 18:32:59 -03:00
Luis Guilherme Coelho 62c1141d0f
radio: files: .local/bin: Remove screenshot 2024-11-25 14:31:38 -03:00
4 changed files with 85 additions and 79 deletions

View File

@ -28,6 +28,7 @@
#|Radio|# #|Radio|#
#|C|# #:use-module ((radio channels) #:prefix channel:) #|C|# #:use-module ((radio channels) #:prefix channel:)
#|P|# #:use-module ((radio packages) #:prefix packages:) #|P|# #:use-module ((radio packages) #:prefix packages:)
#|M|# #:use-module ((radio mime-types) #:prefix mime-types:)
#|S|# #:use-module ((radio shepherd-services) #:prefix shepherd-service:) #|S|# #:use-module ((radio shepherd-services) #:prefix shepherd-service:)
#|Radix|# #|Radix|#
@ -82,52 +83,13 @@
(service home-xdg-mime-applications-service-type (service home-xdg-mime-applications-service-type
(home-xdg-mime-applications-configuration (home-xdg-mime-applications-configuration
(default (associate-right (default (associate-right
('chromium.desktop ('chromium.desktop mime-types:browser)
`("application/xhtml+xml" ('kak.desktop mime-types:editor)
"application/x-extension-htm" ('lf.desktop mime-types:file-manager)
"application/x-extension-xhtml" ('mpv.desktop (append mime-types:audio
"application/x-extension-xht" mime-types:video))
"x-scheme-handler/http" ('imv.desktop mime-types:image)
"x-scheme-handler/https")) ('sioyek.desktop mime-types:document)))))
('kak.desktop
`("text/html"
"text/plain"
"text/troff"
"text/xml"
"text/x-c"
"text/x-c++"
"text/x-clojure"
"text/x-diff"
"text/x-lisp"
"text/x-scheme"
"text/x-script.python"
"text/x-shellscript"
"text/x-tex"))
('lf.desktop
`("inode/directory"
"x-scheme-handler/ftp"
"x-scheme-handler/nfs"
"x-scheme-handler/smb"
"x-scheme-handler/ssh"
"application/x-directory"))
('mpv.desktop
`("image/gif"
"audio/mpeg"
"audio/ogg"
"audio/opus"
"audio/x-opus+ogg"
"video/mp4"
"video/x-matroska"
"video/webm"))
('imv.desktop
`("image/avif"
"image/bmp"
"image/jpeg"
"image/png"
"image/svg+xml"
"image/webp"))
('sioyek.desktop
`("application/pdf"))))))
(service home-special-files-service-type (service home-special-files-service-type
`((".config/guix/home.scm" ,radio.scm))) `((".config/guix/home.scm" ,radio.scm)))
@ -200,6 +162,7 @@
--classify ~ --classify ~
--human-readable ~ --human-readable ~
-v")) -v"))
("tree" . "tree -CF --dirsfirst")
#|Clear terminal screen without ncurses|# #|Clear terminal screen without ncurses|#
("clear" . "printf \"\\033c\"") ("clear" . "printf \"\\033c\"")
@ -285,17 +248,24 @@
(environment-variables (environment-variables
;; adicionar toggle de dotfiles na lista e no preview ;; adicionar toggle de dotfiles na lista e no preview
;; adicionar toggle pro base-directory ser $PWD ;; adicionar toggle pro base-directory ser $PWD
`(("fzf_preview_dir_cmd" . "") `(("LS_COLORS" . "'di=01;34:ln=01;36:or=01;31'")
("FZF_DEFAULT_OPTS" . ("--filepath-word" ("fzf_preview_dir_cmd" . "")
"--height=~40%" ("FZF_DEFAULT_OPTS"
"--layout=reverse" . ("--filepath-word"
"--scheme=path" "--height=~40%"
"--scroll-off=2")) "--layout=reverse"
("fzf_fd_opts" . ("--absolute-path" "--scheme=path"
"--exclude='\\..*'" "--scroll-off=2"
"--follow" "--color=fg:blue,hl:#cccccc"
"--base-directory=$HOME" "--color=fg+:blue,hl+:#cccccc"
"--type=directory")))))) "--color=prompt:blue,pointer:blue"
"--color=info:#ffffff,border:#000000"))
("fzf_fd_opts"
. ("--absolute-path"
"--exclude='\\..*'"
"--follow"
"--base-directory=$HOME"
"--type=directory"))))))
#|Environment variables services|# #|Environment variables services|#
(simple-service 'home-shell-environment-variables (simple-service 'home-shell-environment-variables

View File

@ -1,21 +0,0 @@
#!/bin/sh
case "$1" in
"activewindow")
# Get active window geometry
eval $(xdotool getactivewindow getwindowgeometry --shell)
REGION="$((${WIDTH} + 10))x$((${HEIGHT}+10))+$((${X}-5))+$((${Y}-5))"
maim -Bg "${REGION}" | xclip -selection clipboard -t image/png;;
"selectwindow")
# Let the user select a window and get its geometry
eval $(xdotool selectwindow getwindowgeometry --shell)
REGION="$((${WIDTH} + 10))x$((${HEIGHT}+10))+$((${X}-5))+$((${Y}-5))"
maim -Bg "${REGION}" | xclip -selection clipboard -t image/png;;
"selectregion")
maim -s | xclip -selection clipboard -t image/png;;
*)
# Get current screen
SCREEN=$(xdotool get_desktop)
REGION="$(hostname):${SCREEN}.1"
maim -u | xclip -selection clipboard -t image/png;;
esac

View File

@ -0,0 +1,56 @@
(define-module (radio mime-types)
#:export (browser editor file-manager audio video image document))
(define browser
`("application/xhtml+xml"
"application/x-extension-htm"
"application/x-extension-xhtml"
"application/x-extension-xht"
"x-scheme-handler/http"
"x-scheme-handler/https"))
(define editor
`("text/html"
"text/plain"
"text/troff"
"text/xml"
"text/x-c"
"text/x-c++"
"text/x-clojure"
"text/x-diff"
"text/x-lisp"
"text/x-scheme"
"text/x-script.python"
"text/x-shellscript"
"text/x-tex"))
(define file-manager
`("inode/directory"
"x-scheme-handler/ftp"
"x-scheme-handler/nfs"
"x-scheme-handler/smb"
"x-scheme-handler/ssh"
"application/x-directory"))
(define audio
`("video/mp4"
"video/x-matroska"
"video/webm"))
(define video
`("audio/mpeg"
"audio/ogg"
"audio/opus"
"audio/x-opus+ogg"))
(define image
`("image/avif"
"image/bmp"
"image/gif"
"image/jpeg"
"image/png"
"image/svg+xml"
"image/webp"))
(define document
`("application/pdf"))

View File

@ -120,7 +120,8 @@
#|zig-xyz |# river)) #|zig-xyz |# river))
(define development (define development
(list #|gnupg |# gnupg pinentry (list #|admin |# tree
#|gnupg |# gnupg pinentry
#|math |# libqalculate #|math |# libqalculate
#|ssh |# openssh #|ssh |# openssh
#|text-editors |# kakoune #|text-editors |# kakoune