mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-01-30 22:57:54 +00:00
Add slop and newsboat config
I've also updated the Rofi config with my custom mode scripts. Aside from that, I've finally took the time to recreate my file metadata editing script. Well, there's also the update of the README.
This commit is contained in:
parent
0681d1fd7c
commit
cef34b86cb
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
**/.envrc
|
||||
**/shell.nix
|
||||
|
13
README.adoc
13
README.adoc
@ -82,13 +82,11 @@ If you're not familiar with it, you can read http://brandon.invergo.net/news/201
|
||||
|
||||
However, with Python 3 (specifically 3.8) installed, you have another option.
|
||||
Behold, the link:./vtsm["Very Tiny Stow Manager"] (VTSM for short)!
|
||||
The best way to describe VTSM is basically GNU Stow with a generic shell runner.
|
||||
VTSM takes inspiration from GNU Stow (obviously) and https://github.com/holman/dotfiles[how Zach Holman's dotfiles are set].
|
||||
When managing your dotfiles, VTSM is going to be your friend/workmate.
|
||||
|
||||
Using VTSM should be simple and it is nothing special, really.
|
||||
All it needs is a directory containing a file named `locations.json` with the name of the packages and their target path.
|
||||
VTSM will simply run commands with those packages.
|
||||
In short, it's just a shell runner set by a data file.
|
||||
All VTSM needs is a directory containing a package list stored in `locations.json` with the name of the packages and their target path.
|
||||
|
||||
.An example of what `locations.json` could be
|
||||
[source, json]
|
||||
@ -113,7 +111,7 @@ In short, it's just a shell runner set by a data file.
|
||||
----
|
||||
|
||||
With the tiny manager and the package list, we can then execute commands with all of the packages and its target path with one go.
|
||||
For the command string, it is a https://docs.python.org/3/library/string.html#string.Template[Python template] with `package` and `location` as the available objects.
|
||||
Here are some examples of running commands with VTSM.
|
||||
|
||||
[source, shell]
|
||||
----
|
||||
@ -127,8 +125,13 @@ For the command string, it is a https://docs.python.org/3/library/string.html#st
|
||||
# Create the directories of the target path and install them with GNU Stow.
|
||||
# Bada-bing, bada-boom, you have installed your setup or something.
|
||||
./vtsm --commands "mkdir -p {location} && stow {package} --target {location}"
|
||||
|
||||
# Run commands only to Rofi and Emacs config files.
|
||||
./vtsm --only "rofi" "emacs" --commands "stow --restow {package} --target {location}"
|
||||
----
|
||||
|
||||
For the command string, it is a https://docs.python.org/3/library/string.html#string.Template[Python template] with `package` and `location` as the available objects.
|
||||
|
||||
|
||||
=== Custom scripts
|
||||
|
||||
|
@ -12,8 +12,9 @@
|
||||
# * rofi - Version: 1.5.4
|
||||
# * xclip - version 0.13
|
||||
|
||||
emoji_file="$HOME/.local/share/emoji-list.txt"
|
||||
emoji_file="${XDG_DATA_HOME:-HOME/.local/share}/emoji-list.txt"
|
||||
if [[ ! -f $emoji_file ]]; then
|
||||
notify-send "Downloading the emoji data file."
|
||||
wget --output-document "$emoji_file" https://unicode.org/Public/emoji/13.0/emoji-test.txt
|
||||
fi
|
||||
|
||||
|
@ -1,8 +1,57 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
# A quick script on moving a document with the embedded metadata.
|
||||
# It uses exiftool for embedding so be sure to have it installed.
|
||||
# Only needs an argument of a filename to be converted.
|
||||
|
||||
# TODO: Create --title (-t) option that automatically skips the title prompt.
|
||||
# TODO: Create --author (-a) option that automatically skips the author prompt.
|
||||
# TODO: Create --date (-d) option that automatically skips the date prompt.
|
||||
|
||||
use File::Basename;
|
||||
use File::Copy;
|
||||
use Modern::Perl;
|
||||
|
||||
sub kebab_case {
|
||||
my ($sentence) = @_;
|
||||
$sentence =
|
||||
# Create a simple prompt returning with the given answer.
|
||||
sub prompt {
|
||||
my ($msg) = @_;
|
||||
say $msg;
|
||||
print ">> ";
|
||||
return <STDIN>;
|
||||
}
|
||||
|
||||
# This implementation of kebab-case conversion is opinionated.
|
||||
# It converts into lowercase and removes all non-alphanumeric characters.
|
||||
sub kebab_case {
|
||||
my ($string) = @_;
|
||||
|
||||
# Convert into lowercase.
|
||||
$string = lc($string);
|
||||
|
||||
# Substitute all spaces and extra dashes as one dash.
|
||||
$string =~ s/\s+|-+/-/g;
|
||||
|
||||
# Remove all invalid characters.
|
||||
$string =~ s/[^a-z0-9-]//g;
|
||||
|
||||
# Remove all leading and trailing dashes.
|
||||
$string =~ s/^-+|-+$//g;
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
my $file = $ARGV[0];
|
||||
|
||||
# Prompt for all the required information.
|
||||
my $title = prompt "Title of the document?";
|
||||
my $author = prompt "Author?";
|
||||
my $publication_date = prompt "Publication date?";
|
||||
|
||||
# Overwrite the file metadata.
|
||||
system "exiftool -title=\"${title}\" -author=\"${author}\" -date=\"${publication_date}\" \"$file\"";
|
||||
|
||||
# Once the file metadata has been written, it is time to move the file into its kebab-case equivalent.
|
||||
my ($filename, $dirs, $suffix) = fileparse($file, '\.[^.]+$');
|
||||
my $file_slug = $dirs . kebab_case($title) . $suffix;
|
||||
move($file, $file_slug);
|
||||
|
||||
|
@ -67,15 +67,23 @@
|
||||
(add-to-list 'safe-local-variable-values
|
||||
'(TeX-command-extra-options . "-shell-escape")))
|
||||
|
||||
|
||||
(after! org
|
||||
(setq
|
||||
; Set the journal.
|
||||
org-journal-dir "~/writings/journal"
|
||||
org-journal-file-format "%F"
|
||||
|
||||
org-capture-templates `(
|
||||
("i" "inbox" entry (file ,(concat org-directory "/inbox.org"))
|
||||
,(concat "* TODO %?\n"
|
||||
"entered on %<%F %T %:z>"))
|
||||
|
||||
("c" "org-protocol-capture" entry (file ,(concat org-directory "/inbox.org"))
|
||||
"* TODO [[%:link][%:description]]\n%x"
|
||||
:immediate-finish t))
|
||||
|
||||
; Set a custom time-stamp pattern.
|
||||
; Even though, it's not recommended, most of the time,
|
||||
; Even though, it's not recommended, most of the time, it is mainly for personal documents so it is safe.
|
||||
time-stamp-start "DATE_MODIFIED:[ ]+\\\\?[\"<]+"
|
||||
|
||||
; Configure org-roam.
|
||||
@ -84,8 +92,8 @@
|
||||
("d" "default" plain (function org-roam--capture-get-point)
|
||||
"#+AUTHOR: \"%(user-full-name)\"
|
||||
#+EMAIL: \"%(user-mail-address)\"
|
||||
#+DATE: \"%<%Y-%m-%d %T%:z>\"
|
||||
#+DATE_MODIFIED: \"%<%Y-%m-%d %T%:z>\"
|
||||
#+DATE: \"%<%Y-%m-%d %T %:z>\"
|
||||
#+DATE_MODIFIED: \"%<%Y-%m-%d %T %:z>\"
|
||||
#+LANGUAGE: en
|
||||
#+OPTIONS: toc:t
|
||||
#+PROPERTY: header-args :exports both
|
||||
@ -95,7 +103,22 @@
|
||||
:head "#+TITLE: ${title}\n"
|
||||
:unnarrowed t))))
|
||||
|
||||
; Modify the time-stamp with each save.
|
||||
(setq time-stamp-format "%Y-%02m-%02d %02H:%02M:%02S%:z"
|
||||
+file-templates-dir (expand-file-name "templates/" doom-private-dir))
|
||||
(setq
|
||||
; Modify the time-stamp with each save.
|
||||
time-stamp-format "%Y-%02m-%02d %02H:%02M:%02S %:z"
|
||||
|
||||
; Set file templates folder at $DOOMDIR/templates.
|
||||
+file-templates-dir (expand-file-name "templates/" doom-private-dir))
|
||||
|
||||
; Automate updating timestamps.
|
||||
(add-hook 'before-save-hook 'time-stamp)
|
||||
|
||||
; Activate minimap for all program-based modes (e.g., web-mode, python-mode) and text-based modes (e.g., org-mode, markdown-mode).
|
||||
(after! minimap
|
||||
(setq minimap-major-modes '(prog-mode text-mode org-mode)))
|
||||
|
||||
; Org-roam-bibtex is somehow a horrible name.
|
||||
; I guess that's why they insist on calling it ORB.
|
||||
(use-package! org-roam-bibtex
|
||||
:after-call org-mode
|
||||
:hook (org-roam-mode . org-roam-bibtex-mode))
|
||||
|
@ -182,6 +182,6 @@
|
||||
|
||||
;; This is where custom modules in the Doom directory should be put for orgaanizational purposes.
|
||||
:tools
|
||||
neuron ; Neurons are a must for the brain.
|
||||
;;neuron ; Neurons are a must for the brain.
|
||||
)
|
||||
|
||||
|
@ -51,9 +51,16 @@
|
||||
;;;;;;;;;;;;
|
||||
; PACKAGES ;
|
||||
;;;;;;;;;;;;
|
||||
(package! flycheck-vale)
|
||||
(package! ya-org-capture
|
||||
:recipe (:host github
|
||||
:repo "ag91/ya-org-capture")
|
||||
:pin "0333ee28c92a40a351e64695a0cfcd715c69838b")
|
||||
(package! yankpad)
|
||||
;;(package! flycheck-vale)
|
||||
(package! org-roam-bibtex
|
||||
:recipe (:host github
|
||||
:repo "org-roam/org-roam-bibtex"))
|
||||
|
||||
; Since org-roam-bibtex is a connector to all of the specified packages and in alpha stage, it can be problematic so we'll disable it for now.
|
||||
(unpin! org-roam company-org-roam)
|
||||
|
||||
; A minimap in case you have Stockholm Syndrome for your bloated IDEs. :)
|
||||
(package! minimap
|
||||
:recipe (:host github
|
||||
:repo "dengste/minimap")
|
||||
:pin "8bc9a65825925a7c58b83ad389f07a93f22d60f3")
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Print today's date in ISO format.
|
||||
# name: Print today's datetime in ISO format.
|
||||
# key: now
|
||||
# --
|
||||
`(format-time-string "%F %T%:z %Z")` $0
|
||||
`(format-time-string "%F %T %:z")` $0
|
||||
|
7
emacs/snippets/org-mode/quote
Executable file
7
emacs/snippets/org-mode/quote
Executable file
@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Org-Mode source block
|
||||
# key: quote
|
||||
# --
|
||||
#+BEGIN_QUOTE
|
||||
$1
|
||||
#+END_QUOTE
|
@ -5,14 +5,13 @@
|
||||
"dunst": "$HOME/.config/dunst/",
|
||||
"emacs": "$HOME/.config/doom",
|
||||
"lf": "$HOME/.config/lf",
|
||||
"newsboat": "$HOME/.config/newsboat",
|
||||
"nvim": "$HOME/.config/nvim/",
|
||||
"picom": "$HOME/.config/picom",
|
||||
"polybar": "$HOME/.config/polybar",
|
||||
"rofi": "$HOME/.config/rofi/",
|
||||
"slop": "$HOME/.config/slop/",
|
||||
"sxiv": "$HOME/.config/sxiv",
|
||||
"sxhkd": "$HOME/.config/sxhkd/",
|
||||
"systemd": "$HOME/.config/systemd",
|
||||
"wal": "$HOME/.config/wal",
|
||||
"xorg": "$HOME",
|
||||
"zsh": "$HOME/.config/zsh"
|
||||
}
|
||||
|
2
newsboat/urls
Normal file
2
newsboat/urls
Normal file
@ -0,0 +1,2 @@
|
||||
https://ma.ttias.be/cronweekly/index.xml
|
||||
https://venam.nixers.net/blog/feed.xml
|
@ -1,9 +0,0 @@
|
||||
configuration {
|
||||
display-drun: "Application";
|
||||
display-run: "Execute";
|
||||
display-window: "Window";
|
||||
display-ssh: "SSH";
|
||||
font: "Iosevka 14";
|
||||
show-icons: true;
|
||||
theme: "fds-mini-sidebar";
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
/**
|
||||
* ROFI Color theme
|
||||
* User: Qball
|
||||
* Copyright: Dave Davenport
|
||||
* Modified by: Gabriel Arazas (foo-dogsquared)
|
||||
*/
|
||||
|
||||
* {
|
||||
/* The color swatch */
|
||||
/* Useful for quick editing of the colors */
|
||||
background: #2E3440;
|
||||
foreground: #D8DEE9;
|
||||
color0: #3B4252;
|
||||
color1: #BF616A;
|
||||
color2: #A3BE8C;
|
||||
color3: #EBCB8B;
|
||||
color4: #81A1C1;
|
||||
color5: #B48EAD;
|
||||
color6: #88C0D0;
|
||||
color7: #E5E9F0;
|
||||
color8: #727B8A;
|
||||
color9: #BF616A;
|
||||
color10: #A3BE8C;
|
||||
color11: #EBCB8B;
|
||||
color12: #81A1C1;
|
||||
color13: #B48EAD;
|
||||
color14: #8FBCBB;
|
||||
color15: #ECEFF4;
|
||||
|
||||
background-color: @background;
|
||||
border-color: @foreground;
|
||||
text-color: @foreground;
|
||||
font: "Iosevka 14";
|
||||
}
|
||||
|
||||
window {
|
||||
anchor: north;
|
||||
location: north;
|
||||
width: 100%;
|
||||
padding: 7px;
|
||||
children: [ horibox ];
|
||||
}
|
||||
|
||||
horibox {
|
||||
orientation: horizontal;
|
||||
children: [ prompt, entry, listview ];
|
||||
}
|
||||
|
||||
listview {
|
||||
layout: horizontal;
|
||||
spacing: 5px;
|
||||
lines: 100;
|
||||
}
|
||||
|
||||
entry {
|
||||
expand: false;
|
||||
width: 10em;
|
||||
}
|
||||
|
||||
element {
|
||||
padding: 0px 2px;
|
||||
}
|
||||
|
||||
element.selected {
|
||||
background-color: @color6;
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
* {
|
||||
/* The color configuration */
|
||||
/* Useful for quick editing in case for compiled templates */
|
||||
background: #2E3440;
|
||||
foreground: #D8DEE9;
|
||||
color0: #3B4252;
|
||||
color1: #BF616A;
|
||||
color2: #A3BE8C;
|
||||
color3: #EBCB8B;
|
||||
color4: #81A1C1;
|
||||
color5: #B48EAD;
|
||||
color6: #88C0D0;
|
||||
color7: #E5E9F0;
|
||||
color8: #727B8A;
|
||||
color9: #BF616A;
|
||||
color10: #A3BE8C;
|
||||
color11: #EBCB8B;
|
||||
color12: #81A1C1;
|
||||
color13: #B48EAD;
|
||||
color14: #8FBCBB;
|
||||
color15: #ECEFF4;
|
||||
|
||||
/* Theme settings */
|
||||
highlight: bold italic;
|
||||
scrollbar: true;
|
||||
|
||||
/* Style */
|
||||
text-color: @foreground;
|
||||
background-color: @background;
|
||||
font: "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid 14";
|
||||
font: "Iosevka 14";
|
||||
}
|
||||
|
||||
window {
|
||||
background-color: transparent;
|
||||
|
||||
height: 65%;
|
||||
width: 45%;
|
||||
position: center;
|
||||
location: center;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @background;
|
||||
border: 2;
|
||||
border-color: @color6;
|
||||
children: [ inputbar, listview, mode-switcher ];
|
||||
}
|
||||
|
||||
inputbar,
|
||||
listview {
|
||||
background: @background;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
orientation: vertical;
|
||||
children: [ prompt, entry ];
|
||||
background-color: @color0;
|
||||
}
|
||||
|
||||
entry,
|
||||
prompt {
|
||||
background-color: @color0;
|
||||
}
|
||||
|
||||
listview {
|
||||
cyclic: true;
|
||||
}
|
||||
|
||||
element selected.normal {
|
||||
background-color: @color6;
|
||||
text-color: @background;
|
||||
}
|
||||
|
||||
scrollbar {
|
||||
background-color: @color0;
|
||||
handle-color: @color6;
|
||||
handle-width: 10px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
button,
|
||||
case-indicator,
|
||||
inputbar,
|
||||
element {
|
||||
padding: 5;
|
||||
}
|
||||
|
||||
button.selected {
|
||||
background-color: @color6;
|
||||
text-color: @background;
|
||||
}
|
@ -1,121 +0,0 @@
|
||||
* {
|
||||
/* The color configuration */
|
||||
/* Useful for quick editing in case for compiled templates */
|
||||
background: #2E3440;
|
||||
foreground: #D8DEE9;
|
||||
color0: #3B4252;
|
||||
color1: #BF616A;
|
||||
color2: #A3BE8C;
|
||||
color3: #EBCB8B;
|
||||
color4: #81A1C1;
|
||||
color5: #B48EAD;
|
||||
color6: #88C0D0;
|
||||
color7: #E5E9F0;
|
||||
color8: #727B8A;
|
||||
color9: #BF616A;
|
||||
color10: #A3BE8C;
|
||||
color11: #EBCB8B;
|
||||
color12: #81A1C1;
|
||||
color13: #B48EAD;
|
||||
color14: #8FBCBB;
|
||||
color15: #ECEFF4;
|
||||
|
||||
/* General theme settings */
|
||||
highlight: bold italic;
|
||||
scrollbar: true;
|
||||
|
||||
/* Font settings */
|
||||
text-color: @foreground;
|
||||
background-color: @background;
|
||||
font: "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid 14";
|
||||
font: "Iosevka 14";
|
||||
}
|
||||
|
||||
window {
|
||||
background-color: transparent;
|
||||
|
||||
height: 65%;
|
||||
width: 35%;
|
||||
position: southwest;
|
||||
location: southwest;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @background;
|
||||
border: 2;
|
||||
border-color: @color6;
|
||||
children: [ inputbar, message, listview, mode-switcher ];
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
inputbar,
|
||||
listview,
|
||||
message {
|
||||
background: @background;
|
||||
margin: 0 0 0.5em 0;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
orientation: vertical;
|
||||
children: [ prompt, entry ];
|
||||
}
|
||||
|
||||
prompt {
|
||||
text-style: underline;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @color0;
|
||||
margin: 0 1em 0 0;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @color0;
|
||||
padding: 5;
|
||||
}
|
||||
|
||||
element selected.normal {
|
||||
background-color: @color6;
|
||||
text-color: @background;
|
||||
}
|
||||
|
||||
scrollbar {
|
||||
background-color: @color0;
|
||||
border-radius: 30%;
|
||||
handle-color: @color6;
|
||||
handle-width: 15px;
|
||||
height: 100%;
|
||||
text-color: @background;
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
listview {
|
||||
cyclic: true;
|
||||
spacing: 0.6em;
|
||||
}
|
||||
|
||||
element, button {
|
||||
}
|
||||
|
||||
button,
|
||||
case-indicator,
|
||||
entry,
|
||||
inputbar {
|
||||
padding: 5;
|
||||
}
|
||||
|
||||
sidebar {
|
||||
padding: 5;
|
||||
margin: 5;
|
||||
}
|
||||
|
||||
button {
|
||||
margin: 0.25em;
|
||||
}
|
||||
|
||||
button.selected {
|
||||
background-color: @color6;
|
||||
text-color: @background;
|
||||
}
|
43
slop/crosshair.frag
Normal file
43
slop/crosshair.frag
Normal file
@ -0,0 +1,43 @@
|
||||
#version 120
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform sampler2D desktop;
|
||||
uniform vec2 screenSize;
|
||||
uniform vec2 mouse;
|
||||
|
||||
varying vec2 uvCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
// adjustable parameters
|
||||
float circleSize = 28;
|
||||
float borderSize = 2;
|
||||
// The smaller this value is, the more intense the magnification!
|
||||
float magnifyNerf = 1.5;
|
||||
vec4 borderColor = vec4(0,0,0,1);
|
||||
bool crosshair = true;
|
||||
|
||||
// actual code
|
||||
vec2 mUV = vec2(mouse.x, -mouse.y)/screenSize + vec2(0,1);
|
||||
float du = distance(mUV,uvCoord);
|
||||
float dr = distance(mUV*screenSize,uvCoord*screenSize);
|
||||
vec4 color = vec4(0);
|
||||
if ( dr > circleSize+borderSize ) {
|
||||
color = texture2D( texture, uvCoord );
|
||||
} else if ( dr < circleSize ) {
|
||||
if ( crosshair && (distance(mUV.x, uvCoord.x)<1/screenSize.x || distance(mUV.y,uvCoord.y)<1/screenSize.y) ) {
|
||||
color = borderColor;
|
||||
} else {
|
||||
float t = 1-du;
|
||||
vec2 b = uvCoord;
|
||||
vec2 c = (mUV-uvCoord);
|
||||
vec2 upsideDown = c/magnifyNerf*t*t+b;
|
||||
|
||||
vec4 textureColor = texture2D( texture, upsideDown );
|
||||
color = mix( texture2D( desktop, vec2(upsideDown.x, -upsideDown.y) ), textureColor, textureColor.a );
|
||||
}
|
||||
} else if ( dr < circleSize+borderSize ) {
|
||||
color = borderColor;
|
||||
}
|
||||
gl_FragColor = color;
|
||||
}
|
12
slop/crosshair.vert
Normal file
12
slop/crosshair.vert
Normal file
@ -0,0 +1,12 @@
|
||||
#version 120
|
||||
|
||||
attribute vec2 position;
|
||||
attribute vec2 uv;
|
||||
|
||||
varying vec2 uvCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
uvCoord = uv;
|
||||
gl_Position = vec4(position,0,1);
|
||||
}
|
Loading…
Reference in New Issue
Block a user