1825 Commits

Author SHA1 Message Date
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
poeplva
d8a8970715
djvu files cannot be previewed (#1335)
added support for previewing books in djvu format.
2023-07-23 23:06:04 +00:00
Lalle
0497dcd51c
Add jsonl to lf (#1345) 2023-07-23 23:02:33 +00:00
Gunnar K. Halvorsen
6f6b749d0e
Fixed formatting bug with notify-send (#1344)
* Fixed formatting bug with notify-send

* Update sb-clock

Fix suggested by 'mhdna'
2023-07-23 23:02:14 +00:00
Luke Smith
9a85d328cc
nsxiv replaces unmaintained sxiv 2023-07-15 18:57:12 +02:00
Luke Smith
07de33840d
Revert "application/octet-stream is for arbitrary binary files (#1321)" (#1336)
This reverts commit af2710799b069486d04ba23c5bdab9cf6c4d6b04.
2023-05-27 01:46:54 +00:00
appeasementPolitik
08639706a9
Make sure sb-volume module is updated when closed after opening (#1316) 2023-05-26 22:11:06 +00:00
poeplva
af2710799b
application/octet-stream is for arbitrary binary files (#1321)
application/octet-stream mime-type is used for arbitrary binary files, so the best guess at opening those kind of should be based on the extension. before this all of this kind of files were tried to be opened with zathura, now it is the last resort in case the file extension is unknown.
2023-05-26 22:10:29 +00:00
Mahdi Nayef
1633233c9d
bulkrename using built-ins instead of using a completely separate program (#1330)
* bulkrename using bult-ins instead of using a completely separate program

* Make it more efficient
2023-05-26 22:08:43 +00:00
Spenser Truex
ce1f0bfa05
Re-add whitespace to some buffer types as needed. (#1333)
Very arcane.

C ANSI standard requires a newline at the end. GCC will complain.

Email signatures should have a space after the -- according to the
standard. Neomutt does this automatically for you if you have a
signature.

Co-authored-by: Spenser Truex <truex@equwal.com>
2023-05-25 03:40:55 +00:00
Mahdi Nayef
0a29cfbf4f
Fix rename key bindings in lf (#1331) 2023-05-24 13:28:56 +00:00
appeasementPolitik
991b052a55
Don't wrap horizontally on short terminal (#1325) 2023-05-11 14:00:08 +00:00
pony-montana
b2833f8a67
change requested by lf-git after update. (#1319) 2023-05-02 19:49:56 +00:00
Austen
e1302c897e
dwmblocks update on song change (#1318) 2023-05-01 16:15:11 +00:00
Emre AKYÜZ
943220f884
Extremely Improved Bookmarks (Search + Strip URL + More)
The inspiration: (Luke Smith's Video): "Bookmarking for Unix Chads"
Instructions & Justifications & Very Detailed Explanation for Everything can be found below.

Short Summary
- Allows users to manage and navigate bookmarks using dmenu. 
- The user can perform actions such as adding, deleting, and editing bookmarks. The script also handles searching within specific websites if the bookmarked URL has the word "search" in it. Such as the SearxNG Instance: "paulgo.io/search?q=".
- One more interesting feature of it is that it modifies the order of bookmarks by their popularity (how frequently visited by you). 
- It can work with Dash and it has no bashisms.

Execution Time: Instant
Required Programs: dash (or bash) | jq | echo | grep | dmenu | notification daemon | browser | xclip (or "wl-paste" on Wayland)

Instructions:
These directories should exist: ~/.local/share/larbs/ 
1. pacman -s jq (it's a very small program (I.E. 690kb)
2. Open a browser and highlight (xclip -o users) or copy (Wayland users) a website's URL (starting with "http") such as "https://github.com" 
2. Run the script with a shortcut you created for the window manager that is used.
3. Write "@@" inside the terminal then enter (@@ can be changed of course). This opens the "Action Menu".
4. Select "Add a New Bookmark" option then enter.
5. The bookmark will be added inside the bookmarks menu. It can be edited or deleted later from the action menu that can be opened with "@@".
6. If a website that has the word "search" in it is added inside bookmarks such as a SearxNG instance "paulgo.io/search?q=" , its search function can be used. When selected, it will offer for a new prompt for the desired keywords.

Justification:

1. The script uses jq for parsing and modifying JSON data, which is a lightweight and powerful command-line JSON processor. This choice allows for easy manipulation of the JSON file that stores bookmarks.

2. The use of the while loop with the dmenu interface ensures that the user can perform multiple actions (adding, deleting, or editing bookmarks) in a single session without needing to restart the script.

3. The script checks for an existing URLQUERY_FILE and initializes it with an empty JSON array "[]" if it doesn't exist or is empty. This ensures that the file is always in a valid state for the script to operate.

4. The script sorts bookmarks by popularity, allowing users to quickly access their most frequently visited bookmarks. This is achieved by incrementing a popularity value each time a bookmark is opened.

5. The script supports searching within specific websites by checking if the word "search" is in the URL (More words can be added). This feature provides a convenient way to search within bookmarked websites directly from the script.

6. The use of the dash shell (#!/bin/sh) as the interpreter provides a lightweight and fast shell environment for the script, improving performance. Since the script is efficient enough so this performance difference is not huge, so it can also be used with bash.

Detailed Explanation

1. URLQUERY_FILE="~/.local/share/larbs/urlquery": Sets the path for the JSON file that will store the bookmarks.

2. The following block checks if the URLQUERY_FILE exists and if it's empty. If either condition is met, it initializes the file with an empty JSON array "[]". If there is no JSON array present, then no bookmark can be added.

`if [ ! -f "$URLQUERY_FILE" ] || [ ! -s "$URLQUERY_FILE" ]; then
  echo "[]" > "$URLQUERY_FILE"
fi`

3. ACTION_MENU='@@': Sets a special string for the action menu.

4. The read_bookmarks function reads the contents of the URLQUERY_FILE using jq. The write_bookmarks function writes the contents passed as an argument to a temporary file and then moves it to the URLQUERY_FILE. The update_bookmark_popularity function updates the popularity value of a bookmark, given its name.

5. The contains_search function checks if a given string contains the word "search". It returns 0 if it does, 1 otherwise.

6. bookmarks=$(read_bookmarks): Reads the bookmarks from the file and stores them in a variable.

7. touch "$URLQUERY_FILE": Ensures the URLQUERY_FILE exists by creating it if it doesn't.

8. The following while loop presents a menu to the user for choosing an action (Add, Delete, or Edit bookmark) or a bookmark to open. It continues until the user selects a bookmark to open or provides an empty input.

`while true; do
  SELECTION=$(echo "$bookmarks" | jq -r '. | sort_by(.[2]) | reverse | .[] | .[0]' | rofi -dmenu -p "Bookmark")

  if [ -z "$SELECTION" ] || [ "$SELECTION" != "$ACTION_MENU" ]; then
    write_bookmarks "$bookmarks"
    break
  fi

  ACTION=$(echo "Add a New Bookmark\nDelete a Bookmark\nEdit a Bookmark" | rofi -dmenu -p "Action")
  #...
done`

9. The case block inside the while loop performs the selected action (Add, Delete, or Edit) based on the user's input.

10. After the loop, the script checks if a valid bookmark is selected. If so, it updates the popularity value, writes the changes to the file, and opens the bookmark in Firefox or any browser. If the bookmark contains the word "search", it prompts the user for a search query before opening the URL in Firefox.

11. Creating and moving temporary files are for data integrity and safety. It ensures 0 file corruptions. Has no negative effect in terms of performance.
2023-04-24 12:43:35 +03:00
Luke Smith
77fd62b9f3
Merge branch 'master' of github.com:LukeSmithxyz/voidrice 2023-04-20 09:21:17 -04:00
Luke Smith
65378ab944
sb-price improvements 2023-04-20 08:48:34 -04:00
Luke Smith
b719590427
use built-ins, close #1297 2023-04-20 08:47:39 -04:00
anggatd
c08949ebd2
Change LibreOffice binaries to libreoffice (#1294)
In the current update, the libreoffice package doesn't have any binary for libreoffice writer, calc, impress, draw, etc. So it's better to open all of the document using the 'libreoffice' binary as it can work in the old version of libreoffice as well as the new one.
2023-04-20 12:32:31 +00:00
snailed
d4ff2ebaf3
fix shellcheck (#1301)
Shellcheck wines when printf doesn't get an argument
2023-04-12 12:11:29 +00:00
Mathieu Rollet
5c92a1770f
Set GOMODCACHE to comply with XDG (#1299)
If GOMODCACHE is not set, it defaults to $GOPATH/pkg/mod
cf. https://go.dev/ref/mod#environment-variables
2023-04-12 12:10:42 +00:00
RealAestan
a94ee62680
dmenuunicode: don't use variables in the printf format string (#1284)
It works but the good practice is to use `printf "..%s.." "$foo"`
see https://www.shellcheck.net/wiki/SC2059
2023-04-03 14:07:54 +00:00
Luke Smith
5a6c56d565
efficiency and fail tweaks 2023-03-31 09:44:59 -04:00
Luke Smith
749f74f84e
Merge branch 'LalleSX-patch-1' 2023-03-24 17:49:43 -04:00
Luke Smith
07b0fbcce2
fix name 2023-03-24 17:49:38 -04:00
Lalle
a558356ecf
Added Larbs commits RSS 2023-03-24 21:10:26 +01:00
Luke Smith
4537bce2c2
check scripts to avoid rerunning remapd 2023-03-23 22:06:10 -04:00
Luke Smith
0e2cd987dc
Merge branch 'master' of github.com:LukeSmithxyz/voidrice 2023-03-20 09:50:29 -04:00
Luke Smith
fd964d54b6
customizable wttr/rate urls, sb-price improvements 2023-03-20 09:50:18 -04:00
Axel
b394c5f772
Added video.desktop file. (#1288)
Updated mimeapps.list to include mp4 files.
Closes #1271
2023-03-20 12:11:07 +00:00
Luke Smith
37930fdf57
use stig over tremc by default 2023-03-01 13:38:22 -05:00
HelionSmoker
2062e8110c
SQLite ~/ cleanup (#1283) 2023-02-23 12:33:45 +00:00
appeasementPolitik
2e5226545b
maimpick: hide cursor when selecting area (#1282)
Normally when making a screenshot of an area there's still a bit of the cursor that can be seen, this hides it.
2023-02-22 22:21:55 +00:00
Luke Smith
6c92dfa4eb
Merge branch 'iStagnant-master' 2023-02-21 10:27:29 -05:00
Luke Smith
d292d927f1
use android name in fsname 2023-02-21 10:27:08 -05:00
iStagnant
89f8506d85 Made mounter not show already mounted android devices in the mounting prompt 2023-02-20 23:16:20 +02:00
Jameson
27c00576c2
update tutorialvids (#1276)
remove duplicate status bar and align
2023-02-20 12:01:52 +00:00
Luke Smith
762eadd9d1
fix #1275 2023-02-17 12:12:10 -05:00
Luke Smith
ad6ecdb3fc
Merge branch 'master' of github.com:LukeSmithxyz/voidrice 2023-02-17 11:01:19 -05:00
Luke Smith
b04d4c9ac8
mounter improvements, old scripts removed
now checks fstab for info, also one less android prompt
2023-02-17 11:01:07 -05:00
sudo-Tiz
8dce96b986
add dwmblock tutorial video to tutorialvids script (#1274) 2023-02-17 15:32:44 +00:00
Luke Smith
a2e767e4f4
other aliases 2023-02-17 10:18:01 -05:00
Luke Smith
185ac25e52
mount drives with user's ownership 2023-02-17 10:17:35 -05:00
Stagnant
335c1bc8af
Fixed android device not mounting to root owned directories (#1273) 2023-02-17 14:31:44 +00:00
Luke Smith
12167f3dda
fix #1268, use sudo -A, var rename 2023-02-13 08:12:40 -05:00
Luke Smith
537464795b
Merge branch 'HelionSmoker-master' 2023-02-12 09:00:31 -05:00
Luke Smith
de4b34cd32
read file only once 2023-02-12 09:00:23 -05:00
HelionSmoker
d8f386d512
Switch to kebab-case for file name 2023-02-12 13:33:34 +02:00
HelionSmoker
fe198c960f
Rewrite sb-forecast 2023-02-12 12:24:10 +02:00