This commit is contained in:
2024-01-08 20:50:29 +01:00
commit 2fb62acda6
121 changed files with 16413 additions and 0 deletions
+176
View File
@@ -0,0 +1,176 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
* ---
*
* @Modification Dominik Kressler
* @package rofi-archer
* @version 1.0.0
**/
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
@import "../colors.rasi"
@import "../fonts.rasi"
/*
USE_BUTTONS=YES
*/
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 800px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 10px;
border-color: @selected;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 15px;
margin: 0px;
padding: 30px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
children: [ "inputbar", "listview" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 15px;
margin: 0px;
padding: 0px;
border: 0px;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
children: [ "textbox-prompt-colon", "prompt"];
}
dummy {
background-color: transparent;
}
textbox-prompt-colon {
enabled: true;
expand: false;
str: "";
padding: 12px 20px 12px 16px;
border-radius: 100%;
background-color: @urgent;
text-color: @background;
}
prompt {
enabled: true;
padding: 12px;
border-radius: 100%;
background-color: @active;
text-color: @background;
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 12px;
border: 0px solid;
border-radius: 100%;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
font-weight: bold;
}
textbox {
background-color: inherit;
text-color: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
placeholder-color: @foreground;
blink: true;
markup: true;
}
error-message {
padding: 12px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: @background;
text-color: @foreground;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 5;
lines: 1;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 15px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
cursor: "default";
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 0px;
margin: 0px;
padding: 40px 10px;
border: 0px solid;
border-radius: 100%;
border-color: @selected;
background-color: @selected;
text-color: var(background-alt);
cursor: pointer;
}
element-text {
font: "JetBrainsMono Nerd Font bold 32";
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
element selected.normal {
background-color: var(background-alt);
text-color: @foreground;
}
+224
View File
@@ -0,0 +1,224 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
**/
/*****----- Configuration -----*****/
configuration {
modi: "";
show-icons: false;
}
/*****----- Global Properties -----*****/
@import "../config.rasi"
@import "../colors.rasi"
* {
border-colour: var(border);
handle-colour: var(selected);
background-colour: var(background);
foreground-colour: var(foreground);
alternate-background: var(background-alt);
normal-background: var(background);
normal-foreground: var(foreground);
urgent-background: var(urgent);
urgent-foreground: var(background);
active-background: var(active);
active-foreground: var(background);
selected-normal-background: var(selected);
selected-normal-foreground: var(background);
selected-urgent-background: var(active);
selected-urgent-foreground: var(background);
selected-active-background: var(urgent);
selected-active-foreground: var(background);
alternate-normal-background: var(background);
alternate-normal-foreground: var(foreground);
alternate-urgent-background: var(urgent);
alternate-urgent-foreground: var(background);
alternate-active-background: var(active);
alternate-active-foreground: var(background);
}
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 600px;
x-offset: 0px;
y-offset: 0px;
border-radius: 10px;
/* properties for all widgets */
enabled: true;
cursor: "default";
background-color: @background-colour;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-colour;
background-color: transparent;
children: [ "message", "listview", "inputbar" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: false;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 6;
lines: 8;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: false;
fixed-columns: false;
spacing: 5px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
cursor: "default";
align: center;
}
scrollbar {
handle-width: 5px;
handle-color: @handle-colour;
border-radius: 10px;
background-color: transparent;
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
cursor: pointer;
}
element normal.normal {
background-color: transparent;
text-color: var(normal-foreground);
}
element normal.urgent {
background-color: var(normal-background);
text-color: var(normal-foreground);
}
element normal.active {
background-color: var(normal-foreground);
text-color: var(normal-background);
}
element selected.normal {
background-color: var(selected-normal-background);
text-color: var(normal-foreground);
}
element selected.urgent {
background-color: var(selected-normal-background);
text-color: var(normal-background);
}
element selected.active {
background-color: var(selected-normal-background);
text-color: var(normal-foreground);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 24px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Mode Switcher -----*****/
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
}
button {
padding: 7px 15px 7px 10px;
border: 0px solid;
border-radius: 100%;
border-color: @border-colour;
background-color: @alternate-background;
text-color: inherit;
cursor: pointer;
}
button selected {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
}
textbox {
padding: 8px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: @alternate-background;
text-color: @foreground-colour;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground-colour;
blink: true;
markup: true;
}
error-message {
padding: 10px;
border: 2px solid;
border-radius: 10px;
border-color: @border-colour;
background-color: @background-colour;
text-color: @foreground-colour;
}
+122
View File
@@ -0,0 +1,122 @@
#!/usr/bin/env bash
## Author : Aditya Shakya (adi1090x)
## Github : @adi1090x
#
## Applets : Volume
theme="~/.config/rofi/volume/volume.rasi"
# Volume Info
mixer="`amixer info Master | grep 'Mixer name' | cut -d':' -f2 | tr -d \',' '`"
speaker="`amixer get Master | tail -n1 | awk -F ' ' '{print $5}' | tr -d '[]'`"
mic="`amixer get Capture | tail -n1 | awk -F ' ' '{print $5}' | tr -d '[]'`"
active=""
urgent=""
# Speaker Info
amixer get Master | grep '\[on\]' &>/dev/null
if [[ "$?" == 0 ]]; then
active="-a 1"
stext='Mute Speaker'
sicon='󰓃'
else
urgent="-u 1"
stext='Unmute Speaker'
sicon='󰓄'
fi
# Microphone Info
amixer get Capture | grep '\[on\]' &>/dev/null
if [[ "$?" == 0 ]]; then
[ -n "$active" ] && active+=",3" || active="-a 3"
mtext='Mute Mic'
micon=''
else
[ -n "$urgent" ] && urgent+=",3" || urgent="-u 3"
mtext='Unmute Mic'
micon=''
fi
currentsink=$(ponymix defaults|awk '/^sink/ {s=$1" "$2;getline;gsub(/^ +/,"",$0);print s" "$0}' | cut -d':' -f2)
currentsource=$(ponymix defaults|awk '/^source/ {s=$1" "$2;getline;gsub(/^ +/,"",$0);print s" "$0}' | cut -d':' -f2)
# Theme Elements
prompt="Speaker: $sicon Mic: $micon "
mesg="$mixer Speaker: $speaker Mic: $mic"
list_col='6'
list_row='3'
win_width='670px'
# Options
option_1="$micon $mtext $currentsource"
option_2="$sicon $stext $currentsink"
option_3="󱡫 Sink Switcher"
option_4=""
option_5=" Mixer"
option_6="󰍯 Noise Torch"
# Rofi CMD
#-theme-str "listview {columns: $list_col; lines: $list_row;}" \
rofi_cmd() {
rofi -theme-str "window {width: $win_width;}" \
-theme-str 'textbox-prompt-colon {str: "";}' \
-dmenu \
-p "$prompt" \
-mesg "$mesg" \
${active} ${urgent} \
-markup-rows \
-theme ${theme}
}
# Pass variables to rofi dmenu
run_rofi() {
echo -e "$option_1\n$option_2\n$option_3\n$option_4\n$option_5\n$option_6" | rofi_cmd
}
# Execute Command
run_cmd() {
if [[ "$1" == '--opt3' ]]; then
#amixer -Mq set Master,0 5%+ unmute
$HOME/.config/rofi/audio/rofi-sink-switcher.sh
elif [[ "$1" == '--opt2' ]]; then
amixer set Master toggle
elif [[ "$1" == '--opt4' ]]; then
amixer -Mq set Master,0 5%- unmute
elif [[ "$1" == '--opt1' ]]; then
amixer set Capture toggle
elif [[ "$1" == '--opt5' ]]; then
pavucontrol
elif [[ "$1" == '--opt6' ]]; then
noisetorch
fi
}
# Actions
chosen="$(run_rofi)"
case ${chosen} in
$option_1)
run_cmd --opt1
;;
$option_2)
run_cmd --opt2
;;
$option_3)
run_cmd --opt3
;;
$option_4)
run_cmd --opt4
;;
$option_5)
run_cmd --opt5
;;
$option_6)
run_cmd --opt6
;;
esac