Update to Latest

This commit is contained in:
Ayush Dumasia 2025-02-23 00:38:43 +05:30
parent d1bbbcbb15
commit 71d6a8ab3b
157 changed files with 3467 additions and 5151 deletions

0
rofi/bluetooth/bluetooth.sh Executable file → Normal file
View file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,127 @@
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
* {
font: "JetBrains Mono Nerd Font 12";
background: #11111b;
background-alt: #313244;
foreground: #eff1f5;
selected: #cba6f7;
active: #6E77FF;
urgent: #8E3596;
}
/*****----- Main Window -----*****/
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 500px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
border-radius: 8px;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 0px;
background-color: transparent;
orientation: vertical;
children: [ "inputbar", "listview" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 0px;
padding: 28px 24px 0px 24px;
background-color: transparent;
text-color: @foreground;
orientation: horizontal;
children: [ "textbox-prompt-colon", "dummy", "entry" ];
}
dummy {
background-color: transparent;
}
entry {
enabled: true;
expand: false;
width: 250px;
padding: 12px 16px 8px 16px;
border-radius: 8px;
background-color: @background-alt;
text-color: inherit;
cursor: text;
placeholder: "Search";
placeholder-color: inherit;
}
textbox-prompt-colon {
font: "Font Awesome 5 Free 14";
enabled: true;
expand: false;
str: "";
padding: 11px 14px 11px 14px;
border-radius: 100%;
background-color: #a6e3a1;
text-color: @background;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 1;
lines: 5;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 0px;
margin: 32px 24px;
border-radius: 8px;
background-color: #1e1e2e;
text-color: @foreground;
cursor: "default";
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 0px;
padding: 12px 8px;
border-radius: 8px;
background-color: transparent;
text-color: @foreground;
cursor: pointer;
}
element.selected {
background-color: @selected;
text-color: @background;
}
element-icon {
size: 0px;
}
element-text {
padding: 0px 16px;
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0;
}

View file

@ -0,0 +1,104 @@
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
* {
font: "JetBrainsMono Nerd Font Mono Bold 12";
background: #11111b;
selected: #cba6f7;
active: #716251;
urgent: #934A1C;
}
/*
USE_BUTTONS=YES
*/
/*****----- Main Window -----*****/
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 350px;
x-offset: 0px;
y-offset: 0px;
padding: 0px;
border: 0px solid;
border-radius: 8px;
border-color: @selected;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 0px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
children: [ "message", "listview" ];
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 2;
lines: 1;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 16px;
padding: 32px;
margin: 0px;
background-color: transparent;
cursor: "default";
}
/*****----- Elements -----*****/
element {
enabled: true;
padding: 17px;
border-radius: 16px;
background-color: #585b70;
text-color: #eff1f5;
cursor: pointer;
}
element-text {
font: "Font Awesome 5 Free Bold 24";
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
element selected.normal {
background-color: #8839ef;
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px 25px;
padding: 10px 20px;
border-radius: 0% 0% 100% 100%;
background-color: #f5c2e7;
}
textbox {
background-color: transparent;
text-color: #313244;
vertical-align: 0.5;
horizontal-align: 0.5;
}

View file

@ -1,11 +1,30 @@
#!/usr/bin/env bash
## Directory and theme setup
dir="$HOME/.config/rofi/clipboard/"
theme='style'
if [[ -z $(wl-paste) ]]; then
dunstify -h string:x-dunst-stack-tag:clip_notif -t 4000 -u critical "Clipboard Manager" "Clipboard is empty"
exit
fi
echo ${dir}
dir="$HOME/.config/rofi/clipboard"
## Clipboard Search with Rofi and custom theme
cliphist list | awk '{$1=""; print $0}' | rofi -dmenu -i -p "Search" -theme ${dir}/${theme}.rasi | wl-copy
choice=$(echo -e "\t\uf1f8 Wipe Clipboard\n$(cliphist list)" | rofi -markup-rows -dmenu -display-columns 2 -theme ${dir}/clipboard.rasi)
if [[ $choice == *"Wipe Clipboard"* ]]; then
yes=''
no=''
confirmation=$(echo -e "<span foreground='#a6e3a1'>$yes</span>\n<span foreground='#f38ba8'>$no</span>" | \
rofi -markup-rows -dmenu -p 'Confirmation' -mesg 'Are you Sure?' -theme ${dir}/confirmation.rasi)
if [[ $confirmation =~ "$yes" ]]; then
cliphist wipe
wl-copy -c
dunstify -h string:x-dunst-stack-tag:clip_notif -t 4000 -u critical "Clipboard Manager" "Clipboard has been wiped"
fi
exit
elif [[ -n $choice ]]; then
cliphist decode "$choice" | wl-copy
wtype -M ctrl -M shift -P v -s 500 -p v -m shift -m ctrl
else
exit
fi

Binary file not shown.

View file

@ -60,9 +60,8 @@ listbox {
inputbar {
enabled: true;
spacing: 8px;
padding: 32px 32px 80px 32px;
padding: 32px 32px 0px 32px;
background-color: transparent;
background-image: url("~/Downloads/wallpaper/Window.png",width);
text-color: @foreground;
orientation: horizontal;
children: [ "textbox-prompt-colon", "entry", "dummy", "mode-switcher" ];
@ -86,7 +85,7 @@ entry {
text-color: inherit;
cursor: text;
placeholder: "Search";
placeholder-color: inherit;
placeholder-color: inherit;
}
dummy {
expand: true;
@ -125,7 +124,7 @@ listview {
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 8px;
margin: 32px 24px;
border-radius: 8px;

Binary file not shown.

View file

@ -9,11 +9,11 @@ uptime="`uptime -p | sed -e 's/up //g' | sed -e 's/hour/hr/g' | sed -e 's/minute
# Options
hibernate=''
shutdown=''
reboot=''
lock=''
shutdown=''
reboot=''
lock=''
suspend=''
logout=''
logout=''
yes=''
no=''

75
rofi/search/search.sh Normal file
View file

@ -0,0 +1,75 @@
#!/usr/bin/env bash
# Define the directory where Rofi themes are stored
dir="$HOME/.config/rofi/search/"
theme='style'
# Prompt user for search input using Rofi dmenu mode
SEARCH_STRING=$(rofi -dmenu -p "Search" -theme "${dir}/${theme}.rasi")
# Check if search string is empty, if so, exit
if [[ -z "$SEARCH_STRING" ]]; then
exit 1
fi
# Check if the input is a command to change directories
if [[ "$SEARCH_STRING" == cd* ]]; then
# Extract the directory path
DIR_PATH=$(echo "$SEARCH_STRING" | awk '{print $2}')
# If no path is specified, default to the home directory
if [[ -z "$DIR_PATH" ]]; then
DIR_PATH="$HOME"
fi
# Open Kitty and navigate to the specified directory
kitty --directory="$DIR_PATH" &
exit
fi
# Extract the first word as ENGINE and the rest as QUERY
ENGINE=$(echo "$SEARCH_STRING" | awk '{print $1}')
QUERY=$(echo "$SEARCH_STRING" | awk '{$1=""; print $0}' | sed 's/^ *//g')
# Handle search engine cases
case "$ENGINE" in
yt)
# If the engine is 'yt' and no query, go to YouTube homepage
if [[ -z "$QUERY" ]]; then
xdg-open "https://www.youtube.com"
else
# Search YouTube for the query
ENCODED_QUERY=$(echo "$QUERY" | sed 's/ /+/g')
xdg-open "https://www.youtube.com/results?search_query=$ENCODED_QUERY"
fi
exit
;;
arch)
# Search Arch Wiki
ENCODED_QUERY=$(echo "$QUERY" | sed 's/ /+/g')
xdg-open "https://wiki.archlinux.org/index.php?search=$ENCODED_QUERY"
exit
;;
hypr)
# Search Hyprland documentation or relevant page
ENCODED_QUERY=$(echo "$QUERY" | sed 's/ /+/g')
xdg-open "https://wiki.hyprland.org/Getting-Started/$ENCODED_QUERY"
exit
;;
man)
# If the engine is 'man', open the manual page for the command in Kitty
MAN_COMMAND=$(echo "$QUERY" | sed 's/^ *//g') # Trim leading whitespace
if [[ -z "$MAN_COMMAND" ]]; then
echo "No command specified for man. Please provide a command."
exit 1
else
kitty -e man "$MAN_COMMAND" & # Open the man page in Kitty
exit
fi
;;
*)
# If no known engine, search Google for the whole input
ENCODED_QUERY=$(echo "$SEARCH_STRING" | sed 's/ /+/g')
xdg-open "https://www.google.com/search?q=$ENCODED_QUERY"
;;
esac

