1809 Commits

Author SHA1 Message Date
Emre AKYÜZ
036072b1cc
Merge 56304e551d578a28dcc3df57c5cd88e5e15f2417 into 7a96fb100cf385e05c211937b509d2bf166299e6 2023-12-30 10:47:12 -07: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
Emre AKYÜZ
56304e551d
Improve comments. 2023-11-19 19:17:29 +03:00
Emre AKYÜZ
2a5cf35142
Add some comments and an example URL 2023-11-19 18:51:54 +03:00
Emre AKYÜZ
36add3ec99
Rename bookmark_manager.sh to browser_bookmarks.sh 2023-11-19 15:30:07 +03:00
Emre AKYÜZ
b71e0738ee
Update bookmark_manager.sh 2023-11-19 15:23:32 +03:00
Emre AKYÜZ
c9ad701e63
Do not open random entries if not on the query 2023-11-19 01:10:01 +03:00
Emre AKYÜZ
f51d7451cb
Make the name more intuitive. 2023-11-18 22:58:16 +03:00
Emre AKYÜZ
083da4d28c
Update chadmarked 2023-11-18 22:54:40 +03:00
Luciano
0795202675
lf-scope: adds SVG preview creating cache. (#1360) 2023-11-15 01:37:39 +00:00
appeasementPolitik
bbcbac64fa
Fix unsupported characters in vim-airline (#1317) 2023-11-15 01:35:53 +00:00
thirtysix
52fab9d50a
Make shell profile POSIX, remove unnecessary variable fallbacks (#1368) 2023-11-15 01:35:14 +00:00
thirtysix
0db54f9618
Fix pdf and plain text previws in lf (#1369)
* Fix pdf and plain text previws in lf

Pdf previws don't appear because are generated with wrong filename.
Plain text previws with `bat` don't respect terminal theme and have
annoying border.

* Revert pdf cache filename to work properly
2023-11-15 01:34:29 +00:00
Emre AKYÜZ
50e72a1a03
An unnecessary(?), small improvement for lf mkdir command (#1372)
The new method is more robust and better handles directory names with spaces and special characters.

It's more minimal.
2023-11-13 13:30:08 +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
Luke Smith
0cc589bcad
Merge branch 'master' of github.com:LukeSmithxyz/voidrice 2023-10-28 08:41:43 -04:00
Luke Smith
6ba48b2733
fix #1366 2023-10-28 08:41:26 -04:00
Lalle
1e3adf9c03
Launch dwm in a dbus session (#1340)
* Launch dwm in a dbus session

* Add ssh-agent

* Update dbus env

* Update xprofile
2023-10-27 19:42:32 +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
Emre AKYÜZ
bca6b403eb
Unpack Function for LF Without Aunpack (#1334)
We can simply eliminate the usage of an external tool by adding a simple case statement to handle different types of compressed files.
2023-10-27 18:54:15 +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
Emre AKYÜZ
4854a853e4
simplify | improve | change jq to sed 2023-10-17 11:32:19 +03:00
appeasementPolitik
708d6c6731
Change remaining tremc entry in script to stig (#1364) 2023-10-04 20:01:05 +00:00
Emre AKYÜZ
d3035edc7e
Simplify Further | Remove if statements
1- Used logical operators instead of if statements.
2- Improved indentations and blocks for better readibility.
3- Simplified in general.
2023-09-09 16:28:31 +03: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
Alessio Artoni
798ba175d0
Fix wrong font name (#1353) 2023-08-25 07:53:59 +00:00
Luke Smith
a360fadd5f
Merge branch 'master' of github.com:LukeSmithxyz/voidrice 2023-08-23 12:28:53 +02:00
Luke Smith
8315e4c885
libertinus replaces libertine 2023-08-23 12:28:42 +02: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
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