diff --git a/.vtsm/nixos-zilch.json b/.vtsm/nixos-zilch.json index 3be078f..01be8a6 100755 --- a/.vtsm/nixos-zilch.json +++ b/.vtsm/nixos-zilch.json @@ -3,5 +3,6 @@ "emacs": "$HOME/.config/doom", "nvim": "$HOME/.config/nvim", "newsboat": "$HOME/.config/newsboat", + "rofi": "$HOME/.config/rofi", "slop": "$HOME/.config/slop" } diff --git a/bin/colorpicker b/bin/colorpicker index 9ae8413..038143a 100755 --- a/bin/colorpicker +++ b/bin/colorpicker @@ -14,5 +14,5 @@ notify-send "Select a region for color picking." # The color picker code. # Take note it uses a slop shader named `crosshair` from the shader examples of the official repo at https://github.com/naelstrof/slop. -maim --select --shader crosshair --tolerance 0 --hidecursor | magick convert - -resize 1x1\! -format '#%[hex:p{0,0}]' info:- +maim --select --shader crosshair --tolerance 0 --hidecursor | magick convert - -resize 1x1\! -format '%[hex:p{0,0}]' info:- diff --git a/emacs/snippets/fundamental-mode/eg b/emacs/snippets/fundamental-mode/eg index 9927cdb..0fe9204 100755 --- a/emacs/snippets/fundamental-mode/eg +++ b/emacs/snippets/fundamental-mode/eg @@ -1,6 +1,5 @@ # -*- mode: snippet -*- # name: Shorthand for e.g. # key: eg -# condition: t # -- -(e.g., $1) $0 \ No newline at end of file +(e.g., $1) $0 diff --git a/emacs/snippets/python-mode/app b/emacs/snippets/python-mode/app new file mode 100755 index 0000000..7431004 --- /dev/null +++ b/emacs/snippets/python-mode/app @@ -0,0 +1,36 @@ +# -*- mode: snippet -*- +# name: Org-Mode appendix block +# key: appendix +# -- +#!/usr/bin/env python + +import argparse +import logging +import os +import os.path +from pathlib import Path +import sys + +def parse_args(args): + """ + Parse the arguments and do its thing. + + """ + parser = argparse.ArgumentParser(prog='${1:}', description='${2:}') + + parser.add_argument("csv_file", help='The CSV file to be imported.', metavar='FILE') + parser.add_argument("--force", "-f", help="Override the password entry if it already exists. (Recommended to enable this only if you're sure.)", action="store_true") + + args = parser.parse_args(args) + + return args + + +${0:// INSERT ALL OF THE CODES RIGHT HERE} + + +if __name__ == "__main__": + logging.basicConfig(format="[%(levelname)s] %(module)s: %(message)s", level=logging.INFO, stream=sys.stdout) + + args = parse_args(sys.argv[1:]) + // Make your main logic here diff --git a/newsboat/urls b/newsboat/urls index e5baa33..bfae436 100755 --- a/newsboat/urls +++ b/newsboat/urls @@ -1,11 +1,12 @@ # All of the unread articles # Take note it will result in a very slow loading -"query:Unread Articles:unread = \"yes\"" +# "query:Unread Articles:unread = \"yes\"" # Blogs https://alex-hhh.github.io/feeds/all.rss.xml blog.personal https://blog.jwf.io/feed/ blog.personal https://blog.yoshuawuyts.com/rss.xml blog.personal +https://chrispenner.ca/atom.xml blog.personal https://christine.website/blog.atom blog.personal https://drewdevault.com/blog/index.xml blog.personal http://distill.pub/rss.xml blog.personal @@ -22,22 +23,19 @@ https://venam.nixers.net/blog/feed.xml blog.personal https://willschenk.com/feed.xml blog.personal https://www.malloc47.com/rss.xml blog.personal +https://www.davidrevoy.com/feed/rss blog.personal art + # Software blogs -https://kde.org/announcements/index.xml blog.software linux -https://guix.gnu.org/feeds/blog.atom blog.software linux +https://kde.org/announcements/index.xml blog.software dev.linux +https://guix.gnu.org/feeds/blog.atom blog.software dev.linux https://web.dev/feed.xml blog.software dev.web # Articles (they're different from blogs) -https://annoying.technology/index.xml +https://annoying.technology/index.xml miscellany # Combine all blogs under the blog filter "query:Blog:tags # \"blog\"" -# Subreddits -https://www.reddit.com/r/math/.rss -https://www.reddit.com/r/programming/.rss -https://www.reddit.com/r/Scholar/.rss - # News https://www.reddit.com/r/linux/.rss news https://news.ycombinator.com/rss news @@ -52,6 +50,7 @@ https://selfhosted.show/rss https://feeds.twit.tv/sn.xml # YouTube subscriptions +"query:YouTube:tags # \"YouTube Subscriptions\"" https://www.youtube.com/feeds/videos.xml?channel_id=UC-3J5xNrAbTLbU1gN8mMpOA "~Nitro Rad" youtube https://www.youtube.com/feeds/videos.xml?channel_id=UC-90KuSWRVLImW4xHWFYMnQ "~Shady Cicada" youtube music https://www.youtube.com/feeds/videos.xml?channel_id=UC-cY3DcYladGdFQWIKL90SQ "~Jon Ringer" youtube coding @@ -67,7 +66,6 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UC6mIxFTvXkWQVEHPsEdflzQ "~ https://www.youtube.com/feeds/videos.xml?channel_id=UC6nSFpj9HTCZ5t-N3Rm3-HA "~Vsauce" youtube https://www.youtube.com/feeds/videos.xml?channel_id=UC7590VTWe6m0kq3gJcgLINg "~The Taylor Series" youtube https://www.youtube.com/feeds/videos.xml?channel_id=UC8ENHE5xdFSwx71u3fDH5Xw "~ThePrimeagen" youtube -https://www.youtube.com/feeds/videos.xml?channel_id=UC8butISFwT-Wl7EV0hUK0BQ "~freeCodeCamp.org" youtube https://www.youtube.com/feeds/videos.xml?channel_id=UC8uT9cgJorJPWu7ITLGo9Ww "~The 8-Bit Guy" youtube https://www.youtube.com/feeds/videos.xml?channel_id=UC9-y-6csu5WGm29I7JiwpnA "~Computerphile" youtube https://www.youtube.com/feeds/videos.xml?channel_id=UC9Z1XWw1kmnvOOFsj6Bzy2g "~Blackthornprod" youtube coding gamedev @@ -152,18 +150,15 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UClq42foiSgl7sSpLupnugGA "~ https://www.youtube.com/feeds/videos.xml?channel_id=UCm22FAXZMw1BaWeFszZxUKw "~Kitboga" youtube https://www.youtube.com/feeds/videos.xml?channel_id=UCmkP178NasnhR3TWQyyP4Gw "~How To Mechatronics" youtube https://www.youtube.com/feeds/videos.xml?channel_id=UCmtyQOKKmrMVaKuRXz02jbQ "~Sebastian Lague" youtube -https://www.youtube.com/feeds/videos.xml?channel_id=UCnxrdFPXJMeHru_b4Q_vTPQ "~Simply Explained" youtube -https://www.youtube.com/feeds/videos.xml?channel_id=UCoHhuummRZaIVX7bD4t2czg "~Professor Leonard" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCoHhuummRZaIVX7bD4t2czg "~Professor Leonard" youtube math https://www.youtube.com/feeds/videos.xml?channel_id=UCodbH5mUeF-m_BsNueRDjcw "~Overly Sarcastic Productions" youtube -https://www.youtube.com/feeds/videos.xml?channel_id=UCosnWgi3eorc1klEQ8pIgJQ "~Afrotechmods" youtube -https://www.youtube.com/feeds/videos.xml?channel_id=UCoxcjq-8xIDTYp3uz647V5A "~Numberphile" youtube -https://www.youtube.com/feeds/videos.xml?channel_id=UCq0EGvLTyy-LLT1oUSO_0FQ "~Eddie Woo" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCosnWgi3eorc1klEQ8pIgJQ "~Afrotechmods" youtube electronics +https://www.youtube.com/feeds/videos.xml?channel_id=UCoxcjq-8xIDTYp3uz647V5A "~Numberphile" youtube math +https://www.youtube.com/feeds/videos.xml?channel_id=UCq0EGvLTyy-LLT1oUSO_0FQ "~Eddie Woo" youtube math https://www.youtube.com/feeds/videos.xml?channel_id=UCqJ-Xo29CKyLTjn6z2XwYAw "~Game Maker's Toolkit" youtube https://www.youtube.com/feeds/videos.xml?channel_id=UCr-5TdGkKszdbboXXsFZJTQ "~Gamefromscratch" youtube -https://www.youtube.com/feeds/videos.xml?channel_id=UCrTNhL_yO3tPTdQ5XgmmWjA "~RedLetterMedia" youtube https://www.youtube.com/feeds/videos.xml?channel_id=UCrv269YwJzuZL3dH5PCgxUw "~CodeParade" youtube https://www.youtube.com/feeds/videos.xml?channel_id=UCtAIs1VCQrymlAnw3mGonhw "~Flammable Maths" youtube math -https://www.youtube.com/feeds/videos.xml?channel_id=UCtZO3K2p8mqFwiKWb9k7fXA "~TechAltar" youtube https://www.youtube.com/feeds/videos.xml?channel_id=UCtxCXg-UvSnTKPOzLH4wJaQ "~Coding Tech" youtube https://www.youtube.com/feeds/videos.xml?channel_id=UCu6mSoMNzHQiBIOCkHUa2Aw "~Cody'sLab" youtube https://www.youtube.com/feeds/videos.xml?channel_id=UCvjgXvBlbQiydffZU7m1_aw "~The Coding Train" youtube coding math diff --git a/nvim/init.vim b/nvim/init.vim index 34df731..97c13d4 100755 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -11,6 +11,7 @@ call plug#begin('~/.config/nvim/plugged') " Nord color scheme Plug 'arcticicestudio/nord-vim' Plug 'gruvbox-community/gruvbox' +Plug 'chriskempson/base16-vim' " EditorConfig plugin Plug 'editorconfig/editorconfig-vim' @@ -57,6 +58,9 @@ endif Plug 'junegunn/fzf' Plug 'junegunn/fzf.vim' +" Emmet is an HTML plugin for easy HTML writing +Plug 'mattn/emmet-vim' + " A full LaTeX toolchain plugin for Vim. " Also a must-have for me since writing LaTeX can be a PITA. " Most of the snippets and workflow is inspired from Gilles Castel's posts (at https://castel.dev/). @@ -103,14 +107,16 @@ call plug#end() """"""""""""""""""""""""" " EDITOR CONFIGURATIONS " """"""""""""""""""""""""" +set encoding=utf-8 + let mapleader=" " -" Setting the colorscheme colorscheme nord " Setting number lines in the gutter. set number relativenumber highlight CursorLineNr ctermfg=cyan +highlight Visual term=reverse cterm=reverse " Setting line highlighting based on the position of the cursor. set cursorline diff --git a/nvim/own-snippets/all.snippets b/nvim/own-snippets/all.snippets index ed042fd..4877b71 100755 --- a/nvim/own-snippets/all.snippets +++ b/nvim/own-snippets/all.snippets @@ -5,11 +5,11 @@ def relative_date(days = 0): time_difference = timedelta(days=int(days)) calculated_date = datetime.today() + time_difference - return calculated_date + return calculated_date endglobal snippet "reldate (\d+)( ".+")?" "Prints out the relative date in ISO format." ri -`!p +`!p reldate = relative_date(match.group(1)) date_format = match.group(2).strip(" \"") if match.group(2) is not None else "%F" snip.rv = reldate.strftime(date_format) @@ -25,7 +25,7 @@ snip.rv = datetime.today().strftime("%F") endsnippet -# Quick formatting. +# Quick formatting. snippet sign "Quick signature" i ${1:Sincerely,} ${2:Gabriel Arazas} @@ -37,7 +37,7 @@ snippet retrieve "Quick retrieval date in informal format" i endsnippet snippet ie "Parenthetical material Latin 'id est' (ie)" iw -(i.e., $1) $0 +(i.e., $1) $0 endsnippet snippet eg "Parenthetical material Latin 'exempli gratia' (eg)" iw @@ -45,8 +45,18 @@ snippet eg "Parenthetical material Latin 'exempli gratia' (eg)" iw endsnippet -# Em dashes (I've these dedicated snippets for some reason). -snippet em "Quick em dash" +# En dashes +snippet -- "En dash" +– +endsnippet + + +# Em dashes (I've these dedicated snippets for some reason). +snippet --- "Em dash" +— +endsnippet + +snippet em "Quick em dash" — endsnippet @@ -63,7 +73,7 @@ snippet em-eg "'exempli gratia' surrounded with em dash" iw endsnippet -# Quick word snippets +# Quick word snippets # Each of these quick word snippets has a prefix of `qw-` snippet qw-lx "LaTeX" iw LaTeX @@ -74,12 +84,12 @@ Asciidoctor endsnippet -# Miscellaneous snippets +# Miscellaneous snippets snippet #! "Quick snippet for a shebang." bi #!${1:/usr/bin/env} ${2:sh} endsnippet -# This is only useful for decorative comment boxes and all of the jazz. +# This is only useful for decorative comment boxes and all of the jazz. snippet "boxen '(.*)'" "Create a box of stuff" ir `!p snip.rv = (match.group(1) * (len(t[1]) + 4)).strip()[0:(len(t[1]) + 4)]` `!p snip.rv = match.group(1)[0]` $1 `!p snip.rv = match.group(1)[0]` @@ -87,7 +97,7 @@ snippet "boxen '(.*)'" "Create a box of stuff" ir $0 endsnippet -# Also stolen from Gilles Castel's post at https://castel.dev/post/lecture-notes-1/. +# Also stolen from Gilles Castel's post at https://castel.dev/post/lecture-notes-1/. snippet box "More box (that looks more like a box)." `!p snip.rv = '┌' + '─' * (len(t[1]) + 2) + '┐'` │ $1 │