80
rofi/search/style.rasi Normal file
View file

@ -0,0 +1,80 @@
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
* {
font: "JetBrains Mono Nerd Font 12";
background: #11111b;
background-alt: #313244;
foreground: #eff1f5;
selected: #cba6f7;
active: #6E77FF;
urgent: #8E3596;
}
/*****----- Main Window -----*****/
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 400px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
border-radius: 8px;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 0px;
background-color: transparent;
orientation: vertical;
children: [ "inputbar" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 0px;
padding: 28px 24px 24px 24px;
background-color: transparent;
text-color: @foreground;
orientation: horizontal;
children: [ "textbox-prompt-colon", "dummy", "entry" ];
}
dummy {
background-color: transparent;
}
entry {
enabled: true;
expand: false;
width: 280px;
padding: 12px 16px 8px 16px;
border-radius: 8px;
background-color: @background-alt;
text-color: inherit;
cursor: text;
placeholder: "Search";
placeholder-color: inherit;
}
// icon
textbox-prompt-colon {
enabled: true;
expand: false;
str: "";
padding: 12px 24px 12px 14px;
border-radius: 100%;
background-color: #a6e3a1;
text-color: @background;
}

Binary file not shown.

4
rofi/wifi/wifi.sh Executable file → Normal file
View file

@ -1,5 +1,7 @@
#!/usr/bin/env bash
notify-send -t 3000 -i info " 󰤨 Checking For Wifi"
# Check if wifi is on
check_wifi_on=$( nmcli --field WIFI g | sed 1d | sed 's/ //g' )
@ -81,3 +83,5 @@ elif [[ $choice != "" ]] ; then
take_password
nmcli device wifi connect "$choice" password "$password"
fi

Binary file not shown.

19
rofi/xclip/xclipboard.sh Normal file
View file

@ -0,0 +1,19 @@
#!/bin/bash
# Get the clipboard history from xclip
CLIPBOARD_HISTORY=~/clipboard_history.txt
# Save current clipboard content to a file
xclip -o -selection clipboard >> "$CLIPBOARD_HISTORY"
# Remove duplicate entries and keep the last few
awk '!seen[$0]++' "$CLIPBOARD_HISTORY" > "${CLIPBOARD_HISTORY}.tmp" && mv "${CLIPBOARD_HISTORY}.tmp" "$CLIPBOARD_HISTORY"
# Use rofi to select from clipboard history
SELECTED=$(cat "$CLIPBOARD_HISTORY" | rofi -dmenu -p "Clipboard:")
# Copy selected text back to clipboard
if [ -n "$SELECTED" ]; then
echo -n "$SELECTED" | xclip -selection clipboard
fi