init
This commit is contained in:
parent
6370108c51
commit
fd69ecbbe6
93 changed files with 5069 additions and 92 deletions
92
README.md
92
README.md
|
@ -1,92 +0,0 @@
|
|||
# dotfiles
|
||||
|
||||
|
||||
|
||||
## Getting started
|
||||
|
||||
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
||||
|
||||
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
||||
|
||||
## Add your files
|
||||
|
||||
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
||||
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
||||
|
||||
```
|
||||
cd existing_repo
|
||||
git remote add origin https://gitlab.com/tavo-wasd/dotfiles.git
|
||||
git branch -M main
|
||||
git push -uf origin main
|
||||
```
|
||||
|
||||
## Integrate with your tools
|
||||
|
||||
- [ ] [Set up project integrations](https://gitlab.com/tavo-wasd/dotfiles/-/settings/integrations)
|
||||
|
||||
## Collaborate with your team
|
||||
|
||||
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
|
||||
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
||||
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
||||
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
||||
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
|
||||
|
||||
## Test and Deploy
|
||||
|
||||
Use the built-in continuous integration in GitLab.
|
||||
|
||||
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
|
||||
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
|
||||
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
||||
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
|
||||
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
||||
|
||||
***
|
||||
|
||||
# Editing this README
|
||||
|
||||
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
|
||||
|
||||
## Suggestions for a good README
|
||||
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
||||
|
||||
## Name
|
||||
Choose a self-explaining name for your project.
|
||||
|
||||
## Description
|
||||
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
||||
|
||||
## Badges
|
||||
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
||||
|
||||
## Visuals
|
||||
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
||||
|
||||
## Installation
|
||||
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
||||
|
||||
## Usage
|
||||
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
||||
|
||||
## Support
|
||||
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
||||
|
||||
## Roadmap
|
||||
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
||||
|
||||
## Contributing
|
||||
State if you are open to contributions and what your requirements are for accepting them.
|
||||
|
||||
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
||||
|
||||
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
||||
|
||||
## Authors and acknowledgment
|
||||
Show your appreciation to those who have contributed to the project.
|
||||
|
||||
## License
|
||||
For open source projects, say how it is licensed.
|
||||
|
||||
## Project status
|
||||
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
2
Xresources
Normal file
2
Xresources
Normal file
|
@ -0,0 +1,2 @@
|
|||
Sxiv.background: #121212
|
||||
Sxiv.foreground: #ebdbb2
|
97
bashrc
Normal file
97
bashrc
Normal file
|
@ -0,0 +1,97 @@
|
|||
#!/bin/bash
|
||||
# tavo custom bashrc file
|
||||
|
||||
# Prompt
|
||||
PS1='\[\e[0;1;91m\][\[\e[0;1;38;5;87m\]\u\[\e[0;1;38;5;123m\]@\[\e[0;1;38;5;159m\]\h \[\e[0;1;97m\]\w\[\e[0;1;91m\]]\n \[\e[0;38;5;247m\]$ \[\e[0m\]'
|
||||
PROMPT_COMMAND="echo" # Line jump after every command
|
||||
|
||||
# General configs
|
||||
PATH="$HOME/.config/scripts${PATH:+:${PATH}}" # Enables custom scripts dir
|
||||
bind "set completion-ignore-case on" # Case insensitive TAB complete
|
||||
shopt -s cdspell # Autocorrect directory name
|
||||
shopt -s autocd # cd into dir by typing the name
|
||||
set -o vi # vi mode
|
||||
|
||||
# $HOME cleanup
|
||||
export \
|
||||
LESSHISTFILE="$HOME/.local/share/lesshst" \
|
||||
VIMINIT="source $HOME/.config/vim/vimrc" \
|
||||
XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" \
|
||||
HISTFILE="$XDG_STATE_HOME/bash_history" \
|
||||
CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv \
|
||||
XDG_STATE_HOME="$HOME/.local/state" \
|
||||
XDG_CACHE_HOME="$HOME/.local/cache" \
|
||||
XDG_DATA_HOME="$HOME/.local/share" \
|
||||
XDG_CONFIG_HOME="$HOME/.config" \
|
||||
|
||||
# Aliases
|
||||
alias \
|
||||
prt="cd $HOME/Pictures/Screenshots/ ; ls" \
|
||||
bkg="cd $HOME/Pictures/Backgrounds/ ; ls" \
|
||||
tmp="cd $HOME/Desktop/temp/ ; ls" \
|
||||
www="cd $HOME/Desktop/www/ ; ls" \
|
||||
src="cd $HOME/.local/src/ ; ls" \
|
||||
doc="cd $HOME/Documents/ ; ls" \
|
||||
dow="cd $HOME/Downloads/ ; ls" \
|
||||
img="cd $HOME/Pictures/ ; ls" \
|
||||
dsk="cd $HOME/Desktop/ ; ls" \
|
||||
cfg="cd $HOME/.config/ ; ls" \
|
||||
vid="cd $HOME/Videos/ ; ls" \
|
||||
mus="cd $HOME/Music/ ; ls" \
|
||||
ent="cd /mnt/Entr/ ; ls" \
|
||||
ls="exa -al --group-directories-first" \
|
||||
diff="diff --color=auto" \
|
||||
grep="grep --color=auto" \
|
||||
def="dict" \
|
||||
calc="bc -l" \
|
||||
cp="cp -iv" \
|
||||
mv="mv -iv" \
|
||||
rm="rm -iv" \
|
||||
vim="nvim" \
|
||||
|
||||
# Useful variables
|
||||
export \
|
||||
GITLAB="ssh://git@gitlab.com/tavo-wasd" \
|
||||
DATE=$(date -I) \
|
||||
|
||||
# Clipboard config
|
||||
export \
|
||||
CM_SELECTIONS="clipboard" \
|
||||
CM_MAX_CLIPS=10 \
|
||||
|
||||
# Default programs
|
||||
export \
|
||||
OPENER="xdg-open" \
|
||||
READER="zathura" \
|
||||
BROWSER="brave" \
|
||||
TERMINAL="st" \
|
||||
EDITOR="nvim" \
|
||||
VISUAL="nvim" \
|
||||
IMAGE="sxiv" \
|
||||
VIDEO="mpv" \
|
||||
|
||||
# Functions
|
||||
follow() { # cd if found after 'which' command
|
||||
[ -z "$1" ] && echo "Usage: follow <command>" ||
|
||||
cd "$(which $1 | sed s/$1//g)"
|
||||
}
|
||||
|
||||
follow-edit() { # open in $EDITOR
|
||||
[ -z "$1" ] && echo "Usage: follow <command>" ||
|
||||
$EDITOR "$(which $1)"
|
||||
}
|
||||
|
||||
quitcd() { # cd into NNN's exported dir: Ctrl + G
|
||||
cd $(grep -oP '"\K[^"\047]+(?=["\047])' ~/.config/nnn/.lastd)
|
||||
}
|
||||
bind '"\C-g":"quitcd\C-m"'
|
||||
|
||||
# Autostart dwm after tty login
|
||||
type systemctl 2>/dev/null 1>&2 && if systemctl -q is-active graphical.target && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
|
||||
cat ~/.config/snippets/welcome
|
||||
sleep 0.5
|
||||
amixer
|
||||
exec startx
|
||||
fi
|
||||
|
||||
fetch-min
|
24
bookmarks
Normal file
24
bookmarks
Normal file
|
@ -0,0 +1,24 @@
|
|||
Mediación Virtual 2-https://mv2.mediacionvirtual.ucr.ac.cr
|
||||
Mediación Virtual 1-https://mv1.mediacionvirtual.ucr.ac.cr
|
||||
Correo UCR-https://correo.ucr.ac.cr
|
||||
Whatsapp-https://web.whatsapp.com
|
||||
Telegram-https://web.telegram.org
|
||||
Syncthing-http://127.0.0.1:8384
|
||||
Proton Mail-https://mail.proton.me
|
||||
Simplenote-https://app.simplenote.com
|
||||
Proton Drive-https://drive.proton.me
|
||||
Excalidraw-https://excalidraw.com
|
||||
Incofer-http://www.incofer.go.cr
|
||||
GitLab-https://gitlab.com
|
||||
Odysee-https://odysee.com
|
||||
Monero Miner Dashboard-https://monero.hashvault.pro/en/dashboard
|
||||
Extremetech-https://extremetechcr.com/
|
||||
Digital Ocean-https://www.digitalocean.com/
|
||||
Free YouTube-https://yewtu.be/
|
||||
Nextcloud-https://cloud.tavo.one/
|
||||
Notebook-https://notebook.tavo.one/
|
||||
Personal Blog-https://blog.tavo.one/
|
||||
Vultr-https://www.vultr.com/
|
||||
MATLAB Drive-https://drive.matlab.com/
|
||||
MATLAB Online-https://matlab.mathworks.com/
|
||||
Monero Address-43aTAGoRZyb8M7RvhtYw1pHCpHqJ2nM51W7SjuGFdVdWekzTFf9PsVTCZPexd93o234z6SSq6Ag9fUSm4cjZkwvh3rp2kqT
|
95
dunst/dunstrc
Normal file
95
dunst/dunstrc
Normal file
|
@ -0,0 +1,95 @@
|
|||
[global]
|
||||
monitor = 0
|
||||
follow = none
|
||||
|
||||
width = (200, 600)
|
||||
height = 200
|
||||
origin = top-center
|
||||
offset = 00x48
|
||||
scale = 0
|
||||
|
||||
notification_limit = 0
|
||||
indicate_hidden = yes
|
||||
sticky_history = yes
|
||||
sort = yes
|
||||
history_length = 20
|
||||
always_run_script = true
|
||||
|
||||
progress_bar = true
|
||||
progress_bar_height = 10
|
||||
progress_bar_frame_width = 1
|
||||
progress_bar_min_width = 150
|
||||
progress_bar_max_width = 300
|
||||
|
||||
transparency = 0
|
||||
separator_height = 0
|
||||
padding = 8
|
||||
horizontal_padding = 24
|
||||
text_icon_padding = 0
|
||||
frame_width = 0
|
||||
frame_color = "#ebdbb2"
|
||||
gap_size = 0
|
||||
separator_color = frame
|
||||
|
||||
font = Source Code Pro 10
|
||||
line_height = 0
|
||||
markup = full
|
||||
format = "<b>%s</b>\n%b"
|
||||
alignment = center
|
||||
vertical_alignment = center
|
||||
|
||||
show_age_threshold = 60
|
||||
ellipsize = middle
|
||||
ignore_newline = no
|
||||
stack_duplicates = true
|
||||
hide_duplicate_count = false
|
||||
show_indicators = yes
|
||||
enable_recursive_icon_lookup = true
|
||||
|
||||
icon_theme = Adwaita
|
||||
icon_position = left
|
||||
min_icon_size = 32
|
||||
max_icon_size = 128
|
||||
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
|
||||
|
||||
dmenu = /usr/bin/dmenu -p dunst:
|
||||
browser = /usr/bin/xdg-open
|
||||
|
||||
title = Dunst
|
||||
class = Dunst
|
||||
corner_radius = 28
|
||||
ignore_dbusclose = false
|
||||
force_xwayland = false
|
||||
force_xinerama = false
|
||||
|
||||
mouse_left_click = do_action
|
||||
mouse_middle_click = do_action, close_current
|
||||
mouse_right_click = close_current
|
||||
|
||||
[experimental]
|
||||
per_monitor_dpi = false
|
||||
|
||||
[urgency_low]
|
||||
background = "#ebdbb2"
|
||||
foreground = "#121212"
|
||||
timeout = 2
|
||||
|
||||
[urgency_normal]
|
||||
background = "#ebdbb2"
|
||||
foreground = "#121212"
|
||||
timeout = 8
|
||||
|
||||
[urgency_critical]
|
||||
background = "#ebdbb2"
|
||||
foreground = "#121212"
|
||||
frame_color = "#FB4934"
|
||||
timeout = 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
3
git/config
Normal file
3
git/config
Normal file
|
@ -0,0 +1,3 @@
|
|||
[user]
|
||||
email = gustavo@gustavocalvo.xyz
|
||||
name = tavo-wasd
|
8
groff/aparef
Normal file
8
groff/aparef
Normal file
|
@ -0,0 +1,8 @@
|
|||
\" Apa format for citation
|
||||
\" and references section
|
||||
|
||||
.R1
|
||||
label "(A.n|Q) ', ' (D.y|D)"; bracket-label " (" ) "; "
|
||||
no-label-in-reference
|
||||
accumulate
|
||||
.R2
|
255
groff/bibliography
Normal file
255
groff/bibliography
Normal file
|
@ -0,0 +1,255 @@
|
|||
%K sample_id
|
||||
%L sample_reference
|
||||
%A sample_author
|
||||
%Q sample_no_author
|
||||
%T sample_title
|
||||
%B sample_article
|
||||
%V sample_volume
|
||||
%D sample_date
|
||||
%C sample_place
|
||||
%E sample_editorial
|
||||
%I sample_institution
|
||||
%P sample_page_or_range
|
||||
%J sample_journal
|
||||
%N sample_journal_issue_number
|
||||
%R sample_technical_report_number
|
||||
%S sample_series_name
|
||||
%O sample_other_info
|
||||
%X sample_anotation
|
||||
___ ___ ___
|
||||
/ _ \ / _ \ / _ \
|
||||
| | | | | | | | | |
|
||||
| |_| | |_| | |_| |
|
||||
\___/ \___/ \___/
|
||||
-----------------------------------------------
|
||||
Computer science, information and general works
|
||||
|
||||
000 ---------- Computer science, knowledge and systems
|
||||
|
||||
010 ---------- Bibliographies
|
||||
|
||||
020 ---------- Library and information sciences
|
||||
|
||||
030 ---------- Encyclopedias and books of facts
|
||||
|
||||
040 ---------- Unassigned (formerly Biographies)
|
||||
|
||||
050 ---------- Magazines, journals and serials
|
||||
|
||||
%K estadoeducacion
|
||||
%A Programa Estado de la Nación
|
||||
%T Estado de la Eduación
|
||||
%D 2021
|
||||
%C San José, C.R.
|
||||
|
||||
060 ---------- Associations, organizations and museums
|
||||
|
||||
070 ---------- News media, journalism and publishing
|
||||
|
||||
080 ---------- Quotations
|
||||
|
||||
090 ---------- Manuscripts and rare books
|
||||
|
||||
_ ___ ___
|
||||
/ |/ _ \ / _ \
|
||||
| | | | | | | |
|
||||
| | |_| | |_| |
|
||||
|_|\___/ \___/
|
||||
-------------------------
|
||||
Philosophy and psychology
|
||||
|
||||
100 ---------- Philosophy
|
||||
|
||||
110 ---------- Metaphysics
|
||||
|
||||
120 ---------- Epistemology
|
||||
|
||||
130 ---------- Parapsychology and occultism
|
||||
|
||||
140 ---------- Philosophical schools of thought
|
||||
|
||||
150 ---------- Psychology
|
||||
|
||||
160 ---------- Philosophical logic
|
||||
|
||||
170 ---------- Ethics
|
||||
|
||||
180 ---------- Ancient, medieval, and Eastern philosophy
|
||||
|
||||
190 ---------- Modern Western philosophy (19th-century, 20th-century)
|
||||
|
||||
____ ___ ___
|
||||
|___ \ / _ \ / _ \
|
||||
__) | | | | | | |
|
||||
/ __/| |_| | |_| |
|
||||
|_____|\___/ \___/
|
||||
--------
|
||||
Religion
|
||||
|
||||
_____ ___ ___
|
||||
|___ / / _ \ / _ \
|
||||
|_ \| | | | | | |
|
||||
___) | |_| | |_| |
|
||||
|____/ \___/ \___/
|
||||
---------------
|
||||
Social sciences
|
||||
|
||||
300 ---------- Social sciences, sociology and anthropology
|
||||
|
||||
310 ---------- Statistics
|
||||
|
||||
320 ---------- Political science
|
||||
|
||||
330 ---------- Economics
|
||||
|
||||
%K padrerico
|
||||
%T Padre Rico, Padre Pobre
|
||||
%A Kiyosaki, R. T.
|
||||
%A Lechter, S. L.
|
||||
%D 1997
|
||||
|
||||
%K richdad
|
||||
%T Rich Dad Poor Dad
|
||||
%A Kiyosaki, R. T.
|
||||
%A Lechter, S. L.
|
||||
%D 1997
|
||||
|
||||
340 ---------- Law
|
||||
|
||||
350 ---------- Public administration and military science
|
||||
|
||||
360 ---------- Social problems and social services
|
||||
|
||||
370 ---------- Education
|
||||
|
||||
380 ---------- Commerce, communications and transportation
|
||||
|
||||
390 ---------- Customs, etiquette and folklore
|
||||
|
||||
____ ___ ___
|
||||
| ___| / _ \ / _ \
|
||||
|___ \| | | | | | |
|
||||
___) | |_| | |_| |
|
||||
|____/ \___/ \___/
|
||||
--------
|
||||
Language
|
||||
|
||||
_ _ ___ ___
|
||||
| || | / _ \ / _ \
|
||||
| || |_| | | | | | |
|
||||
|__ _| |_| | |_| |
|
||||
|_| \___/ \___/
|
||||
-------
|
||||
Science
|
||||
|
||||
500 ---------- Science
|
||||
|
||||
510 ---------- Mathematics
|
||||
|
||||
%K calcstewart
|
||||
%T Single variable calculus: Early transcendentals
|
||||
%A Stewart, J.
|
||||
%D 2015
|
||||
%E Cengage Learning
|
||||
%O 8th Edition
|
||||
|
||||
%K calcstewartes
|
||||
%T Cálculo en una variable: Trascendentes tempranas
|
||||
%A Stewart, J.
|
||||
%D 2015
|
||||
%E Cengage Learning
|
||||
%O Octava Edición
|
||||
|
||||
520 ---------- Astronomy
|
||||
|
||||
530 ---------- Physics
|
||||
|
||||
540 ---------- Chemistry
|
||||
|
||||
550 ---------- Earth sciences and geology
|
||||
|
||||
560 ---------- Fossils and prehistoric life
|
||||
|
||||
570 ---------- Biology
|
||||
|
||||
580 ---------- Plants
|
||||
|
||||
590 ---------- Animals (Zoology)
|
||||
|
||||
__ ___ ___
|
||||
/ /_ / _ \ / _ \
|
||||
| '_ \| | | | | | |
|
||||
| (_) | |_| | |_| |
|
||||
\___/ \___/ \___/
|
||||
----------
|
||||
Technology
|
||||
|
||||
_____ ___ ___
|
||||
|___ / _ \ / _ \
|
||||
/ / | | | | | |
|
||||
/ /| |_| | |_| |
|
||||
/_/ \___/ \___/
|
||||
-------------------
|
||||
Arts and recreation
|
||||
|
||||
___ ___ ___
|
||||
( _ ) / _ \ / _ \
|
||||
/ _ \| | | | | | |
|
||||
| (_) | |_| | |_| |
|
||||
\___/ \___/ \___/
|
||||
----------
|
||||
Literature
|
||||
|
||||
800 ---------- Literature, rhetoric and criticism
|
||||
|
||||
810 ---------- American literature in English
|
||||
|
||||
820 ---------- English and Old English literatures
|
||||
|
||||
830 ---------- German and related literatures
|
||||
|
||||
840 ---------- French and related literatures
|
||||
|
||||
850 ---------- Italian, Romanian and related literatures
|
||||
|
||||
860 ---------- Spanish, Portuguese, Galician literatures
|
||||
|
||||
%K quijote
|
||||
%T El ingenioso hidalgo don Quijote de la Mancha
|
||||
%A de Cervantes Saavedra, M.
|
||||
%D 1605-1615
|
||||
|
||||
%K quixote
|
||||
%T The Ingenious Gentleman Don Quixote of La Mancha
|
||||
%A de Cervantes Saavedra, M.
|
||||
%D 1605-1615
|
||||
|
||||
870 ---------- Latin and Italic literatures
|
||||
|
||||
880 ---------- Classical and modern Greek literatures
|
||||
|
||||
890 ---------- Other literatures
|
||||
|
||||
___ ___ ___
|
||||
/ _ \ / _ \ / _ \
|
||||
| (_) | | | | | | |
|
||||
\__, | |_| | |_| |
|
||||
/_/ \___/ \___/
|
||||
---------------------
|
||||
History and geography
|
||||
|
||||
___ _ _
|
||||
/ _ \| |_| |__ ___ _ __
|
||||
| | | | __| '_ \ / _ \ '__|
|
||||
| |_| | |_| | | | __/ |
|
||||
\___/ \__|_| |_|\___|_|
|
||||
-----
|
||||
Other
|
||||
|
||||
%K calc3jesus
|
||||
%A Sánchez Guevara, J.
|
||||
%T MA1003 Cálculo III Curso Completo
|
||||
%D 2020
|
||||
%E YouTube
|
||||
%O https://www.youtube.com/playlist?list=PLiInVAfgkMKAnP__6E92iRU9vpMwuHtQM
|
||||
|
2
groff/bottomnum
Normal file
2
groff/bottomnum
Normal file
|
@ -0,0 +1,2 @@
|
|||
.ds CH
|
||||
.ds CF -\En[PN]-
|
93
groff/markdown
Normal file
93
groff/markdown
Normal file
|
@ -0,0 +1,93 @@
|
|||
\" Markdown-like syntax for custom headings
|
||||
\" and other text formatting options.
|
||||
|
||||
\" --- Headings ---
|
||||
.de #
|
||||
. nf
|
||||
. NH
|
||||
. ps 16
|
||||
. ad l
|
||||
. XN "\\$1"
|
||||
\h'0n'\v'-1.2n'\
|
||||
\l'\\n(.lu\(ul'\
|
||||
\m[default]
|
||||
. ps 10
|
||||
. sp -.2
|
||||
. fi
|
||||
..
|
||||
.de ##
|
||||
. nf
|
||||
. NH 2
|
||||
. ps 13
|
||||
. ad l
|
||||
. XN "\\$1"
|
||||
. ps 10
|
||||
. sp -.2
|
||||
\h'0n'\v'-1.2n'
|
||||
. fi
|
||||
..
|
||||
.de ###
|
||||
. nf
|
||||
. RS
|
||||
. NH 3
|
||||
. ps 11
|
||||
. ad l
|
||||
. XN "\\$1"
|
||||
. RE
|
||||
. ps 10
|
||||
. sp -.2
|
||||
\h'0n'\v'-1.2n'
|
||||
. fi
|
||||
..
|
||||
.de ####
|
||||
. nf
|
||||
. RS
|
||||
. NH 4
|
||||
. ps 11
|
||||
. ad l
|
||||
. XN "\\$1"
|
||||
. RE
|
||||
. ps 10
|
||||
. sp -.2
|
||||
\h'0n'\v'-1.2n'
|
||||
. fi
|
||||
..
|
||||
.de #####
|
||||
. nf
|
||||
. RS
|
||||
. NH 5
|
||||
. ps 11
|
||||
. ad l
|
||||
. XN "\\$1"
|
||||
. RE
|
||||
. ps 10
|
||||
. sp -.2
|
||||
\h'0n'\v'-1.2n'
|
||||
. fi
|
||||
..
|
||||
|
||||
\" --- Lists ---
|
||||
.de *
|
||||
. IP \(bu 2
|
||||
\\$1
|
||||
..
|
||||
.de +
|
||||
. IP \(bu 2
|
||||
\\$1
|
||||
..
|
||||
.de -
|
||||
. IP \(bu 2
|
||||
\\$1
|
||||
..
|
||||
|
||||
\" --- Block quotes ---
|
||||
.de >
|
||||
. QP
|
||||
. I
|
||||
. ad b
|
||||
..
|
||||
|
||||
\" --- Horizontal rule ---
|
||||
.de ---
|
||||
\l'\\n(.lu\(ul'
|
||||
..
|
23
groff/math
Normal file
23
groff/math
Normal file
|
@ -0,0 +1,23 @@
|
|||
\" Quality of life utilities
|
||||
\" for easier eqn usage.
|
||||
|
||||
\" --- Define register ---
|
||||
.nr eqn 0 1
|
||||
|
||||
.EQ
|
||||
delim $$
|
||||
define . '~ \[md] ~'
|
||||
define * '~ \[mu] ~'
|
||||
define +- '~ \[+-] ~'
|
||||
define -+ '~ + bar ~'
|
||||
define and '~ \[AN] ~'
|
||||
define div '~ \[di] ~'
|
||||
define grad '\[gr]'
|
||||
|
||||
define vec %
|
||||
"$1" sup fwd -70 up 40 size 5.5 \[->] ""
|
||||
%
|
||||
define circumflex %
|
||||
size 8 "$1" sup fwd -29 up 5 size 6 \[ha]
|
||||
%
|
||||
.EN
|
4
groff/pdfutils
Normal file
4
groff/pdfutils
Normal file
|
@ -0,0 +1,4 @@
|
|||
\# These lines set link text and border colours
|
||||
.ds PDFHREF.COLOUR #193be5
|
||||
.defcolor pdf:href.colour rgb \*[PDFHREF.COLOUR]
|
||||
.ds PDFHREF.TEXT.COLOUR pdf:href.colour
|
2
groff/report
Normal file
2
groff/report
Normal file
|
@ -0,0 +1,2 @@
|
|||
.RP no
|
||||
.P1
|
23
groff/spanish
Normal file
23
groff/spanish
Normal file
|
@ -0,0 +1,23 @@
|
|||
\" Redefinición de registros comunes
|
||||
\" para títulos y fechas en español.
|
||||
|
||||
.ds DY \n[dy] de \*[MO] de \n[year]
|
||||
|
||||
.ds ABSTRACT RESUMEN
|
||||
|
||||
.ds TOC Tabla de contenido
|
||||
|
||||
.ds MONTH1 enero
|
||||
.ds MONTH2 febrero
|
||||
.ds MONTH3 marzo
|
||||
.ds MONTH4 abril
|
||||
.ds MONTH5 mayo
|
||||
.ds MONTH6 junio
|
||||
.ds MONTH7 julio
|
||||
.ds MONTH8 agosto
|
||||
.ds MONTH9 septiembre
|
||||
.ds MONTH10 octubre
|
||||
.ds MONTH11 noviembre
|
||||
.ds MONTH12 diciembre
|
||||
|
||||
.ds REFERENCES Referencias
|
17
groff/toc
Normal file
17
groff/toc
Normal file
|
@ -0,0 +1,17 @@
|
|||
\" Borrowed from Sudarson Nantha
|
||||
\" github.com/SudarsonNantha
|
||||
\" ---
|
||||
\" Relocate .TC at the end of the document to either
|
||||
\" 'before' or 'after' (by giving those arguments)
|
||||
\" the page where this macro was sourced.
|
||||
\" ---
|
||||
\" Requires -mspdf macros
|
||||
|
||||
.if '\*[.T]'pdf' \X'pdf: pagename here'
|
||||
.rn TC TCold
|
||||
.de TC
|
||||
. ds CF
|
||||
. ds CH
|
||||
. if '\*[.T]'pdf' \X'pdf: switchtopage \\$1 here'
|
||||
. TCold
|
||||
..
|
5
mpv/input.conf
Normal file
5
mpv/input.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
# increase subtitle font size
|
||||
ALT+k add sub-scale +0.1
|
||||
|
||||
# decrease subtitle font size
|
||||
ALT+j add sub-scale -0.1
|
3
mpv/mpv.conf
Normal file
3
mpv/mpv.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
autofit-larger=90%x90%
|
||||
video-sync=display-resample
|
||||
sub-auto=all
|
6
rtorrent/rtorrent.rc
Normal file
6
rtorrent/rtorrent.rc
Normal file
|
@ -0,0 +1,6 @@
|
|||
directory.default.set = /mnt/Entr/Z-rtorrent/downloads
|
||||
session.path.set = /mnt/Entr/Z-rtorrent/session
|
||||
schedule2 = watch_directory,5,5,load.start=/mnt/Entr/Z-rtorrent/watch/*.torrent
|
||||
|
||||
dht.mode.set = on
|
||||
dht.port.set = 6881
|
16
scripts/batstat
Executable file
16
scripts/batstat
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
# Battery indicator for dwmblocks
|
||||
|
||||
# Save charge % and status to this variables
|
||||
bat=$(grep "[0-9]" /sys/class/power_supply/BAT0/capacity)
|
||||
stat=$(cat /sys/class/power_supply/BAT0/status)
|
||||
|
||||
# Append charging indicator if status file indicates such state
|
||||
# Print only charge % otherwise
|
||||
[ "$stat" = "Charging" ] &&
|
||||
echo "$bat% " && exit ||
|
||||
echo "$bat%"
|
||||
|
||||
# Warning when battery is under 10% capacity and not charging
|
||||
[ $((bat)) -lt 15 ] && [ "$stat" != "Charging" ] &&
|
||||
notify-send --replace-id=15 " Battery" "Capacity at $bat%"
|
3
scripts/boxes-flatpak
Executable file
3
scripts/boxes-flatpak
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
exec /usr/bin/flatpak run --branch=stable --arch=x86_64 org.gnome.Boxes "$@"
|
7
scripts/brightdown
Executable file
7
scripts/brightdown
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
# Reduce brightness by 5%
|
||||
# Depends on 'community/brightnessctl'
|
||||
|
||||
brightness=$(brightnessctl s 5%- | grep -o "[0-9]*%")
|
||||
|
||||
notify-send -u low --replace-id=10 " Brightness" "$brightness"
|
7
scripts/brightup
Executable file
7
scripts/brightup
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
# Increase brightness by 5%
|
||||
# Depends on 'community/brightnessctl'
|
||||
|
||||
brightness=$(brightnessctl s 5%+ | grep -o "[0-9]*%")
|
||||
|
||||
notify-send -u low --replace-id=10 " Brightness" "$brightness"
|
20
scripts/compress
Executable file
20
scripts/compress
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
case $2 in
|
||||
*.tar.bz2) tar cvjSf "$2" "$1" ;;
|
||||
*.tar.zst) t2sz "$1" -o "$2" ;;
|
||||
*.tar.xz) tar cfJ "$2" "$1" ;;
|
||||
*.tar.gz) tar czf "$2" "$1" ;;
|
||||
*.tbz2) echo "Unknown" ;;
|
||||
*.tar) tar cf "$2" "$1" ;;
|
||||
*.rar) rar a "$2" "$1" ;;
|
||||
*.zip) zip -r "$2" "$1" ;;
|
||||
*.deb) echo "Unknown" ;;
|
||||
*.bz2) bzip2 -zk "$1" ;;
|
||||
*.tgz) tar cvzf "$2" "$1" ;;
|
||||
*.7z) 7za a "$2" "$1" ;;
|
||||
*.gz) gzip "$1" ;;
|
||||
*.xz) xz $1 ;;
|
||||
*) echo "Usage: compress <file/dir/tarball> <archive.eg>" ;;
|
||||
esac
|
||||
|
10
scripts/cpustat
Executable file
10
scripts/cpustat
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
# CPU usage %
|
||||
# 'https://stackoverflow.com/questions/9229333/how-to-get-overall-cpu-usage-e-g-57-on-linux'
|
||||
# – Yeti Oct 21, 2017 at 9:21
|
||||
|
||||
cat "$XDG_CACHE_HOME"/cpustat
|
||||
|
||||
load=$({ head -n1 /proc/stat;sleep 0.3;head -n1 /proc/stat; } | awk '/^cpu /{u=$2-u;s=$4-s;i=$5-i;w=$6-w}END{print int(0.5+100*(u+s+w)/(u+s+i+w))}')
|
||||
|
||||
echo "$load%" > "$XDG_CACHE_HOME"/cpustat
|
24
scripts/distro
Executable file
24
scripts/distro
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
# Shamefully stolen from 6kg@github
|
||||
|
||||
# Get distro (either arch or debian)
|
||||
for os in /etc/os-release /usr/lib/os-release; do
|
||||
# some POSIX shells exit when trying to source a file that doesn't exist
|
||||
[ -f $os ] && . $os && break
|
||||
done
|
||||
|
||||
eq() # equals | [ a = b ] with globbing
|
||||
{
|
||||
case $1 in
|
||||
$2) ;;
|
||||
*) return 1;;
|
||||
esac
|
||||
}
|
||||
|
||||
while read -r line; do
|
||||
eq "$line" 'PPid*' && ppid=${line##*:?} && break
|
||||
done < "/proc/${ppid:-$PPID}/status"
|
||||
|
||||
[ "$ID" ] || { set -- $line; ID="$1 $2"; }
|
||||
|
||||
echo $ID
|
14
scripts/dmenu-addbookmark
Executable file
14
scripts/dmenu-addbookmark
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
# Get URL from clipboard
|
||||
# and save as a bookmark
|
||||
|
||||
bookmark="$(xsel -ob)"
|
||||
|
||||
if grep -q "$bookmark" "$HOME/.config/bookmarks" ; then
|
||||
notify-send "Bookmarks" "Already bookmarked"
|
||||
else
|
||||
name="$(dmenu -p 'Bookmark name:' < /dev/null)"
|
||||
entry="$name-$bookmark"
|
||||
echo "$entry" >> "$HOME/.config/bookmarks"
|
||||
notify-send "Bookmarks" "Added $entry"
|
||||
fi
|
8
scripts/dmenu-bookmarks
Executable file
8
scripts/dmenu-bookmarks
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
# Open URLs from bookmarks file
|
||||
|
||||
# Print site names, then get URL based on the name. Exit if empty
|
||||
name=$(awk -F '-' '{print $1}' ~/.config/bookmarks | dmenu -i -p "Site:")
|
||||
[ -z "$name" ] && exit
|
||||
|
||||
grep "$name" ~/.config/bookmarks | cut -d '-' -f 2- | xsel -ib && notify-send " $name" "Copied to clipboard"
|
19
scripts/dmenu-emoji
Executable file
19
scripts/dmenu-emoji
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Custom version of Luke Smith's
|
||||
# famous "get a menu of emojis to copy" script.
|
||||
|
||||
# Get user selection via dmenu from emoji file.
|
||||
chosen=$(cut -d ';' -f1 ~/.local/share/chars/* | dmenu -p "Emoji: " | sed "s/ .*//")
|
||||
|
||||
# Exit if none chosen.
|
||||
[ -z "$chosen" ] && exit
|
||||
|
||||
# If you run this command with an argument, it will automatically insert the
|
||||
# character. Otherwise, show a message that the emoji has been copied.
|
||||
if [ -n "$1" ]; then
|
||||
xdotool type "$chosen"
|
||||
else
|
||||
printf "$chosen" | xsel -ib
|
||||
notify-send "'$chosen' copied to clipboard." &
|
||||
fi
|
11
scripts/dmenu-input
Executable file
11
scripts/dmenu-input
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
# Set default input device
|
||||
|
||||
# Get proper name from sources
|
||||
input=$(pactl list short sources | cut -f 2 | grep input | dmenu -i -p "Input:")
|
||||
|
||||
# Set audio device, notify command success
|
||||
pactl set-default-source "$input" && notify-send " Default Input" "Set to '$input'" || notify-send " Default Input" "Didn't change"
|
||||
|
||||
# Reload statusbar volume module (dwm & dwmblocks)
|
||||
kill -45 "$(pidof dwmblocks)"
|
11
scripts/dmenu-mount
Executable file
11
scripts/dmenu-mount
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
# Mount devices based on LABEL,
|
||||
# will not work with uuid or other
|
||||
# disk identification method
|
||||
|
||||
# Get LABEL of disk and device name
|
||||
disk=$(blkid | grep -wv primary | cut -d '=' -f 2 | cut -d '"' -f2 | dmenu -p "Mount: ")
|
||||
device=$(blkid | grep "$disk" | cut -d ':' -f 1 | cut -d '/' -f 3)
|
||||
|
||||
# Attempt to mount $device and notify success of command
|
||||
mount /dev/"$device" && notify-send "$disk" "Mounted" || notify-send "$disk" "Operation unsuccessful"
|
14
scripts/dmenu-otp
Executable file
14
scripts/dmenu-otp
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
# OTP script for 'pass'
|
||||
|
||||
# Ask for password name in vault
|
||||
password=$(find ~/.password-store/ -type f -name '*.gpg' | sed 's/.*\/\(.*\)\.gpg$/\1/' | dmenu -i -p "OTP:")
|
||||
|
||||
# Exit if none chosen
|
||||
[ -z "$password" ] && exit
|
||||
|
||||
# Otherwise, copy to clipboard and notify OTP
|
||||
pass otp "$password" | while read -r OUTPUT; do
|
||||
echo $OUTPUT | xsel -ib
|
||||
notify-send " $password" "$OUTPUT"
|
||||
done
|
11
scripts/dmenu-output
Executable file
11
scripts/dmenu-output
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
# Set default output device
|
||||
|
||||
# Get proper name from sinks
|
||||
output=$(pactl list short sinks | cut -f 2 | dmenu -i -p "Output:")
|
||||
|
||||
# Set audio device, notify command success
|
||||
pactl set-default-sink "$output" && notify-send " Default Output" "Set to '$output'" || notify-send " Default Output" "Didn't change"
|
||||
|
||||
# Reload statusbar module (dwm & dwmblocks)
|
||||
kill -44 "$(pidof dwmblocks)"
|
12
scripts/dmenu-pass
Executable file
12
scripts/dmenu-pass
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
# Script for 'pass'
|
||||
|
||||
# Ask for password name in vault
|
||||
password=$(find ~/.password-store/ -type f -name '*.gpg' |
|
||||
sed 's/.*\/\(.*\)\.gpg$/\1/' | dmenu -i -p "Password:")
|
||||
|
||||
# Exit if none chosen
|
||||
[ -z "$password" ] && exit
|
||||
|
||||
# If chosen, copy to clipboard, and notify
|
||||
pass show "$password" | head -1 | xsel -ib && notify-send " $password" "Copied to clipboard"
|
11
scripts/dmenu-power
Executable file
11
scripts/dmenu-power
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
# Prompt for power options using dmenu
|
||||
|
||||
option=$(printf "Shutdown\nRestart" | dmenu -i -p "Power:")
|
||||
|
||||
case "$option" in
|
||||
"Shutdown") sudo poweroff ;;
|
||||
"Restart") sudo reboot ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
|
4
scripts/dmenu-scripts
Executable file
4
scripts/dmenu-scripts
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
# Run chosen script from custom directory
|
||||
|
||||
$(ls ~/.config/scripts/ | dmenu -i -p "Script:")
|
13
scripts/dmenu-snippets
Executable file
13
scripts/dmenu-snippets
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
# Copy snippets to clipboard
|
||||
|
||||
# Snippets directory
|
||||
snippets=~/.config/snippets
|
||||
# Select using dmenu, copy if successful
|
||||
snippet=$(ls "$snippets" | dmenu -p "Snippet:")
|
||||
|
||||
# Exit if empty
|
||||
[ -z "$snippet" ] && exit
|
||||
|
||||
# Copy to clipboard and notify otherwise
|
||||
cat "$snippets"/"$snippet" | xsel -ib && notify-send "Snippet" "'$snippet' copied to clipboard!"
|
11
scripts/dmenu-unmount
Executable file
11
scripts/dmenu-unmount
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
# Unmount devices based on LABEL,
|
||||
# will not work with uuid or other
|
||||
# disk identification method
|
||||
|
||||
# Get LABEL of disk and device name
|
||||
disk=$(blkid | grep -wv primary | cut -d '=' -f 2 | cut -d '"' -f2 | dmenu -p "Unmount: ")
|
||||
device=$(blkid | grep "$disk" | cut -d ':' -f 1 | cut -d '/' -f 3)
|
||||
|
||||
# Attempt to unmount $device and notify success of command
|
||||
umount /dev/"$device" && notify-send "$disk" "Unmounted" || notify-send "$disk" "Operation unsuccessful"
|
20
scripts/extract
Executable file
20
scripts/extract
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
case $1 in
|
||||
*.tar.bz2) tar vxjf $1 ;;
|
||||
*.tar.zst) unzstd $1 ;;
|
||||
*.tar.xz) tar vxf $1 ;;
|
||||
*.tar.gz) tar vxzf $1 ;;
|
||||
*.tbz2) tar vxjf $1 ;;
|
||||
*.tar) tar vxf $1 ;;
|
||||
*.rar) unrar x $1 ;;
|
||||
*.zip) unzip $1 ;;
|
||||
*.deb) ar x $1 ;;
|
||||
*.bz2) bunzip2 $1 ;;
|
||||
*.tgz) tar vxzf $1 ;;
|
||||
*.7z) 7z x $1 ;;
|
||||
*.gz) gunzip $1 ;;
|
||||
*.xz) unxz $1 ;;
|
||||
*.Z) uncompress $1 ;;
|
||||
*) echo "Usage: extract <file>" ;;
|
||||
esac
|
283
scripts/fetch
Executable file
283
scripts/fetch
Executable file
|
@ -0,0 +1,283 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# fet.sh
|
||||
# a fetch in pure POSIX shell
|
||||
#
|
||||
# by 6kg@github
|
||||
#
|
||||
# Modified by me
|
||||
|
||||
# supress errors
|
||||
exec 2>/dev/null
|
||||
set --
|
||||
eq() { # equals | [ a = b ] with globbing
|
||||
case $1 in
|
||||
$2) ;;
|
||||
*) return 1;;
|
||||
esac
|
||||
}
|
||||
|
||||
## DE
|
||||
wm=$XDG_CURRENT_DESKTOP
|
||||
[ "$wm" ] || wm=$DESKTOP_SESSION
|
||||
|
||||
## Distro
|
||||
# freedesktop.org/software/systemd/man/os-release.html
|
||||
# a common file that has variables about the distro
|
||||
for os in /etc/os-release /usr/lib/os-release; do
|
||||
# some POSIX shells exit when trying to source a file that doesn't exist
|
||||
[ -f $os ] && . $os && break
|
||||
done
|
||||
|
||||
if [ -e /proc/$$/comm ]; then
|
||||
## Terminal
|
||||
while [ ! "$term" ]; do
|
||||
# loop over lines in /proc/pid/status until it reaches PPid
|
||||
# then save that to a variable and exit the file
|
||||
while read -r line; do
|
||||
eq "$line" 'PPid*' && ppid=${line##*:?} && break
|
||||
done < "/proc/${ppid:-$PPID}/status"
|
||||
|
||||
# Make sure not to do an infinite loop
|
||||
[ "$pppid" = "$ppid" ] && break
|
||||
pppid=$ppid
|
||||
|
||||
# get name of binary
|
||||
read -r name < "/proc/$ppid/comm"
|
||||
|
||||
case $name in
|
||||
*sh|"${0##*/}") ;; # skip shells
|
||||
*[Ll]ogin*|*init|*systemd*) break;; # exit when the top is reached
|
||||
# anything else can be assumed to be the terminal
|
||||
# this has the side affect of catching tmux, but tmux
|
||||
# detaches from the terminal and therefore ignoring that
|
||||
# will just make the init the term
|
||||
*) term=$name
|
||||
esac
|
||||
done
|
||||
|
||||
## WM/DE
|
||||
[ "$wm" ] ||
|
||||
# loop over all processes and check the binary name
|
||||
for i in /proc/*/comm; do
|
||||
read -r c < "$i"
|
||||
case $c in
|
||||
*bar*|*rc) ;;
|
||||
awesome|xmonad*|qtile|sway|i3|[bfo]*box|dwm|*wm) wm=${c%%-*}; break;;
|
||||
esac
|
||||
done
|
||||
|
||||
## Memory
|
||||
# loop over lines in /proc/meminfo until it reaches MemTotal,
|
||||
# then convert the amount (second word) from KB to MB
|
||||
while read -r line; do
|
||||
eq "$line" 'MemTotal*' && set -- $line && break
|
||||
done < /proc/meminfo
|
||||
mem="$(( $2 / 1000 ))MB"
|
||||
|
||||
## Processor
|
||||
while read -r line; do
|
||||
case $line in
|
||||
vendor_id*) vendor="${line##*: } ";;
|
||||
model\ name*) cpu=${line##*: }; break;;
|
||||
esac
|
||||
done < /proc/cpuinfo
|
||||
|
||||
## Uptime
|
||||
# the simple math is shamefully stolen from aosync
|
||||
IFS=. read -r uptime _ < /proc/uptime
|
||||
d=$((uptime / 60 / 60 / 24))
|
||||
up=$(printf %02d:%02d $((uptime / 60 / 60 % 24)) $((uptime / 60 % 60)))
|
||||
[ "$d" -gt 0 ] && up="${d}d $up"
|
||||
|
||||
## Kernel
|
||||
read -r _ _ version _ < /proc/version
|
||||
kernel=${version}
|
||||
eq "$version" '*Microsoft*' && ID="fake $ID"
|
||||
|
||||
## Motherboard // laptop
|
||||
read -r model < /sys/devices/virtual/dmi/id/product_name
|
||||
# invalid model handling
|
||||
case $model in
|
||||
# alternate file with slightly different info
|
||||
# on my laptop it has the device model (instead of 'hp notebook')
|
||||
# on my desktop it has the extended motherboard model
|
||||
'System '*|'Default '*|'To Be Filled'*)
|
||||
read -r model < /sys/devices/virtual/dmi/id/board_name
|
||||
esac
|
||||
|
||||
## Packages
|
||||
# clean environment, then make every file in the dir an argument,
|
||||
# then save the argument count to $pkgs
|
||||
set --
|
||||
# kiss, arch, debian, void, gentoo
|
||||
for i in '/var/db/kiss/installed/*' '/var/lib/pacman/local/[0-9a-z]*' \
|
||||
'/var/lib/dpkg/info/*.list' '/var/db/xbps/.*' '/var/db/pkg/*/*'; do
|
||||
set -- $i
|
||||
[ $# -gt 1 ] && pkgs=$# && break
|
||||
done
|
||||
|
||||
[ -d "/var/db/kiss" ] && pkgs="$pkgs (kiss)"
|
||||
[ -d "/var/lib/pacman" ] && pkgs="$pkgs (pacman)"
|
||||
[ -d "/var/lib/dpkg" ] && pkgs="$pkgs (dpkg)"
|
||||
[ -d "/var/db/xbps" ] && pkgs="$pkgs (xbps)"
|
||||
[ -d "/var/db/pkg" ] && pkgs="$pkgs (emerge)"
|
||||
|
||||
## Packages - other package managers
|
||||
# flatpak
|
||||
set --
|
||||
which flatpak > /dev/null 2>&1 && pkgs="$pkgs $(flatpak list | wc -l) (flatpak)"
|
||||
# nix-env
|
||||
set --
|
||||
which nix-env > /dev/null 2>&1 && pkgs="$pkgs $(ls /nix/store | wc -l) (nix-env)"
|
||||
|
||||
read -r host < /proc/sys/kernel/hostname
|
||||
elif [ -f /var/run/dmesg.boot ]; then
|
||||
# Both OpenBSD and FreeBSD use this file, however they're formatted differently
|
||||
read -r bsd < /var/run/dmesg.boot
|
||||
case $bsd in
|
||||
Open*)
|
||||
## OpenBSD cpu/mem/name
|
||||
while read -r line; do
|
||||
case $line in
|
||||
'real mem'*)
|
||||
# use the pre-formatted value which is in brackets
|
||||
mem=${line##*\(}
|
||||
mem=${mem%\)*}
|
||||
;;
|
||||
# set $cpu to everything before a comma and after the field name
|
||||
cpu0:*)
|
||||
cpu=${line#cpu0: }
|
||||
# Remove excess info after the actual CPU name
|
||||
cpu=${cpu%%,*}
|
||||
# Set the CPU Manufacturer to the first word of the cpu
|
||||
# variable [separated by '(' or ' ']
|
||||
vendor=${cpu%%[\( ]*}
|
||||
# We got all the info we want, stop reading
|
||||
break
|
||||
;;
|
||||
# First 2 words in the file are OpenBSD <version>
|
||||
*) [ "$ID" ] || { set -- $line; ID="$1 $2"; }
|
||||
esac
|
||||
done < /var/run/dmesg.boot
|
||||
[ -d /var/db/pkg ] && set -- /var/db/pkg/* && pkgs=$#
|
||||
read -r host < /etc/myname
|
||||
host=${host%.*}
|
||||
;;
|
||||
# Everything else, assume FreeBSD (first line is ---<<BOOT>> or something)
|
||||
*)
|
||||
# shellcheck source=/dev/null
|
||||
. /etc/rc.conf
|
||||
# shut shellcheck up without disabling the warning
|
||||
host=${hostname:-}
|
||||
|
||||
while read -r line; do
|
||||
case $line in
|
||||
# os version
|
||||
FreeBSD*)
|
||||
# If the OS is already set, no need to set it again
|
||||
[ "$ID" ] && continue
|
||||
ID=${line%%-R*}
|
||||
;;
|
||||
|
||||
CPU:*)
|
||||
cpu=${cpu#CPU: }
|
||||
# Remove excess info from after the actual CPU name
|
||||
cpu=${line%\(*}
|
||||
;;
|
||||
*Origin=*)
|
||||
# CPU Manufacturer
|
||||
vendor=${line#*Origin=\"}
|
||||
vendor="${vendor%%\"*} "
|
||||
;;
|
||||
|
||||
'real memory'*)
|
||||
# Get the pre-formatted amount which is inside brackets
|
||||
mem=${line##*\(}
|
||||
mem=${mem%\)*}
|
||||
# This appears to be the final thing we need from the file,
|
||||
# no need to read it more.
|
||||
break
|
||||
esac
|
||||
done < /var/run/dmesg.boot
|
||||
;;
|
||||
esac
|
||||
elif v=/System/Library/CoreServices/SystemVersion.plist; [ -f "$v" ]; then
|
||||
## Macos
|
||||
# make sure this variable is empty as to not break the following loop
|
||||
temp=
|
||||
while read -r line; do
|
||||
case $line in
|
||||
# set a variable so the script knows it's on the correct line
|
||||
# (the line after this one is the important one)
|
||||
*ProductVersion*) temp=.;;
|
||||
*)
|
||||
# check if the script is reading the derired line, if not
|
||||
# don't do anything
|
||||
[ "$temp" ] || continue
|
||||
# Remove everything before and including the first '>'
|
||||
ID=${line#*>}
|
||||
# Remove the other side of the XML tag, and insert the actual OS name
|
||||
ID="MacOS ${ID%<*}"
|
||||
# We got the info we want, end the loop.
|
||||
break
|
||||
esac
|
||||
done < "$v"
|
||||
fi
|
||||
|
||||
eq "$0" '*fetish' && printf 'Step on me daddy\n' && exit
|
||||
|
||||
# help i dont know if it's a capital consistently
|
||||
eq "$wm" '*[Gg][Nn][Oo][Mm][Ee]*' && wm='foot DE'
|
||||
|
||||
## GTK
|
||||
while read -r line; do
|
||||
eq "$line" 'gtk-theme*' && gtk=${line##*=} && break
|
||||
done < "${XDG_CONFIG_HOME:=$HOME/.config}/gtk-3.0/settings.ini"
|
||||
|
||||
# Shorten $cpu and $vendor
|
||||
# this is so messy due to so many inconsistencies in the model names
|
||||
vendor=${vendor##*Authentic}
|
||||
vendor=${vendor##*Genuine}
|
||||
cpu=${cpu##*) }
|
||||
cpu=${cpu%% @*}
|
||||
cpu=${cpu%% CPU}
|
||||
cpu=${cpu##CPU }
|
||||
cpu=${cpu##*AMD }
|
||||
cpu=${cpu%% with*}
|
||||
cpu=${cpu% *-Core*}
|
||||
|
||||
col() {
|
||||
printf ' '
|
||||
for i in 1 2 3 4 5 6; do
|
||||
printf '\033[9%sm%s' "$i" "${colourblocks:-▅▅}"
|
||||
done
|
||||
printf '\033[0m\n'
|
||||
}
|
||||
|
||||
print() {
|
||||
[ "$2" ] && printf '\033[9%sm%6s\033[0m%b%s\n' \
|
||||
"${accent:-4}" "$1" "${separator:- ~ }" "$2"
|
||||
}
|
||||
|
||||
# default value
|
||||
: "${info:=n user os sh wm up gtk cpu mem host kern pkgs term col}"
|
||||
|
||||
for i in $info; do
|
||||
case $i in
|
||||
n) echo;;
|
||||
os) print os "$ID";;
|
||||
sh) print sh "$SHELL";;
|
||||
wm) print wm "$wm";;
|
||||
up) print up "$up";;
|
||||
gtk) print gtk "$gtk";;
|
||||
cpu) print cpu "$vendor$cpu";;
|
||||
mem) print mem "$mem";;
|
||||
host) print host "$model";;
|
||||
kern) print kern "$kernel";;
|
||||
pkgs) print pkgs "$pkgs";;
|
||||
term) print term "$TERM";;
|
||||
user) printf '%7s@%s\n' "$USER" "$host";;
|
||||
col) col;;
|
||||
esac
|
||||
done
|
70
scripts/fetch-min
Executable file
70
scripts/fetch-min
Executable file
|
@ -0,0 +1,70 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# fet.sh
|
||||
# a fetch in pure POSIX shell
|
||||
#
|
||||
# by 6kg@github
|
||||
#
|
||||
# Modified by me
|
||||
|
||||
## Distro
|
||||
# freedesktop.org/software/systemd/man/os-release.html
|
||||
# a common file that has variables about the distro
|
||||
for os in /etc/os-release /usr/lib/os-release; do
|
||||
# some POSIX shells exit when trying to source a file that doesn't exist
|
||||
[ -f $os ] && . $os && break
|
||||
done
|
||||
|
||||
## Uptime
|
||||
# the simple math is shamefully stolen from aosync
|
||||
IFS=. read -r uptime _ < /proc/uptime
|
||||
d=$((uptime / 60 / 60 / 24))
|
||||
up=$(printf %02d:%02d $((uptime / 60 / 60 % 24)) $((uptime / 60 % 60)))
|
||||
[ "$d" -gt 0 ] && up="${d}d $up"
|
||||
|
||||
## Packages
|
||||
# clean environment, then make every file in the dir an argument,
|
||||
# then save the argument count to $pkgs
|
||||
set --
|
||||
# kiss, arch, debian, void, gentoo
|
||||
for i in '/var/db/kiss/installed/*' '/var/lib/pacman/local/[0-9a-z]*' \
|
||||
'/var/lib/dpkg/info/*.list' '/var/db/xbps/.*' '/var/db/pkg/*/*'; do
|
||||
set -- $i
|
||||
[ $# -gt 1 ] && pkgs="$#" && break
|
||||
done
|
||||
|
||||
[ -d "/var/db/kiss" ] && pkgs="$pkgs (kiss)"
|
||||
[ -d "/var/lib/pacman" ] && pkgs="$pkgs (pacman)"
|
||||
[ -d "/var/lib/dpkg" ] && pkgs="$pkgs (dpkg)"
|
||||
[ -d "/var/db/xbps" ] && pkgs="$pkgs (xbps)"
|
||||
[ -d "/var/db/pkg" ] && pkgs="$pkgs (emerge)"
|
||||
|
||||
## Packages - other package managers
|
||||
# flatpak
|
||||
set --
|
||||
which flatpak > /dev/null 2>&1 && pkgs="$pkgs $(flatpak list | wc -l) (flatpak)"
|
||||
# nix-env
|
||||
set --
|
||||
which nix-env > /dev/null 2>&1 && pkgs="$pkgs $(ls /nix/store | wc -l) (nix-env)"
|
||||
|
||||
|
||||
col() {
|
||||
printf ' '
|
||||
for i in 1 2 3 4 5 6; do
|
||||
printf '\033[9%sm%s' "$i" "${colourblocks:-▅▅}"
|
||||
done
|
||||
printf '\033[0m\n'
|
||||
}
|
||||
|
||||
print() {
|
||||
[ "$2" ] && printf '\033[9%sm%6s\033[0m%b%s\n' \
|
||||
"${accent:-4}" "$1" "${separator:- ~ }" "$2"
|
||||
}
|
||||
|
||||
print os "$ID"
|
||||
print sh "$SHELL"
|
||||
print up "$up"
|
||||
print kern "$(uname -r)"
|
||||
print pkgs "$pkgs"
|
||||
print term "$TERM"
|
||||
col
|
66
scripts/ffmpeg-compress
Executable file
66
scripts/ffmpeg-compress
Executable file
|
@ -0,0 +1,66 @@
|
|||
#!/bin/sh
|
||||
# ffmpeg compression & encoding for multiple use cases
|
||||
: "${modes:=youtube small}"
|
||||
|
||||
help() {
|
||||
printf "\n\033[1m"Usage:"\033[0m\n"
|
||||
printf " ffmpeg-compress [Video] [Preset] [optional:resolution@framerate]"
|
||||
printf "\n\033[1m"Presets:"\033[0m\n"
|
||||
for mode in "$modes" ; do printf " $mode" ; done
|
||||
echo
|
||||
exit
|
||||
}
|
||||
|
||||
input="$1" # Filename
|
||||
suffix=${input##*.} # Suffix
|
||||
preset="$2" # Preset
|
||||
# File and/or mode not given
|
||||
[ -z "$preset" ] && help
|
||||
|
||||
res=${3%%@*} # Resolution from 3rd argument
|
||||
frm=${3##*@} # Framerate from 3rd argument
|
||||
# (File's current settings otherwise)
|
||||
[ -z "$res" ] && res=$(ffmpeg -i "$input" 2>&1 | grep -oP 'Stream .*, \K[0-9]+x[0-9]+')
|
||||
[ -z "$frm" ] && frm=$(ffmpeg -i "$input" 2>&1 | sed -n "s/.*, \(.*\) tbr.*/\1/p")
|
||||
|
||||
# YouTube
|
||||
# Use parameters found in 'https://support.google.com/youtube/answer/1722171#zippy='
|
||||
# and 'https://gist.github.com/mikoim/27e4e0dc64e384adbcb91ff10a2d3678'
|
||||
# to determine proper youtube upload encoding.
|
||||
encode_youtube() {
|
||||
output=${input%".$suffix"}-encode-yt.mp4
|
||||
ffmpeg -i "$input" \
|
||||
-movflags faststart \
|
||||
-c:v libx264 \
|
||||
-profile:v high \
|
||||
-bf 2 \
|
||||
-g 30 \
|
||||
-crf 24 \
|
||||
-pix_fmt yuv420p \
|
||||
-c:a aac \
|
||||
-profile:a aac_low \
|
||||
-b:a 384k \
|
||||
"$output"
|
||||
}
|
||||
|
||||
# Sensible settings for good quality
|
||||
# while encoding a smaller file size
|
||||
compress_small() {
|
||||
output=${input%".$suffix"}-compress-small.mp4
|
||||
ffmpeg -i "$input" \
|
||||
-profile:v baseline \
|
||||
-pix_fmt yuv420p \
|
||||
-movflags faststart \
|
||||
-vcodec libx264 \
|
||||
-crf 28 \
|
||||
-c:a aac \
|
||||
-b:a 128k \
|
||||
"$output"
|
||||
}
|
||||
|
||||
# Run chosen preset, exit if there's an error in process
|
||||
[ "$preset" = "youtube" ] && encode_youtube
|
||||
[ "$preset" = "small" ] && compress_small
|
||||
|
||||
# Given preset was not found
|
||||
echo "'$preset' is not a valid preset" && help
|
5
scripts/flash
Executable file
5
scripts/flash
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
# Flashes USB devices
|
||||
# Requires 'pv'
|
||||
|
||||
pv $1 > $2 && sync && echo "Done!" && sync
|
13
scripts/git-branch-create
Executable file
13
scripts/git-branch-create
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Get branch info
|
||||
echo "Branch name: " && read -r branch
|
||||
[ -z "$branch" ] && echo "No branch name specified" && exit
|
||||
echo "Branch origin (blank for 'origin'): " && read -r origin
|
||||
|
||||
# Create branch and switch to it
|
||||
git checkout -b "$branch"
|
||||
|
||||
# Push changes from origin
|
||||
[ -z "$origin" ] && origin="origin"
|
||||
git push --set-upstream "$origin" "$branch"
|
14
scripts/groff-compiler
Executable file
14
scripts/groff-compiler
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
# I needed this to replace env variables
|
||||
# for easier macro sourcing
|
||||
|
||||
soelim -I ~/.config/groff/ "$1" | refer -p ~/.config/groff/bibliography |
|
||||
groff -mspdf -T pdf -U -ketpj
|
||||
|
||||
# Preprocessors
|
||||
# [-k (preconv)]
|
||||
# [-e (eqn)]
|
||||
# [-t (tbl)]
|
||||
# [-p (pic)]
|
||||
# [-G (grap)]
|
||||
# [-j (chem) (messes up spacing)]
|
4
scripts/handbrake
Executable file
4
scripts/handbrake
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
# Default command is ghb for some reason
|
||||
|
||||
ghb
|
41
scripts/id3tag-autotag
Executable file
41
scripts/id3tag-autotag
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
# Goes through music library and tags songs
|
||||
#
|
||||
# WARNING:
|
||||
# Running this script can mess up
|
||||
# your tags, use at your own risk
|
||||
#
|
||||
# Usage:
|
||||
# cd into your LIBRARY and make
|
||||
# sure the structure is as follows:
|
||||
# LIBRARY/Artist/Album_(Year)/XX-Song.mp3
|
||||
#
|
||||
# ** XX stands for track position in album
|
||||
# 'Single' album songs also need tracknumber
|
||||
# such as 01-Song.mp3
|
||||
#
|
||||
# ** It is not exclusive to mp3,
|
||||
# just change the codec when it appears
|
||||
# to opus, flac, etc.
|
||||
#
|
||||
# ** I also saved a yt-dlp-get-album
|
||||
# command that adds tracknumber for you
|
||||
# in the format required above
|
||||
|
||||
for artist in * ; do
|
||||
properartist=${artist//[_]/" "}
|
||||
for album in $artist/* ; do
|
||||
properalbum=$(echo "${album//[_]/" "}" | cut -d "/" -f 2 | awk 'NF{NF-=1};1' )
|
||||
year=$(echo "${album//[_]/" "}" | cut -d "/" -f 2 | grep -o "[0-9][0-9][0-9][0-9]")
|
||||
id3tag -a "$properartist" "$album"/*
|
||||
id3tag -A "$properalbum" "$album"/*
|
||||
id3tag -y "$year" "$album"/*
|
||||
for song in "$album"/* ; do
|
||||
propersong=$(echo "${song//[_]/" "}" | cut -d "/" -f 3 | sed 's/.mp3//g' | sed 's/[0-9][0-9]-//g' )
|
||||
tracknum=$(echo "${song//[_]/" "}" | cut -d "/" -f 3 | sed 's/.mp3//g' | cut -d "-" -f 1)
|
||||
tracktot=$(ls "$album" | wc -l )
|
||||
id3tag -s "$propersong" "$song"
|
||||
id3tag -t "$tracknum" -T "$tracktot" "$song"
|
||||
done ;
|
||||
done ;
|
||||
done ;
|
5
scripts/iwctl-disconnect
Executable file
5
scripts/iwctl-disconnect
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
# Depends on script that grabs network name
|
||||
|
||||
# Executes and notifies command success
|
||||
iwctl station wlan0 disconnect "$iwdstat" && notify-send "直 Wireless Network" "Disconnected" || "直 Wireless Network" "Operation unsuccessful"
|
25
scripts/iwctl-dmenu-connect
Executable file
25
scripts/iwctl-dmenu-connect
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
# 'iwd' connect helper using dmenu
|
||||
|
||||
# Possibly very convoluted way of fetching SSIDs
|
||||
network=$(iwctl station wlan0 get-networks | cut -d " " -f 7-21 | tail +5 | awk '{if(NF>0) {print $0}}' | awk -F " " '{print $1}' | dmenu -p "Connect:")
|
||||
[ -z "$network" ] && exit # Exit if empty SSID
|
||||
|
||||
# Attempt connection
|
||||
iwctl station wlan0 connect --dont-ask "$network"
|
||||
sleep 2 # Bit of grace time
|
||||
# Exit with notification if $network is shown on status
|
||||
iwctl station wlan0 show | grep "network" | awk '{print $3}' | grep -q "$network" && notify-send "直 Wireless Network" "Connected to $network" && exit
|
||||
|
||||
# Try connecting with passphrase
|
||||
pass=$(dmenu -p "Passphrase:" -P < /dev/null)
|
||||
# Test for empty password, exit if true
|
||||
[ -z "$pass" ] && notify-send "直 Wireless Network" "Invalid password: Empty" && exit
|
||||
# Attempt conection with provided pass, notify and exit on success
|
||||
iwctl --passphrase="$pass" station wlan0 connect --dont-ask "$network"
|
||||
sleep 2 # Bit of grace time
|
||||
# Exit with notification if $network is shown on status
|
||||
iwctl station wlan0 show | grep "network" | awk '{print $3}' | grep -q "$network" && notify-send "直 Wireless Network" "Connected to $network" && exit
|
||||
|
||||
# Notify unsuccessful operation
|
||||
notify-send "直 Wireless Network" "Operation unsuccessful"
|
5
scripts/iwctl-scan
Executable file
5
scripts/iwctl-scan
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
# Shortcut for scanning networks
|
||||
|
||||
# Attempt to scan networks, notify operation success
|
||||
iwctl station wlan0 scan && notify-send "直 Wireless Network" "Scanning..." || notify-send " Wireless Network" "Operation unsuccessful"
|
10
scripts/iwdstat
Executable file
10
scripts/iwdstat
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
# Depends on 'iwd'
|
||||
# Get current network SSID
|
||||
|
||||
# Get SSID name and format properly
|
||||
ssid=$(iwctl station wlan0 show | grep network | cut -d " " -f 19-23 | awk -F " " '{print $1}')
|
||||
|
||||
# If $ssid variable is empty, display "Disconnected"
|
||||
# Display network SSID otherwise
|
||||
[ -z "$ssid" ] && echo "Disconnected" || echo "$ssid"
|
3
scripts/kdenlive-flatpak
Executable file
3
scripts/kdenlive-flatpak
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
flatpak run org.kde.kdenlive
|
4
scripts/layoutstat
Executable file
4
scripts/layoutstat
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
# Get current keyboard layout
|
||||
|
||||
setxkbmap -query | grep layout | awk '{print $2}'
|
12
scripts/links-get-iso
Executable file
12
scripts/links-get-iso
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
# Get current ISO for
|
||||
# various linux distros
|
||||
|
||||
case $1 in
|
||||
debian) links "https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/" ;;
|
||||
ubuntu) links "https://ubuntu.com/download/desktop/" ;;
|
||||
arch) links "https://geo.mirror.pkgbuild.com/iso/" ;;
|
||||
mint) links "https://mirrors.edge.kernel.org/linuxmint/stable/" ;;
|
||||
void) links "https://repo-default.voidlinux.org/live/current/" ;;
|
||||
*) echo "Usage: wget-iso <arch/mint/void...>" ;;
|
||||
esac
|
4
scripts/memorystat
Executable file
4
scripts/memorystat
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
# Get current RAM memory usage
|
||||
|
||||
free --mebi | sed -n '2{p;q}' | awk '{printf ("%2.1fG", ( $3 / 1024), ($2 / 1024))}'
|
5
scripts/micdown
Executable file
5
scripts/micdown
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
# Reduces mic volume by 5%
|
||||
|
||||
amixer set Capture 5%-
|
||||
kill -45 "$(pidof dwmblocks)"
|
7
scripts/micmute
Executable file
7
scripts/micmute
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
# Mute
|
||||
|
||||
amixer -q set Capture toggle
|
||||
|
||||
# Restart statusbar module (dwm & dwmblocks)
|
||||
kill -45 "$(pidof dwmblocks)"
|
15
scripts/micstat
Executable file
15
scripts/micstat
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
# Fetch current mic levels
|
||||
# (in current default Capture)
|
||||
|
||||
# Get volume levels
|
||||
vol=$(amixer | grep "Capture" | grep -o '[0-9]*[0-9]%' | tail -n 1)
|
||||
|
||||
# If device is off (muted), notify mute, print volume otherwise
|
||||
if amixer scontents | grep "Capture" | grep -q "\[off\]"; then
|
||||
echo " M"
|
||||
notify-send -u low --replace-id=11 " Microphone" "Mute"
|
||||
else
|
||||
echo "$vol"
|
||||
notify-send -u low --replace-id=11 " Microphone" "$vol"
|
||||
fi
|
5
scripts/micup
Executable file
5
scripts/micup
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
# Increases mic volume by 5%
|
||||
|
||||
amixer set Capture 5%+
|
||||
kill -45 "$(pidof dwmblocks)"
|
5
scripts/mpv-playclipboard
Executable file
5
scripts/mpv-playclipboard
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
# Play from clipboard on mpv
|
||||
|
||||
notify-send "mpv" "Attempting to play from URL..."
|
||||
mpv "$(xsel -ob)" || notify-send "mpv" "Error: Couldn't open URL"
|
5
scripts/mpv-webcam
Executable file
5
scripts/mpv-webcam
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
# Pull up a low latency
|
||||
# mpv window with webcam
|
||||
|
||||
mpv --profile=low-latency --untimed --no-osc /dev/video0
|
7
scripts/mute
Executable file
7
scripts/mute
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
# Mute
|
||||
|
||||
amixer -q set Master toggle
|
||||
|
||||
# Restart statusbar module (dwm & dwmblocks)
|
||||
kill -44 "$(pidof dwmblocks)"
|
17
scripts/netstat
Executable file
17
scripts/netstat
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
# Modified version of Luke Smith's network usage script
|
||||
|
||||
# Print cache so it doesn't get stuck in dwmblocks
|
||||
cat "$XDG_CACHE_HOME"/netstat
|
||||
|
||||
# Store transferred and recieved bytes
|
||||
rstart="$(($(cat /sys/class/net/[ew]*/statistics/rx_bytes | paste -sd '+')))"
|
||||
tstart="$(($(cat /sys/class/net/[ew]*/statistics/tx_bytes | paste -sd '+')))"
|
||||
sleep 1
|
||||
rend="$(($(cat /sys/class/net/[ew]*/statistics/rx_bytes | paste -sd '+')))"
|
||||
tend="$(($(cat /sys/class/net/[ew]*/statistics/tx_bytes | paste -sd '+')))"
|
||||
|
||||
# Format correctly and print
|
||||
dow=$(printf "%2sB\n" "$(numfmt --to=iec $(($rend-$rstart)))" | sed 's/ //g')
|
||||
up=$(printf "%2sB\n" "$(numfmt --to=iec $(($tend-$tstart)))" | sed 's/ //g')
|
||||
printf "%2s" "$dow|$up" > "$XDG_CACHE_HOME"/netstat
|
14
scripts/netstat-dow
Executable file
14
scripts/netstat-dow
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
# Modified version of Luke Smith's network usage script
|
||||
|
||||
# Print cache so it doesn't get stuck in dwmblocks
|
||||
cat "$XDG_CACHE_HOME"/netstat-dow
|
||||
|
||||
# Store recieved bytes
|
||||
start="$(($(cat /sys/class/net/[ew]*/statistics/rx_bytes | paste -sd '+')))"
|
||||
sleep 1
|
||||
end="$(($(cat /sys/class/net/[ew]*/statistics/rx_bytes | paste -sd '+')))"
|
||||
|
||||
# Format correctly and print
|
||||
load=$(numfmt --to=iec $(($end-$start)))
|
||||
printf "%2sB/s\n" $load | sed 's/ //g' > "$XDG_CACHE_HOME"/netstat-dow
|
14
scripts/netstat-up
Executable file
14
scripts/netstat-up
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
# Modified version of Luke Smith's network usage script
|
||||
|
||||
# Print cache so it doesn't get stuck in dwmblocks
|
||||
cat "$XDG_CACHE_HOME"/netstat-up
|
||||
|
||||
# Store transferred bytes
|
||||
start="$(($(cat /sys/class/net/[ew]*/statistics/tx_bytes | paste -sd '+')))"
|
||||
sleep 1
|
||||
end="$(($(cat /sys/class/net/[ew]*/statistics/tx_bytes | paste -sd '+')))"
|
||||
|
||||
# Format correctly and print
|
||||
load=$(numfmt --to=iec $(($end-$start)))
|
||||
printf "%2sB/s\n" $load | sed 's/ //g' > "$XDG_CACHE_HOME"/netstat-up
|
6
scripts/note
Executable file
6
scripts/note
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
# Auto start (or edit) .md note in
|
||||
# ~/Documents/notes in a vim buffer
|
||||
# using current date in ISO format
|
||||
|
||||
cd ~/Documents/notes && $EDITOR $HOME/Documents/notes/note-$DATE.md
|
4
scripts/prtsc
Executable file
4
scripts/prtsc
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
# Command alias to reference easily
|
||||
|
||||
scrot -s '/home/tavo/Pictures/Screenshots/%Y-%m-%d.png' -e 'xclip -selection clipboard -t image/png -i $f'
|
52
scripts/record
Executable file
52
scripts/record
Executable file
|
@ -0,0 +1,52 @@
|
|||
#!/bin/sh
|
||||
# Uses 'ffmpeg' to record monitor, by default grabs monitor most to the left
|
||||
comm="ffmpeg"
|
||||
res=$(xrandr --current | grep -o "[0-9]*x[0-9]*+0+0" | cut -d "+" -f 1)
|
||||
|
||||
# Record microphone
|
||||
mic=$(pactl list short sources | cut -f 2 | grep input | dmenu -i -p "Mic:")
|
||||
[ -n "$mic" ] && recmic="-f pulse -ac 1 -i $mic" && audio="$recmic"
|
||||
|
||||
# Record system audio
|
||||
opt=$(printf "Yes\nNo" | dmenu -p "Desktop audio?")
|
||||
[ "$opt" = "Yes" ] && recsysaudio="-f pulse -ac 1 -i default.monitor" && audio="$recsysaudio"
|
||||
|
||||
# Record both
|
||||
[ \( -n "$recmic" \) -a \( -n "$recsysaudio" \) ] &&
|
||||
audio="\
|
||||
"$recmic" \
|
||||
"$recsysaudio" \
|
||||
-map 0 \
|
||||
-filter_complex "[1:a][2:a]amerge=inputs=2[a]" \
|
||||
-map "[a]" -ac 2 \
|
||||
"
|
||||
|
||||
# cuda encoding (faster, less cpu, smaller file)
|
||||
recscreen_nvenc() {
|
||||
comm="$comm \
|
||||
-hwaccel cuda -hwaccel_output_format cuda \
|
||||
-video_size $res -framerate 60 \
|
||||
-f x11grab -i $DISPLAY.0+0,0 \
|
||||
"$audio" \
|
||||
-c:v h264_nvenc \
|
||||
-b:v 16M \
|
||||
"
|
||||
}
|
||||
|
||||
# CPU encoding, this is the best config I found for 1080p
|
||||
recscreen() {
|
||||
comm="$comm \
|
||||
-video_size $res -framerate 60 \
|
||||
-f x11grab -i $DISPLAY.0+0,0 \
|
||||
"$audio" \
|
||||
-c:v libx264rgb \
|
||||
-crf 20 \
|
||||
-preset veryfast \
|
||||
"
|
||||
}
|
||||
|
||||
# Use cuda if available
|
||||
type nvidia-smi 2>/dev/null && recscreen_nvenc || recscreen
|
||||
|
||||
# Run in current dir and save with 2nd argument's name
|
||||
$comm "$1"
|
3
scripts/reset-pipewire-audio
Executable file
3
scripts/reset-pipewire-audio
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
# Restart pipewire
|
||||
systemctl --user restart pipewire
|
25
scripts/setxkbmap-next
Executable file
25
scripts/setxkbmap-next
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
# Switch between keyboard layouts
|
||||
|
||||
# Add whatever layouts you want
|
||||
set -- us latam
|
||||
|
||||
# Get current layout, and total
|
||||
current=$(setxkbmap -query | grep layout | cut -d " " -f 6)
|
||||
total=$(counter=0 ; for layout in "$@" ; do : $((counter+=1)) ; done ; echo "$counter")
|
||||
|
||||
index=1
|
||||
# For each layout, find whichever is currently
|
||||
# selected, and apply the next one
|
||||
for layout in "$@" ; do
|
||||
if [ "$layout" = "$current" ] ; then
|
||||
: $((index+=1))
|
||||
[ "$index" -gt "$total" ] && index=1
|
||||
setxkbmap $(eval "echo \${${index}}")
|
||||
break
|
||||
fi
|
||||
: $((index+=1))
|
||||
done
|
||||
|
||||
# Restart statusbar module (dwm & dwmblocks)
|
||||
kill -46 "$(pidof dwmblocks)"
|
6
scripts/stopwatch
Executable file
6
scripts/stopwatch
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
while true; do
|
||||
printf '%s\r' "$(date '+%I:%M:%S %p')" ;
|
||||
sleep 1 ;
|
||||
done
|
8
scripts/surf-wiki
Executable file
8
scripts/surf-wiki
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
# Lookup wikipedia url query
|
||||
# Requires surf & dmenu
|
||||
|
||||
query=$(dmenu -p "Search wikipedia:" < /dev/null | sed 's/\s/%20/g' | sed 's/#/%23/g')
|
||||
[ -z "$query" ] && exit
|
||||
|
||||
surf "wikipedia.org/w/index.php?search=$query"
|
25
scripts/sxiv-bkg
Executable file
25
scripts/sxiv-bkg
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
# Depends on sxiv, dmenu and hsetroot
|
||||
# Will display background chooser
|
||||
# and set it using hsetroot
|
||||
|
||||
img=$(find ~/Pictures/Backgrounds/* | shuf | sxiv -itoq | tail -1)
|
||||
|
||||
# Exit if none chosen
|
||||
[ -z "$img" ] && exit
|
||||
|
||||
# Find previous startup background command
|
||||
prev=$(grep hsetroot ~/.xinitrc)
|
||||
|
||||
# Define wether or not hsetroot should
|
||||
# set per monitor or treat multiple monitors as one
|
||||
option=$(printf "Set per monitor\nTreat multiple monitors as one" | dmenu -i -p "Layout:")
|
||||
case "$option" in
|
||||
"Set per monitor") new="hsetroot -cover $img" ;;
|
||||
"Treat multiple monitors as one") new="hsetroot -root -cover $img" ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
|
||||
# Set background and change
|
||||
# startup configuration with new one
|
||||
$new && sed -i "s|$prev|$new|g" ~/.xinitrc
|
4
scripts/tabbed-surf
Executable file
4
scripts/tabbed-surf
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
# Open 'surf' browser with tabbed
|
||||
|
||||
tabbed -c surf -e
|
13
scripts/translate
Executable file
13
scripts/translate
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
# Translate easily
|
||||
|
||||
if [ "$1" = "" ] && [ "$2" = "" ] || [ "$1" = "-h" ] ; then
|
||||
# If no text or/nor mode, and/or -h flag is given, print usage, then exit
|
||||
echo "Modes:\n$(apertium -l)\n\nUsage:\n translate '<text>' '<mode>'"
|
||||
elif [ -n "$1" ] && [ "$2" = "" ] ; then
|
||||
# If no mode is given, assume read stdin
|
||||
apertium "$1"
|
||||
elif [ -n "$1" ] && [ -n "$2" ] ; then
|
||||
# Else, just translate text using specified mode
|
||||
echo "$1" | apertium "$2"
|
||||
fi
|
8
scripts/updateremote
Executable file
8
scripts/updateremote
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
sitedir=$(pwd)
|
||||
cd $sitedir
|
||||
git pull
|
||||
rm -rf $sitedir/public
|
||||
hugo -D
|
||||
rsync -uvrP --delete-after $sitedir/public ceo@216.238.79.235:
|
94
scripts/upgrade
Executable file
94
scripts/upgrade
Executable file
|
@ -0,0 +1,94 @@
|
|||
#!/bin/sh
|
||||
# Upgrade script for
|
||||
# some GNU/Linux distros
|
||||
|
||||
# Clean previous logs
|
||||
rm -rf "$XDG_STATE_HOME"/upgrade_logs_*
|
||||
|
||||
# Get pkgmanager name
|
||||
[ -d "/var/lib/pacman" ] && pkgmanager="pacman"
|
||||
[ -d "/var/lib/dpkg" ] && pkgmanager="apt"
|
||||
[ -d "/var/db/xbps" ] && pkgmanager="xbps"
|
||||
|
||||
# Prompts
|
||||
printf "Update repository index? ($pkgmanager) [y/N]: "
|
||||
read -r ind # Repository index
|
||||
printf "Update packages? ($pkgmanager & flatpak) [y/N]: "
|
||||
read -r pkg # Packages
|
||||
printf "Update configs? (~/.config/) [y/N]: "
|
||||
read -r cfg # Configs
|
||||
printf "Update source-built? (~/.local/src/) [y/N]: "
|
||||
read -r src # Source built
|
||||
printf "Update password vault? [y/N]: "
|
||||
read -r pss # Passwords
|
||||
|
||||
# Functions for each pkgmanager (missing xbps)
|
||||
update() {
|
||||
case $pkgmanager in
|
||||
"pacman") yay -Sy && yay -Sy archlinux-keyring --needed --noconfirm >> "$XDG_STATE_HOME"/upgrade_logs_pkg ;;
|
||||
"apt") sudo apt-get update >> "$XDG_STATE_HOME"/upgrade_logs_pkg ;;
|
||||
"xbps") echo "TBD" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
upgrade() {
|
||||
case $pkgmanager in
|
||||
"pacman") yay -Syu --noconfirm ;;
|
||||
"apt") sudo apt-get upgrade -y ;;
|
||||
"xbps") echo "TBD" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Script steps
|
||||
index() {
|
||||
printf "\n\033[1m"Updating"\033[0m \033[1m"package"\033[0m \033[1m"index..."\033[0m\n"
|
||||
update
|
||||
}
|
||||
|
||||
packages() {
|
||||
printf "\n\033[1m"Upgrading"\033[0m \033[1m"packages..."\033[0m\n"
|
||||
upgrade
|
||||
flatpak update -y --noninteractive >> "$XDG_STATE_HOME"/upgrade_logs_pkg
|
||||
}
|
||||
|
||||
configs() {
|
||||
printf "\n\033[1m"Updating"\033[0m \033[1m"configs..."\033[0m\n"
|
||||
git -C ~/.config pull >> "$XDG_STATE_HOME"/upgrade_logs_git
|
||||
}
|
||||
|
||||
sources() {
|
||||
printf "\n\033[1m"Getting"\033[0m \033[1m"and"\033[0m \033[1m"building"\033[0m \033[1m"source..."\033[0m\n"
|
||||
for dir in ~/.local/src/* ; do
|
||||
git -C $dir pull >> "$XDG_STATE_HOME"/upgrade_logs_git
|
||||
if [ "$(diff $dir/config.h $dir/config.def.h)" != "" ] ; then
|
||||
printf "Found diffs in $dir/config.def.h, apply? [y/N]: "
|
||||
read -r diff
|
||||
[ "$diff" = "y" ] && rm -rf "$dir"/config.h
|
||||
fi
|
||||
sudo make clean install -C "$dir" >> "$XDG_STATE_HOME"/upgrade_logs_src
|
||||
done
|
||||
}
|
||||
|
||||
passwords() {
|
||||
printf "\n\033[1m"Getting"\033[0m \033[1m"passwords..."\033[0m\n"
|
||||
pass git pull >> "$XDG_STATE_HOME"/upgrade_logs_git
|
||||
}
|
||||
|
||||
# Error control
|
||||
[ "$ind" = "y" ] && index &&
|
||||
notify-send " Repositories" "Updated repository index" || notify-send " Repositories" "Couldn't complete"
|
||||
|
||||
[ "$pkg" = "y" ] && packages &&
|
||||
notify-send " Packages" "Updated package base" || notify-send " Packages" "Couldn't complete"
|
||||
|
||||
[ "$cfg" = "y" ] && configs &&
|
||||
notify-send " Configs" "Updated configs" || notify-send " Configs" "Coudn't complete"
|
||||
|
||||
[ "$src" = "y" ] && sources &&
|
||||
notify-send " Source" "Updated source builds" || notify-send " Source" "Coudn't complete"
|
||||
|
||||
[ "$pss" = "y" ] && passwords &&
|
||||
notify-send " Passwords" "Updated password vault" || notify-send " Passwords" "Coudn't complete"
|
||||
|
||||
printf "\n\033[1m"Done!"\033[0m\n"
|
||||
notify-send " Upgrade complete"
|
6
scripts/voldown
Executable file
6
scripts/voldown
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
# Reduces volume by 5%,
|
||||
# then restarts statusbar module
|
||||
|
||||
amixer set Master 5%- unmute
|
||||
kill -44 "$(pidof dwmblocks)"
|
15
scripts/volstat
Executable file
15
scripts/volstat
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
# Fetch current audio levels
|
||||
# (in current default output)
|
||||
|
||||
# Get volume levels
|
||||
vol=$(amixer | grep "Playback" | grep -o '[0-9]*[0-9]%' | head -n 1)
|
||||
|
||||
# If device is off (muted), notify mute, print volume otherwise
|
||||
if amixer scontents | grep "Playback" | grep -q "\[off\]"; then
|
||||
echo " M"
|
||||
notify-send -u low --replace-id=10 " Volume" "Mute"
|
||||
else
|
||||
echo "$vol"
|
||||
notify-send -u low --replace-id=10 " Volume" "$vol"
|
||||
fi
|
6
scripts/volup
Executable file
6
scripts/volup
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
# Increases volume by 5%,
|
||||
# then restarts statusbar module
|
||||
|
||||
amixer set Master 5%+ unmute
|
||||
kill -44 "$(pidof dwmblocks)"
|
14
scripts/yt-dlp-get-album
Executable file
14
scripts/yt-dlp-get-album
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
# Fetch YouTube playlists as music albums
|
||||
# with track numbering and mp3 encoding
|
||||
#
|
||||
# ** To change enconding,
|
||||
# modify $codec variable
|
||||
|
||||
# Show usage and exit if no URL is given
|
||||
[ -z "$1" ] && echo 'Usage: yt-dlp-get-album <"URL">' && exit
|
||||
|
||||
codec="mp3"
|
||||
URL="$1"
|
||||
|
||||
yt-dlp -x -o "%(playlist_index)s-%(title)s.%(ext)s" --audio-format $codec "$URL"
|
217
snippets/urlutf8
Normal file
217
snippets/urlutf8
Normal file
|
@ -0,0 +1,217 @@
|
|||
space %20
|
||||
! %21
|
||||
" %22
|
||||
# %23
|
||||
$ %24
|
||||
% %25
|
||||
& %26
|
||||
' %27
|
||||
( %28
|
||||
) %29
|
||||
* %2A
|
||||
+ %2B
|
||||
, %2C
|
||||
- %2D
|
||||
. %2E
|
||||
/ %2F
|
||||
0 %30
|
||||
1 %31
|
||||
2 %32
|
||||
3 %33
|
||||
4 %34
|
||||
5 %35
|
||||
6 %36
|
||||
7 %37
|
||||
8 %38
|
||||
9 %39
|
||||
: %3A
|
||||
; %3B
|
||||
< %3C
|
||||
= %3D
|
||||
> %3E
|
||||
? %3F
|
||||
@ %40
|
||||
A %41
|
||||
B %42
|
||||
C %43
|
||||
D %44
|
||||
E %45
|
||||
F %46
|
||||
G %47
|
||||
H %48
|
||||
I %49
|
||||
J %4A
|
||||
K %4B
|
||||
L %4C
|
||||
M %4D
|
||||
N %4E
|
||||
O %4F
|
||||
P %50
|
||||
Q %51
|
||||
R %52
|
||||
S %53
|
||||
T %54
|
||||
U %55
|
||||
V %56
|
||||
W %57
|
||||
X %58
|
||||
Y %59
|
||||
Z %5A
|
||||
[ %5B
|
||||
\ %5C
|
||||
] %5D
|
||||
^ %5E
|
||||
_ %5F
|
||||
` %60
|
||||
a %61
|
||||
b %62
|
||||
c %63
|
||||
d %64
|
||||
e %65
|
||||
f %66
|
||||
g %67
|
||||
h %68
|
||||
i %69
|
||||
j %6A
|
||||
k %6B
|
||||
l %6C
|
||||
m %6D
|
||||
n %6E
|
||||
o %6F
|
||||
p %70
|
||||
q %71
|
||||
r %72
|
||||
s %73
|
||||
t %74
|
||||
u %75
|
||||
v %76
|
||||
w %77
|
||||
x %78
|
||||
y %79
|
||||
z %7A
|
||||
{ %7B
|
||||
| %7C
|
||||
} %7D
|
||||
~ %7E
|
||||
€ %E2%82%AC
|
||||
‚ %E2%80%9A
|
||||
ƒ %C6%92
|
||||
„ %E2%80%9E
|
||||
… %E2%80%A6
|
||||
† %E2%80%A0
|
||||
‡ %E2%80%A1
|
||||
ˆ %CB%86
|
||||
‰ %E2%80%B0
|
||||
Š %C5%A0
|
||||
‹ %E2%80%B9
|
||||
Œ %C5%92
|
||||
Ž %C5%BD
|
||||
‘ %E2%80%98
|
||||
’ %E2%80%99
|
||||
“ %E2%80%9C
|
||||
” %E2%80%9D
|
||||
• %E2%80%A2
|
||||
– %E2%80%93
|
||||
— %E2%80%94
|
||||
˜ %CB%9C
|
||||
™ %E2%84
|
||||
š %C5%A1
|
||||
› %E2%80
|
||||
œ %C5%93
|
||||
ž %C5%BE
|
||||
Ÿ %C5%B8
|
||||
¡ %C2%A1
|
||||
¢ %C2%A2
|
||||
£ %C2%A3
|
||||
¤ %C2%A4
|
||||
¥ %C2%A5
|
||||
¦ %C2%A6
|
||||
§ %C2%A7
|
||||
¨ %C2%A8
|
||||
© %C2%A9
|
||||
ª %C2%AA
|
||||
« %C2%AB
|
||||
¬ %C2%AC
|
||||
%C2%AD
|
||||
® %C2%AE
|
||||
¯ %C2%AF
|
||||
° %C2%B0
|
||||
± %C2%B1
|
||||
² %C2%B2
|
||||
³ %C2%B3
|
||||
´ %C2%B4
|
||||
µ %C2%B5
|
||||
¶ %C2%B6
|
||||
· %C2%B7
|
||||
¸ %C2%B8
|
||||
¹ %C2%B9
|
||||
º %C2%BA
|
||||
» %C2%BB
|
||||
¼ %C2%BC
|
||||
½ %C2%BD
|
||||
¾ %C2%BE
|
||||
¿ %C2%BF
|
||||
À %C3%80
|
||||
Á %C3%81
|
||||
 %C3%82
|
||||
à %C3%83
|
||||
Ä %C3%84
|
||||
Å %C3%85
|
||||
Æ %C3%86
|
||||
Ç %C3%87
|
||||
È %C3%88
|
||||
É %C3%89
|
||||
Ê %C3%8A
|
||||
Ë %C3%8B
|
||||
Ì %C3%8C
|
||||
Í %C3%8D
|
||||
Î %C3%8E
|
||||
Ï %C3%8F
|
||||
Ð %C3%90
|
||||
Ñ %C3%91
|
||||
Ò %C3%92
|
||||
Ó %C3%93
|
||||
Ô %C3%94
|
||||
Õ %C3%95
|
||||
Ö %C3%96
|
||||
× %C3%97
|
||||
Ø %C3%98
|
||||
Ù %C3%99
|
||||
Ú %C3%9A
|
||||
Û %C3%9B
|
||||
Ü %C3%9C
|
||||
Ý %C3%9D
|
||||
Þ %C3%9E
|
||||
ß %C3%9F
|
||||
à %C3%A0
|
||||
á %C3%A1
|
||||
â %C3%A2
|
||||
ã %C3%A3
|
||||
ä %C3%A4
|
||||
å %C3%A5
|
||||
æ %C3%A6
|
||||
ç %C3%A7
|
||||
è %C3%A8
|
||||
é %C3%A9
|
||||
ê %C3%AA
|
||||
ë %C3%AB
|
||||
ì %C3%AC
|
||||
í %C3%AD
|
||||
î %C3%AE
|
||||
ï %C3%AF
|
||||
ð %C3%B0
|
||||
ñ %C3%B1
|
||||
ò %C3%B2
|
||||
ó %C3%B3
|
||||
ô %C3%B4
|
||||
õ %C3%B5
|
||||
ö %C3%B6
|
||||
÷ %C3%B7
|
||||
ø %C3%B8
|
||||
ù %C3%B9
|
||||
ú %C3%BA
|
||||
û %C3%BB
|
||||
ü %C3%BC
|
||||
ý %C3%BD
|
||||
þ %C3%BE
|
||||
ÿ %C3%BF
|
5
snippets/welcome
Normal file
5
snippets/welcome
Normal file
|
@ -0,0 +1,5 @@
|
|||
__ __ _ _
|
||||
\ \ / /__| | ___ ___ _ __ ___ ___| |
|
||||
\ \ /\ / / _ \ |/ __/ _ \| '_ ` _ \ / _ \ |
|
||||
\ V V / __/ | (_| (_) | | | | | | __/_|
|
||||
\_/\_/ \___|_|\___\___/|_| |_| |_|\___(_)
|
2
vim/.gitignore
vendored
Normal file
2
vim/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
.netrwhist
|
||||
viminfo
|
1
vim/after/plugin/terminalbg.vim
Normal file
1
vim/after/plugin/terminalbg.vim
Normal file
|
@ -0,0 +1 @@
|
|||
highlight Normal ctermbg=NONE
|
2812
vim/autoload/plug.vim
Normal file
2812
vim/autoload/plug.vim
Normal file
File diff suppressed because it is too large
Load diff
4
vim/backup/.gitignore
vendored
Normal file
4
vim/backup/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
4
vim/plugged/.gitignore
vendored
Normal file
4
vim/plugged/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
4
vim/spell/.gitignore
vendored
Normal file
4
vim/spell/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
4
vim/swap/.gitignore
vendored
Normal file
4
vim/swap/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
4
vim/undo/.gitignore
vendored
Normal file
4
vim/undo/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
35
vim/view/~=+.config=+groff=+bibliography=
Normal file
35
vim/view/~=+.config=+groff=+bibliography=
Normal file
|
@ -0,0 +1,35 @@
|
|||
let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1
|
||||
argglobal
|
||||
setlocal fdm=manual
|
||||
setlocal fde=0
|
||||
setlocal fmr={{{,}}}
|
||||
setlocal fdi=#
|
||||
setlocal fdl=0
|
||||
setlocal fml=1
|
||||
setlocal fdn=20
|
||||
setlocal fen
|
||||
silent! normal! zE
|
||||
1,18fold
|
||||
25,52fold
|
||||
59,80fold
|
||||
87,88fold
|
||||
95,128fold
|
||||
135,136fold
|
||||
143,178fold
|
||||
185,186fold
|
||||
193,194fold
|
||||
201,232fold
|
||||
239,240fold
|
||||
247,255fold
|
||||
let &fdl = &fdl
|
||||
let s:l = 1 - ((0 * winheight(0) + 27) / 55)
|
||||
if s:l < 1 | let s:l = 1 | endif
|
||||
keepjumps exe s:l
|
||||
normal! zt
|
||||
keepjumps 1
|
||||
normal! 0
|
||||
let &g:so = s:so_save | let &g:siso = s:siso_save
|
||||
set hlsearch
|
||||
nohlsearch
|
||||
doautoall SessionLoadPost
|
||||
" vim: set ft=vim :
|
87
vim/vimrc
Normal file
87
vim/vimrc
Normal file
|
@ -0,0 +1,87 @@
|
|||
" tavo custom vimrc file
|
||||
set clipboard=unnamedplus
|
||||
set shellcmdflag=-ic
|
||||
set encoding=utf-8
|
||||
set relativenumber
|
||||
set shiftwidth=4
|
||||
set cursorline
|
||||
set ignorecase
|
||||
set smartcase
|
||||
set expandtab
|
||||
set tabstop=4
|
||||
set wildmenu
|
||||
set hlsearch
|
||||
set swapfile
|
||||
set undofile
|
||||
set mouse=a
|
||||
set showcmd
|
||||
set number
|
||||
|
||||
" notes
|
||||
autocmd BufWritePost note-*.md execute '! git -C ~/Documents/notes/ add ~/Documents/notes/% ; git commit -m "Auto-commit: saved %"'
|
||||
" groff
|
||||
autocmd FileType groff noremap <buffer> <C-s> :w<CR> :!groff-compiler % > %:r.pdf<CR><CR>
|
||||
autocmd FileType groff noremap <buffer> <F9> :w<CR> :!groff-compiler % > %:r.pdf<CR><CR> :![ "$(pidof -x 'zathura')" = "" ] && zathura --fork %:r.pdf<CR> && disown
|
||||
au BufNewFile,BufRead *.ms set filetype=groff
|
||||
" LaTeX
|
||||
autocmd FileType tex noremap <buffer> <C-c> :w<CR> :!latex %<CR> :!pdflatex %<CR>
|
||||
autocmd FileType bib noremap <buffer> <C-c> :w<CR> :!bibtex %<CR>
|
||||
" Python
|
||||
autocmd FileType python noremap <buffer> <F9> :w<CR> :!python %<CR>
|
||||
" NERDTree
|
||||
nnoremap <C-t> :NERDTreeToggle<CR>
|
||||
" Global keybindings
|
||||
noremap <F5> :setlocal spell! spelllang=en<CR>
|
||||
noremap <F6> :setlocal spell! spelllang=es<CR>
|
||||
noremap exec !!$SHELL<CR>
|
||||
noremap <C-n> /@@@<CR>
|
||||
noremap <tab> :bn<CR>
|
||||
noremap <C-c> :bd<CR>
|
||||
noremap <C-s> :w<CR>
|
||||
noremap <Space> za
|
||||
|
||||
" Enabling .config
|
||||
let rtp=&runtimepath
|
||||
set runtimepath=~/.config/vim
|
||||
let &runtimepath.=','.rtp.',~/.config/vim/after'
|
||||
set directory=~/.config/vim/swap//,.,~/tmp,/var/tmp,/tmp
|
||||
set backupdir=~/.config/vim/backup//,.,~/tmp,~/
|
||||
set spellfile=~/.config/vim/spell/en.utf-8.add
|
||||
set viminfo+=n~/.config/vim/viminfo
|
||||
set viewdir=~/.config/vim/view/
|
||||
set undodir=~/.config/vim/undo//,.
|
||||
|
||||
" Plugins
|
||||
if empty(glob('~/.config/vim/autoload/plug.vim'))
|
||||
silent !curl -fLo ~/.config/vim/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
autocmd VimEnter * PlugInstall --sync | source '~/.config/vim/vimrc'
|
||||
endif
|
||||
|
||||
call plug#begin()
|
||||
Plug 'https://github.com/vim-airline/vim-airline-themes'
|
||||
Plug 'https://github.com/vim-airline/vim-airline'
|
||||
Plug 'https://github.com/preservim/nerdtree'
|
||||
Plug 'https://github.com/morhetz/gruvbox'
|
||||
Plug 'junegunn/goyo.vim'
|
||||
call plug#end()
|
||||
|
||||
" Theme
|
||||
let g:gruvbox_contrast_hard=1
|
||||
let g:gruvbox_italic=1
|
||||
set background=dark
|
||||
colorscheme gruvbox
|
||||
|
||||
" Airline
|
||||
let g:airline#extensions#tabline#buffer_min_count = 2
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
set ttimeout ttimeoutlen=0
|
||||
set laststatus=2
|
||||
set noshowmode
|
||||
|
||||
" Goyo
|
||||
map gy :Goyo<CR>
|
||||
autocmd! User GoyoLeave highlight Normal ctermbg=NONE
|
||||
|
||||
autocmd BufWinLeave bibliography zM | mkview
|
||||
autocmd BufWinEnter bibliography silent loadview
|
35
zathura/zathurarc
Normal file
35
zathura/zathurarc
Normal file
|
@ -0,0 +1,35 @@
|
|||
set guioptions none
|
||||
|
||||
set recolor
|
||||
set recolor-keephue
|
||||
|
||||
set default-fg "#ebdbb2"
|
||||
set default-bg "#121212"
|
||||
|
||||
set statusbar-fg "#121212"
|
||||
set statusbar-bg "#ebdbb2"
|
||||
|
||||
set inputbar-fg "#121212"
|
||||
set inputbar-bg "#ebdbb8"
|
||||
|
||||
set notification-fg "#121212"
|
||||
set notification-bg "#ebdbb8"
|
||||
|
||||
set notification-error-fg "#121212"
|
||||
set notification-error-bg "#ab4642"
|
||||
|
||||
set notification-warning-bg "#121212"
|
||||
set notification-warning-fg "#ab4642"
|
||||
|
||||
set highlight-color "#ebdbb2"
|
||||
set highlight-active-color "#ebdbb2"
|
||||
set highlight-fg \#ebdbb2
|
||||
|
||||
set completion-bg "#ebdbb2"
|
||||
set completion-fg "#121212"
|
||||
|
||||
set completion-highlight-fg "#121212"
|
||||
set completion-highlight-bg "#ebdbb2"
|
||||
|
||||
set recolor-lightcolor "#121212"
|
||||
set recolor-darkcolor "#ffffff"
|
Loading…
Reference in a new issue