Clean up rofi config

This commit is contained in:
2025-03-20 13:20:46 +01:00
parent 62c7a61dd2
commit 906498cf67
188 changed files with 129 additions and 13234 deletions

View File

@@ -0,0 +1,107 @@
## rofi: *spotlight*
A spotlight-like rofi. Supports file and web search.
<p align='center'>
<img alt='rofi: spotlight' src='scrot.webp'/>
<br/>
<i>
rofi: spotlight
</i>
</p>
#### Dependencies
+ `rofi-git master branch`
+ `python3`
+ `bash`
+ `fd (optional)`
+ `an icon theme (optional)`
#### Icon themes used:
+ Papirus
+ Tela Blue
#### Run it by:
```bash
$ rofi -modi "Global Search":"rofi-spotlight/rofi-spotlight.sh" -show "Global Search" \
-config rofi-spotlight/rofi.rasi
```
#### Recommendation
+ Install `fd` for faster file searching. Defaults to `find` if not installed.
#### Configuration:
You can change the following variables in the `rofi-spotlight.sh`
+ Terminal Emulator
+ File Manager
+ Bluetooth sender
You can change the following variables in the `web-search.py`
+ Search engine
+ Web browser
+ Terminal Emulator
#### Available commands:
Just type them on rofi search bar:
+ **`:help`** to print the help message
+ **`:h`** or **`:hidden`** to show hidden files/directories
+ **`:xdg XDGDIR`** to jump to an xdg directory
Examples:
```
:xdg DOCUMENTS
:xdg DOWNLOADS
# Also supports incomplete path. Examples:
:xdg doc # Same as :xdg DOCUMENTS
:xdg down # Same as :xdg DOWNLOADS
# For more info about XDG dirs, see:
# man xdg-user-dir
```
**File search syntaxes:**
+ **`!<search_query>`** to search for a file and web suggestions
+ **`?<search_query>`** to search parent directories
Examples:
```
!half-life 3
?portal 3
```
**Web search syntaxes:**
+ **`!<search_query>`** to get a search suggestions
+ **`:web <search_query>`** to also to gets search suggestions
+ **`:webbro <search_query>`** to search directly from your browser
Examples:
```
!how to install archlinux
:web how to install gentoo
:webbro how to install wine in windowsxp
```
#### TODOs:
- [x] Web search support
- [x] Cleaner bash script
#### Notes:
+ This is not a file manager nor a web browser. This is a file/web-searching rofi. Nothing else.
+ Default rofi design is better with blur. Rofi's appearance can be change in `rofi.rasi`. It uses CSS syntax. More info by executing `man rofi-theme` in your terminal emulator.
#### Credits to [these people](https://github.com/manilarome/rofi-spotlight/graphs/contributors)

3
general/configs/rofi/spotlight/history.txt Executable file → Normal file
View File

@@ -1,3 +0,0 @@
!te
A Rofi with file and web searching functionality
!test

0
general/configs/rofi/spotlight/icons/ddg.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

0
general/configs/rofi/spotlight/icons/google.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

0
general/configs/rofi/spotlight/icons/history.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

0
general/configs/rofi/spotlight/icons/result.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -9,9 +9,9 @@ MY_PATH="$(realpath "$0" | xargs dirname)"
HIST_FILE="${MY_PATH}/history.txt"
OPENER=xdg-open
TERM_EMU=terminator
TERM_EMU=kitty
TEXT_EDITOR=$EDITOR
FILE_MANAGER=xdg-open
FILE_MANAGER=y
BLUETOOTH_SEND=blueman-sendto
CUR_DIR=$PWD

31
general/configs/rofi/spotlight/rofi.rasi Executable file → Normal file
View File

@@ -12,22 +12,23 @@ configuration {
}
* {
background: rgba(5, 0, 52, 1);
foreground: #FFFFFFFF;
transparent: #00000000;
foreground: #F2F2F2EE;
background-selected: #F2F2F245;
background-active: #F2F2F230;
background-white: rgba(0, 0, 0, 1);
background-black: rgba(0, 0, 0, 1);
urgent: rgba(5, 0, 52, 1);
background-white: #F2F2F211;
background-black: #00000066;
urgent: #E91E6366;
urgent-selected: #E91E6377;
}
window {
background-color: @background;
transparency: "real";
background-color: @transparent;
location: center;
anchor: center;
x-offset: 0px;
height: 50%;
height: 500px;
width: 750px;
orientation: vertical;
border-radius: 12px;
@@ -39,19 +40,18 @@ prompt {
button {
action: "ok";
str: "🔎 ";
str: " ";
font: "FantasqueSansMono Nerd Font 11";
expand: false;
text-color: @foreground;
background-color: @background;
background-color: @transparent;
vertical-align: 0.7;
horizontal-align: 0.5;
border-radius: 15px;
}
entry {
font: "Inter Regular 11";
background-color: @background;
background-color: @transparent;
text-color: @foreground;
expand: true;
vertical-align: 0.5;
@@ -62,7 +62,7 @@ entry {
}
case-indicator {
background-color: @background;
background-color: @transparent;
text-color: @foreground;
vertical-align: 0.5;
horizontal-align: 0.5;
@@ -72,7 +72,7 @@ entry-wrapper {
orientation: horizontal;
vertical-align: 0.5;
spacing: 4px;
background-color: @background;
background-color: @transparent;
children: [ button, entry, case-indicator ];
}
@@ -88,7 +88,7 @@ inputbar {
}
listview {
background-color: @background;
background-color: @transparent;
columns: 2;
spacing: 5px;
cycle: false;
@@ -104,7 +104,7 @@ mainbox {
}
element {
background-color: @background;
background-color: @transparent;
text-color: @foreground;
orientation: horizontal;
border-radius: 6px;
@@ -125,7 +125,6 @@ element-text {
element normal.urgent,
element alternate.urgent {
str: "t";
background-color: @urgent;
text-color: @foreground;
border-radius: 9px;

View File

@@ -39,15 +39,14 @@ import html
##### C O N F I G U R A T I O N ######
################################################################################
SEARCH_ENGINE = 'duckduckgo' # or 'duckduckgo'
BROWSER = 'librewolf' # or 'firefox', 'chromium', 'brave', 'lynx'
TERMINAL = ['terminator', '--'] # or ['st', '-e'] or something like that
BROWSER = 'firefox' # or 'firefox', 'chromium', 'brave', 'lynx'
TERMINAL = ['kitty', '--'] # or ['st', '-e'] or something like that
################################################################################
CONFIG = {
'BROWSER_PATH' : {
'chrome' : ['google-chrome-stable'],
'firefox' : ['firefox'],
'librewolf' : ['librewolf'],
'chromium' : ['chromium-browser'],
'brave' : ['brave-browser'],
'lynx' : TERMINAL + ['lynx']
@@ -55,7 +54,6 @@ CONFIG = {
'USER_AGENT' : {
'chrome' : 'Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36',
'firefox' : 'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0',
'librewolf' : 'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0',
'chromium' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/76.0.3809.100 Chrome/76.0.3809.100 Safari/537.36',
'brave' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36',
'lynx' : 'Lynx/2.8.9rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/1.1.1d'