596 Commits

Author SHA1 Message Date
Daja177
5f385da9f6
Fix rssget shebang (#1457) 2025-03-09 11:07:46 +00:00
Nicholas Gorden
1e750084e5
New: create sb-ticker (#1436)
* weath: Add option to get forecast from a different location (#1327)

* weath: Add option to get forecast from a different location

* Remove retry and make max time lower because it is interactive

* Give weath 'cp' option to copy forecast as plain text for sharing

* Make weath a separate script

* shortcuts: export env vars for each shortcut (#1395)

useful if want to use shortcuts w/ different progs instead of
their default behavior (cd / $EDITOR), e.g.:

```sh
cd ~/Downloads
mv foo.mp3 $music
```

Co-authored-by: Luke Smith <luke@lukesmith.xyz>

* Update mpd to use PipeWire (#1412)

per https://wiki.archlinux.org/title/Music_Player_Daemon#Audio_configuration

* New: create sb-ticker

---------

Co-authored-by: appeasementPolitik <108810900+appeasementPolitik@users.noreply.github.com>
Co-authored-by: Kipras Melnikovas <kipras@kipras.org>
Co-authored-by: Luke Smith <luke@lukesmith.xyz>
Co-authored-by: fennomaani <160141733+fennomaani@users.noreply.github.com>
2025-03-05 14:01:04 +00:00
Oleksandr Miliukhin
51baf2e6b3
rssget - search the website for RSS feeds and add them to newsboat url list using rssadd. Also gets links to feeds on some sites that don't provide those links. (#1430) 2025-03-05 10:21:41 +00:00
Emre AKYÜZ
59632a5668
Even More Improvements for Getbib (Including Prior) (#1314)
* Even More Improvements for Getbib (Including Prior)

I have used and benefited from the "getbib" script and the instructions on LaTeX from Luke for a long time. So, I have put a lot of thought into this script, since I am very interested in academia. Hope you all like this.

Justifications for Improvements

This script stands out as a highly valuable (at least in my opinion) and efficient tool for managing and fetching BibTeX entries for DOIs found in PDF files or provided directly. The robust design and comprehensive functionality make it an indispensable asset for researchers. The main reasons for its superiority are as follows:
- Exceptional time-saving: By automating the process of extracting DOIs and fetching BibTeX entries, the script drastically reduces the manual effort involved in managing citations, thereby saving users an incredible amount of time and energy.
- Outstanding versatility: The script's ability to handle various input types, including directories containing PDF files, single PDF files, and DOIs, sets it apart from other solutions. This adaptability allows users to process numerous scenarios with ease, making it the go-to tool for all their citation needs.
- Unparalleled consistency: The script ensures that DOIs are uniformly processed and normalized, improving the consistency of the entries in the BibTeX file. This feature is crucial for maintaining a clean and professional bibliography that adheres to high academic standards. It inserts an empty line between entries inside the BIB_FILE, as well as, making the author name lower case. It also removes any special characters and the first 2 numbers of the year from the first line. So it is easier to read, maintain and easier to use inside a LaTeX document. Normalizing also helps to check for duplicate entries. It prevents some weird entries escaping from getting caught as a duplicate.
- Remarkable duplicate prevention: The script's built-in functionality to check for duplicate entries before appending them to the BibTeX file demonstrates a keen attention to detail. This feature ensures that the bibliography remains free of redundancies, streamlining the citation management process.
- The use of functions and modular design in the script makes the code highly readable, maintainable, and extendable. This strong foundation allows for seamless adaptation to future changes and requirements.
- Provides users with an exceptional level of automation, versatility, and reliability.
- You can provide the DOI address even in very wrong forms and get a correct output. You can even feed it a website URL such as: https://doi.org/10.1038/s41594-023-00968-y and all of the DOI handling is done by a single "sed" command.
- Robust notification system to learn more about the errors or other types of feedback.
- The "curl" output is in red in order to separate the output and the notification better and to improve readability.

Details
BIB_FILE: The path to the BibTeX file where entries will be saved.
CORRECTION_METHOD: A very powerful sed command to extract and correct the DOI from the input even in harsher cases.
get_doi_from_pdf function: Extracts a DOI from the provided PDF file using pdfinfo and pdftotext commands.
If pdfinfo doesn't find a DOI, it uses pdftotext to extract it from the first page of the PDF.
normalize_doi function: Normalizes the DOI by converting it to lowercase.
process_doi function: Fetches the BibTeX entry for the given DOI using the Crossref with a curl command.
Prints the output of the curl command in red using ANSI escape codes.
Checks if the fetched BibTeX entry is valid and not empty.
If the fetched BibTeX entry is not in the BIB_FILE, it appends the entry to the file.
The script processes input arguments, which can be a directory, a PDF file, or a DOI:
    a) If it's a directory, the script processes all PDF files in the directory.
    b) If it's a PDF file, the script processes the single PDF file.
    c) If it's a DOI, the script processes the DOI directly.

More details on the correction method (sed command), from my prior pull request
Very Detailed Explanation (I realized that escaped backslashes do not appear. There is a backslash if you see nothing.)
(For people who wonder about it, or try to learn. It could take a tremendous amount of time to learn all of it without explanation, so it would be better to explain):

sed The sed command is a stream editor that can be used to perform basic text transformations on an input file or from a pipeline. You can see Luke uses it a lot in his videos. It can also modify files' content if you want for other purposes. That function is used a lot for bootstrapping scripts for changing config files automatically if necessary.

-n This option tells sed not to print lines by default. We'll only print lines when we specify the p command in the script.

-E This option enables the use of extended regular expressions, which allows for more readable and flexible regex patterns.

's/ This starts the sed script and defines the s command (substitute). It is used to find a regex pattern in the input and replace it with a specified string.

.* This regex pattern matches any character (except a newline) zero or more times. In this case, it matches all characters before "doi" or "DOI".

( This paranthesis opens a capturing group, which allows us to refer back to the matched text later in the script.

(DOI|doi) This regex pattern matches either "DOI" or "doi". The | symbol is used as an OR operator in regular expressions.

( This next paranthesis opens another capturing group.

(.(org))? This regex pattern matches an optional ".org". The . is an escaped period, and (org) matches the string "org". The ? following the group makes it optional. Escaping is needed for most of non-alphanumeric characters. You can test and practice them on vim, trying to use the "substitute" function to change some text.

/? This regex pattern matches an optional "/", with the ? making it optional. The prior backslash is for escaping. Again, some characters need to be escaped to be able to used in commands. Escaped means they have ** before them. Spaces may be the most escaped characters.

| This symbol, later, also acts as an OR operator, indicating that the pattern before or after it can be matched.

**:? *** This regex pattern matches an optional colon (":") followed by zero or more spaces. The ? makes the colon optional, and ***** matches zero or more spaces.

) This closes the capturing group started earlier.

) This closes the outer capturing group.

([^: ]+[^ .]) This regex pattern matches any character except colons and spaces one or more times ([^: ]+) Plus symbol here shows one or more times. If it is a star then it means zero or more times. It is then followed by a single alphanumeric character ([^ .]) Single because there are no plus or star symbol next to it. This part as a whole ensures that the last character of the matched text is alphanumeric.

.* This regex pattern matches any character (except a newline) zero or more times. In this case, it matches all remaining characters in the input line.

/ This delimiter separates the regex pattern from the replacement string in the s command. s command needs a separator that is a forward slash.

doi:\6 This is the replacement string. The text "doi:" is followed by the 6th captured group from the regex pattern, which contains the characters after "doi" or "DOI" and the colon, "/", or space(s).

/p This delimiter separates the replacement string from the p command, which tells sed to print the modified line if a substitution has been made. The substitution mentioned here is the change of ".org/" to ":". This helps turning URLs into doi addresses.

; This separates different commands within the sed script.

T This command branches to the end of the script if no substitution was made since the last input line was read or conditional branch was taken. In this case, it ensures that the q command is only executed if a matching line has been found and a substitution was made. This is one of the most important parts to get the doi address from the urls such as "https://doi.org/10.1038/s41594-023-00968-5". Because we don't always have URLs for doi addresses. In this way, this function only works when we work with URLs. So in this case it helps changing .org/ with : This makes the part of the doi address as this: "doi:" rather than this: "doi.org/".

q This command tells sed to quit processing after the first match, ensuring that only the first matching line in the file is processed. Otherwise, we would get all doi addresses in a scientific study because there are lots of doi addresses in them.

' This closes the other '

TL;DR:
Basically this whole command ensures that the output we get starts with "doi:", then it can have every type of character in it except spaces and ".org/" , then it will end with an alphanumeric character [A-Z, a-z or 0-9]. That ensures removing the trailing dots from some doi addresses that have them.

* Update getbib

* Use DASH | Remove IFs | Minimize

* minor corrections & improvements

* Improve && Minimize

* Make the duplicate matching case insensitive

* Formatting change.

* Reformat | Add custom .bib
2025-03-02 15:54:50 +00:00
Luke Smith
7d26250657
delete texclear 2025-03-02 16:52:56 +01:00
Luke Smith
2ca3f80dd3
Merge branch 'feat/latexmk' of github.com:aartoni/dotfiles into aartoni-feat/latexmk 2025-03-02 16:51:52 +01:00
thetubster99
15071db7fa
Remove non-working sat24 doppler provider, and add the Netherlands (#1397) 2025-03-02 15:47:31 +00:00
xsmh
e7c02d9726
Enhance locking mechanism (#1446)
This is a (subjectively) preferable behavior for locking the system.

- Pause all media players and mute audio when the system is locked. Unmute after unlocking.

Co-authored-by: Shahram <80352285+ShahramMohammed@users.noreply.github.com>
2025-02-28 15:05:56 +00:00
Luke Bubar
e83e5ecef0
Update compiler to include instruction for the Rink calculator (#1452)
* Update compiler to include instruction for the Rink calculator

Added a compiler option for rink calculator files. Rink is a unit-conversion calculator written in Rust.

* Update compiler to include COBOL instructions
2025-02-28 14:56:00 +00:00
xsmh
407e9d8a84
Group multi-process program usage (#1444)
Programs like Chrome run multiple processes that take up the entire notification window. This commit solves this issue by grouping and aggregating CPU and memory usage for multi-process programs into single entries.
2025-02-28 14:29:29 +00:00
Alessio Artoni
21c0122597
Removes the arkenfox-auto-update script (#1442) 2025-02-28 14:11:42 +00:00
aartoni
f1c7405012 latexmk 2024-11-09 14:49:13 +07:00
appeasementPolitik
c43f390f07
Fix sb-price after bash -> dash change (#1426) 2024-10-22 18:47:41 +00:00
Luke Smith
628ed4dc99
Merge branch 'master' of github.com:LukeSmithxyz/voidrice 2024-07-15 13:46:42 -04:00
Luke Smith
a9cde940c2
close #1292 2024-07-15 13:46:30 -04:00
Kipras Melnikovas
131dcce268
shortcuts: export env vars for each shortcut (#1395)
useful if want to use shortcuts w/ different progs instead of
their default behavior (cd / $EDITOR), e.g.:

```sh
cd ~/Downloads
mv foo.mp3 $music
```

Co-authored-by: Luke Smith <luke@lukesmith.xyz>
2024-07-15 17:37:04 +00:00
appeasementPolitik
368d3583a6
weath: Add option to get forecast from a different location (#1327)
* weath: Add option to get forecast from a different location

* Remove retry and make max time lower because it is interactive

* Give weath 'cp' option to copy forecast as plain text for sharing

* Make weath a separate script
2024-07-15 17:28:50 +00:00
Luke Smith
cf38cd5ba8
Merge branch 'master' of github.com:LukeSmithxyz/voidrice 2024-07-15 13:20:34 -04:00
Luke Smith
c771c66b18
filename and exec fix 2024-07-15 13:20:18 -04:00
Luke Smith
d56ca0c95b
Merge branch 'patch-1' of https://github.com/ArgusGuardian/voidrice into ArgusGuardian-patch-1 2024-07-15 13:18:44 -04:00
Emre AKYÜZ
22141ca754
[texclear] - minimize | streamline (#1390) 2024-07-15 17:18:02 +00:00
zetef
e8ba78c518
Fix sb-volume (toggle mute, scroll volume change) (#1411)
the current wpctl version does not support @DEFAULT_AUDIO_SINK@, but works with @DEFAULT_SINK@

quick fix
2024-07-15 17:14:25 +00:00
Luke Smith
dda032a37d
close #1416 2024-07-15 13:12:36 -04:00
Luke Smith
e1bfc20f96
Merge branch 'tiny-fixes' of https://github.com/thetubster99/cookedrice into thetubster99-tiny-fixes 2024-07-15 13:04:42 -04:00
Luke Smith
6556ef5c4d
close #1423 2024-07-15 13:02:59 -04:00
venatio
475e4abb40
(lf,maimpick) added preview for .xcf files, fixed OCR selection in dmenu script (#1420) 2024-06-02 20:40:47 +00:00
thetubster99
7a9bfe6f69
Tiny fix and optimization 2024-05-23 22:23:16 +00:00
Zmole Cristian
c95a16916d
Add OCR to maimpick (#1415)
Sometimes you just need to grab some text from a video
2024-05-23 17:25:19 +00:00
Stepan Chernov
97f2fa3872
Update sb-clock to fix display issue (#1380)
Co-authored-by: Stepan Chernov <me@chernov.land>
2024-05-11 12:56:27 +00:00
Tri Asep Tumbara
db8ee0df79
Fix the problem when taking a screenshot of the lf window (#1398)
Without -B option, the result of the screenshot is a blank picture.
2024-05-11 12:55:29 +00:00
David Nevado
97687287bd
fix: grep pattern to avoid unintended matches (#1383)
added `^` and `$` to the pattern used in `grep -v`
in order to avoid matching displays whose name
contains some other display name. e.g ("DPI", "eDPI")
2024-05-11 12:54:21 +00:00
Alessio Artoni
dd6eb37469
Remove unused vim configs and shortcuts (#1385)
Remove: ranger shortcuts, "nocompatible", plain Vim support for
NERDTreeBookmarksFile and vimling configuration.
2024-05-11 12:42:22 +00:00
Emre AKYÜZ
f1915e71e5
[compiler] - streamline | simplify | minimize (#1389)
* [compiler] - streamline | simplify | minimize

* Update compiler
2024-05-11 12:41:19 +00:00
Emre AKYÜZ
92f9fc458c
[getcomproot] - fix | minimize | posix compliance (#1388) 2024-05-11 12:39:43 +00:00
Alaa Eddine
534348e0b6 ditch brightnessctl, more minimalistic 2024-05-05 18:37:51 +01:00
Alaa Eddine
3fb60852de
Create sb-bghitness, show brightness in the bar.
script to add brightness to the dwmblocks.
2024-05-03 12:23:53 +01:00
Jameson
7a96fb100c
script fixes (#1386)
* fix typo in lfub

* use setsid when editing scripts

* fix immediate exit on middle click

---------

Co-authored-by: 2084x <2084x@noreply.codeberg.org>
2023-12-30 17:04:51 +00:00
Dominik
031938a792
Update dmenurecord (#1370) 2023-11-04 12:33:18 +00:00
Joey-Pepperoni
ea3e1e14cc
Update sb-music (#1367)
The s/\\&/&amp;/g operation only effect is to add "amp;" after any ampersand in the artist or song name. "&" displays just fine anyways, so there's no reason to include an operation to replace it.
2023-10-29 12:21:47 +00:00
appeasementPolitik
ca8cb1f6a7
Update sb-mailbox in statusbar on closing neomutt (#1329) 2023-10-27 18:58:40 +00:00
poeplva
54c0aa2af8
none of the encrypted devices are listed if no drives are decrypted already (#1338)
The part
```
for open in $decrypted; do
		[ "$uuid" = "$open" ] && break 1
done
```
exits with `0` if the variable `$decrypted` is empty, causing none of the encrypted devices to be put into the `$unopenedluks` variable. This commit fixes this problem.
2023-10-27 18:58:05 +00:00
Dawid Potocki
42f3efb4b0
Add xdg-terminal-exec script to launch "$TERMINAL" for .desktop files (#1302) 2023-10-27 18:52:44 +00:00
appeasementPolitik
708d6c6731
Change remaining tremc entry in script to stig (#1364) 2023-10-04 20:01:05 +00:00
sban
b8cd0ab495
Timeout added to forecast module, ncmpcpp now tracks player state (#1359)
* Added timeout to getforecast to prevent status bar breakage.

A 2 second timeout is used in the case that wttr.in is inaccessible when dwm is started; as otherwise it tries to curl wttr.in indefinitely, not allowing other status bar modules to be loaded.

* Update music status bar module on player state change
2023-09-05 07:51:05 +00:00
Hylke Hellinga
c550a7c6e5
Fixed Booksplit for termux (#1358)
Co-authored-by: Simbaclaws <h.hellinga@inner-join.nl>
2023-09-03 07:20:13 +00:00
appeasementPolitik
86f05abcce
Fix the extra space between sb-internet and the block on the right of sb-internet (#1352) 2023-08-25 07:56:50 +00:00
appeasementPolitik
f26e5678e6
Fix arkenfox pacman hook complaining about root (#1351)
The previous pull request on LARBS turned out not to work, so make sure `arkenfox-auto-update` runs `arkenfox-update` as the user of the firefox profile. Otherwise it complains that it's running as root and stops.

The way of getting the username is safe, because it gets the username from the owner of the user.js file of that profile.
2023-08-18 12:20:05 +00:00
Simon Nikolai Varøy
ed9633da3f
added webp to image formats in linkhandler (#1347)
Co-authored-by: Simon Nikolai Varøy <simon@simonvaroy.xyz>
2023-08-16 14:39:40 +00:00
appeasementPolitik
ec8e82745e
sb-internet: replace grep/sed commands for more efficiency (#1349) 2023-08-16 14:38:10 +00:00
appeasementPolitik
44cb5f12e6
Give setbg parameter to make notifications silent (#1350) 2023-08-16 13:55:59 +00:00