updated
This commit is contained in:
parent
ab393f7cc3
commit
eedd491e51
12 changed files with 1948 additions and 1847 deletions
|
@ -4,7 +4,7 @@ local gears = require("gears")
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
local theme = require("ui.theme")
|
local theme = require("ui.theme")
|
||||||
-- Textclock widget
|
-- Textclock widget
|
||||||
mytextclock = wibox.widget.textclock()
|
local mytextclock = wibox.widget.textclock()
|
||||||
screen.connect_signal("request::desktop_decoration", function(s)
|
screen.connect_signal("request::desktop_decoration", function(s)
|
||||||
-- Tag names for each screen
|
-- Tag names for each screen
|
||||||
awful.tag(
|
awful.tag(
|
||||||
|
|
|
@ -20,7 +20,7 @@ theme.bar_bg_two = "#e0af68"
|
||||||
theme.bar_bg_tre = "#9ece6a"
|
theme.bar_bg_tre = "#9ece6a"
|
||||||
theme.bar_bg_for = "#7aa2f7"
|
theme.bar_bg_for = "#7aa2f7"
|
||||||
theme.bar_bg_fiv = "#bb9af7"
|
theme.bar_bg_fiv = "#bb9af7"
|
||||||
theme.bar_clock = "#9aa5ce"
|
theme.bar_clock = "#41a6b5"
|
||||||
--- }}}
|
--- }}}
|
||||||
|
|
||||||
-- {{{ Colors
|
-- {{{ Colors
|
||||||
|
|
|
@ -13,16 +13,16 @@ for battery in /sys/class/power_supply/BAT?*; do
|
||||||
[ -n "${capacity+x}" ] && printf " "
|
[ -n "${capacity+x}" ] && printf " "
|
||||||
# Sets up the status and capacity
|
# Sets up the status and capacity
|
||||||
case "$(cat "$battery/status" 2>&1)" in
|
case "$(cat "$battery/status" 2>&1)" in
|
||||||
"Full") status="" ;;
|
"Full") status=" " ;;
|
||||||
"Discharging") status="" ;;
|
"Discharging") status=" " ;;
|
||||||
"Charging") status="" ;;
|
"Charging") status=" " ;;
|
||||||
"Not charging") status="" ;;
|
"Not charging") status=" " ;;
|
||||||
"Unknown") status="" ;;
|
"Unknown") status=" " ;;
|
||||||
*) exit 1 ;;
|
*) exit 1 ;;
|
||||||
esac
|
esac
|
||||||
capacity="$(cat "$battery/capacity" 2>&1)"
|
capacity="$(cat "$battery/capacity" 2>&1)"
|
||||||
# Will make a warn variable if discharging and low
|
# Will make a warn variable if discharging and low
|
||||||
[ "$status" = "" ] && [ "$capacity" -le 25 ] && warn=""
|
[ "$status" = " " ] && [ "$capacity" -le 100 ] && warn=""
|
||||||
# Prints the info
|
# Prints the info
|
||||||
printf "%s%s%d%%%s" "$status" "$warn " "$capacity" " $pwr"; unset warn
|
printf "%s%s%d%%%s" "$status" "$warn " "$capacity" " $pwr"; unset warn
|
||||||
done && printf "\\n"
|
done && printf "\\n"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Prints the current volume or 🔇 if muted.
|
# Prints the current volume or 🔇 if muted.
|
||||||
[ $(pamixer --get-mute) = true ] && echo " " && exit
|
[ "$(pamixer --get-mute)" = true ] && echo " " && exit
|
||||||
vol="$(pamixer --get-volume)"
|
vol="$(pamixer --get-volume)"
|
||||||
if [ "$vol" -gt "50" ]; then
|
if [ "$vol" -gt "50" ]; then
|
||||||
icon=""
|
icon=""
|
||||||
|
|
|
@ -1,7 +1,103 @@
|
||||||
@theme "/usr/share/rofi/themes/gruvbox-dark-hard.rasi"
|
configuration{
|
||||||
configuration {
|
modi: "run,drun,window";
|
||||||
|
lines: 5;
|
||||||
font: "mononoki Nerd Font 14";
|
font: "mononoki Nerd Font 14";
|
||||||
show-icons: true;
|
show-icons: true;
|
||||||
display-window: "Window";
|
terminal: "alacritty";
|
||||||
display-drun: "Search";
|
drun-display-format: "{icon} {name}";
|
||||||
|
location: 0;
|
||||||
|
disable-history: false;
|
||||||
|
hide-scrollbar: true;
|
||||||
|
display-drun: " Apps ";
|
||||||
|
display-run: " Run ";
|
||||||
|
display-window: " Window";
|
||||||
|
display-Network: " Network";
|
||||||
|
sidebar-mode: true;
|
||||||
|
dpi: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
@theme "tokyonight"
|
||||||
|
|
||||||
|
element-text, element-icon , mode-switcher {
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
height: 380px;
|
||||||
|
width: 850;
|
||||||
|
border: 3px;
|
||||||
|
border-color: @border-col;
|
||||||
|
background-color: @bg-col;
|
||||||
|
}
|
||||||
|
|
||||||
|
mainbox {
|
||||||
|
background-color: @bg-col;
|
||||||
|
}
|
||||||
|
|
||||||
|
inputbar {
|
||||||
|
children: [prompt,entry];
|
||||||
|
background-color: @bg-col;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt {
|
||||||
|
background-color: @blue;
|
||||||
|
padding: 3px;
|
||||||
|
text-color: @bg-col;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin: 20px 0px 0px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
textbox-prompt-colon {
|
||||||
|
expand: false;
|
||||||
|
str: ":";
|
||||||
|
}
|
||||||
|
|
||||||
|
entry {
|
||||||
|
padding: 6px;
|
||||||
|
margin: 20px 0px 0px 10px;
|
||||||
|
text-color: @fg-col;
|
||||||
|
background-color: @bg-col;
|
||||||
|
}
|
||||||
|
|
||||||
|
listview {
|
||||||
|
border: 0px 0px 0px;
|
||||||
|
padding: 6px 0px 0px;
|
||||||
|
margin: 10px 0px 0px 20px;
|
||||||
|
columns: 2;
|
||||||
|
background-color: @bg-col;
|
||||||
|
}
|
||||||
|
|
||||||
|
element {
|
||||||
|
padding: 5px;
|
||||||
|
background-color: @bg-col;
|
||||||
|
text-color: @fg-col ;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-icon {
|
||||||
|
size: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
element selected {
|
||||||
|
background-color: @selected-col ;
|
||||||
|
text-color: @fg-col2 ;
|
||||||
|
}
|
||||||
|
|
||||||
|
mode-switcher {
|
||||||
|
spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
padding: 10px;
|
||||||
|
background-color: @bg-col-light;
|
||||||
|
text-color: @grey;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
horizontal-align: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
button selected {
|
||||||
|
background-color: @bg-col;
|
||||||
|
text-color: @blue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -302,7 +302,7 @@ original_args=("$@")
|
||||||
# rofi command to pipe into. Extra arguments to rofi_blue are passed through to rofi. This
|
# rofi command to pipe into. Extra arguments to rofi_blue are passed through to rofi. This
|
||||||
# allows the user to set fonts, sizes, colours, etc.
|
# allows the user to set fonts, sizes, colours, etc.
|
||||||
run_rofi() {
|
run_rofi() {
|
||||||
rofi -dmenu "${original_args[@]}" -b -l 5 -i -p "$1"
|
rofi -dmenu "${original_args[@]}" -p "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
# - Dependencies: rofi (Everything else can be changed)
|
# - Dependencies: rofi (Everything else can be changed)
|
||||||
|
|
||||||
# Show list of options
|
# Show list of options
|
||||||
EDITOR="alacritty -e nvim"
|
EDITOR="emacsclient -c -a emacs"
|
||||||
cd "$HOME" || exit 0
|
cd "$HOME" || exit 0
|
||||||
file=1
|
file=1
|
||||||
while [ "$file" ]; do
|
while [ "$file" ]; do
|
||||||
file=$(fd -LHpd 1 | rofi -dmenu -b -l 10 -p "File to edit: $(basename $(pwd))")
|
file=$(fd -LHpd 1 | rofi -dmenu -p "File to edit: $(basename "$(pwd)")")
|
||||||
if [ -e "$file" ]; then
|
if [ -e "$file" ]; then
|
||||||
owd=$(pwd)
|
owd=$(pwd)
|
||||||
if [ -d "$file" ]; then
|
if [ -d "$file" ]; then
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -5,13 +5,13 @@
|
||||||
# - Dependencies: rofi, power-profiles-daemon
|
# - Dependencies: rofi, power-profiles-daemon
|
||||||
|
|
||||||
## OPTIONS ##
|
## OPTIONS ##
|
||||||
option1=" Logout"
|
option1=" Logout"
|
||||||
option2=" Reboot"
|
option2=" Reboot"
|
||||||
option3=" Power off"
|
option3=" Power off"
|
||||||
option4="鈴 Suspend"
|
option4="鈴 Suspend"
|
||||||
option5=" Lock"
|
option5=" Lock"
|
||||||
option6=" Change power profile"
|
option6=" Change power profile"
|
||||||
option7=" Cancel"
|
option7=" Cancel"
|
||||||
|
|
||||||
## OPTIONS ARRAY ##
|
## OPTIONS ARRAY ##
|
||||||
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6\n$option7"
|
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6\n$option7"
|
||||||
|
@ -26,7 +26,7 @@ pwr4=" Cancel"
|
||||||
pwrs="$pwr1\n$pwr2\n$pwr3\n$pwr4"
|
pwrs="$pwr1\n$pwr2\n$pwr3\n$pwr4"
|
||||||
|
|
||||||
## MAIN ACTION COMMAND ##
|
## MAIN ACTION COMMAND ##
|
||||||
action=$(echo -e "$options" | rofi -dmenu -b -l 7 -i -p " ")
|
action=$(echo -e "$options" | rofi -dmenu -p " Power Options ")
|
||||||
case "$action" in
|
case "$action" in
|
||||||
$option1*)
|
$option1*)
|
||||||
pkill X;;
|
pkill X;;
|
||||||
|
@ -40,7 +40,14 @@ case "$action" in
|
||||||
betterlockscreen -l;;
|
betterlockscreen -l;;
|
||||||
$option6*)
|
$option6*)
|
||||||
currentpwr=$(powerprofilesctl get)
|
currentpwr=$(powerprofilesctl get)
|
||||||
pwraction=$(echo -e "$pwrs" | rofi -dmenu -b -l 4 -i -p "Current profile is: ${currentpwr} | Select profile:")
|
if [ "$currentpwr" = "performance" ]; then
|
||||||
|
currentpwr=" Performance"
|
||||||
|
elif [ "$currentpwr" = "power-saver" ]; then
|
||||||
|
currentpwr=" Power Saver"
|
||||||
|
elif [ "$currentpwr" = "balanced" ]; then
|
||||||
|
currentpwr=" Balanced"
|
||||||
|
fi
|
||||||
|
pwraction=$(echo -e "$pwrs" | rofi -dmenu -p " Select profile | Current profile: ${currentpwr} ")
|
||||||
case "$pwraction" in
|
case "$pwraction" in
|
||||||
$pwr1*)
|
$pwr1*)
|
||||||
powerprofilesctl set performance && notify-send "Power profile switched to performance";;
|
powerprofilesctl set performance && notify-send "Power profile switched to performance";;
|
||||||
|
|
|
@ -23,7 +23,7 @@ dels="$del1\n$del2\n$del3"
|
||||||
|
|
||||||
## DELAY FUNCTION ##
|
## DELAY FUNCTION ##
|
||||||
delays() {
|
delays() {
|
||||||
del=$(echo -e "$dels" | rofi -dmenu -b -l 3 -i -p "Select: ");
|
del=$(echo -e "$dels" | rofi -dmenu -p "Select: ");
|
||||||
case $del in
|
case $del in
|
||||||
$del1)
|
$del1)
|
||||||
scrot -d 3 && notify-send "Screenshot saved";;
|
scrot -d 3 && notify-send "Screenshot saved";;
|
||||||
|
@ -50,7 +50,7 @@ area() {
|
||||||
}
|
}
|
||||||
|
|
||||||
## MAIN ACTION ##
|
## MAIN ACTION ##
|
||||||
choice=$(echo -e "$chos" | rofi -dmenu -b -l 4 -i -p "Select: ")
|
choice=$(echo -e "$chos" | rofi -dmenu -p "Select: ")
|
||||||
case $choice in
|
case $choice in
|
||||||
$cho1)
|
$cho1)
|
||||||
screen;;
|
screen;;
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
# - Dependencies: rofi, fd, feh
|
# - Dependencies: rofi, fd, feh
|
||||||
|
|
||||||
## MAIN VARIABLES AND COMMANDS ##
|
## MAIN VARIABLES AND COMMANDS ##
|
||||||
walldir="Pictures/Wallpapers/" # wallpapers folder, change it to yours, make sure that it ends with a /
|
walldir="Pictures/Wallpapers/Main/" # wallpapers folder, change it to yours, make sure that it ends with a /
|
||||||
cd "$walldir" || exit
|
cd "$walldir" || exit
|
||||||
|
|
||||||
## SELECT PICTURE FUNCTION ##
|
## SELECT PICTURE FUNCTION ##
|
||||||
selectpic() {
|
selectpic() {
|
||||||
wallpaper=$(fd -p "$walldir" | rofi -dmenu -l 10 -b -i -p "Select a wallpaper:")
|
wallpaper=$(fd -p "$walldir" | rofi -dmenu -p "Select a wallpaper:")
|
||||||
if [ "$wallpaper" ]; then
|
if [ "$wallpaper" ]; then
|
||||||
chosenwall=$wallpaper
|
chosenwall=$wallpaper
|
||||||
else
|
else
|
||||||
|
@ -28,7 +28,7 @@ option5="Scale"
|
||||||
options="$option1\n$option2\n$option3\n$option4\n$option5"
|
options="$option1\n$option2\n$option3\n$option4\n$option5"
|
||||||
|
|
||||||
## MAIN ACTION ##
|
## MAIN ACTION ##
|
||||||
action=$(echo -e "$options" | rofi -dmenu -l 10 -b -i -p "Chose the format:")
|
action=$(echo -e "$options" | rofi -dmenu -p "Chose the format:")
|
||||||
case "$action" in
|
case "$action" in
|
||||||
$option1*)
|
$option1*)
|
||||||
feh --bg-fill "$chosenwall";;
|
feh --bg-fill "$chosenwall";;
|
||||||
|
|
|
@ -5,17 +5,15 @@
|
||||||
# - Dependencies: rofi, NetworkManager
|
# - Dependencies: rofi, NetworkManager
|
||||||
|
|
||||||
## ROFI VARIABLES ##
|
## ROFI VARIABLES ##
|
||||||
ROFI1="rofi -dmenu -l 10 -b -i -p"
|
ROFI="rofi -dmenu -p"
|
||||||
ROFI2="rofi -dmenu -l 1 -b -p"
|
|
||||||
ROFI3="rofi -dmenu -l 6 -b -i -p"
|
|
||||||
|
|
||||||
## MAIN OPTIONS ##
|
## MAIN OPTIONS ##
|
||||||
option1=" Turn on WiFi"
|
option1=" Turn on WiFi"
|
||||||
option2=" Turn off WiFi"
|
option2=" Turn off WiFi"
|
||||||
option3="睊 Disconnect WiFi"
|
option3="睊 Disconnect WiFi"
|
||||||
option4="直 Connect WiFi"
|
option4="直 Connect WiFi"
|
||||||
option5=" Setup captive portal"
|
option5=" Setup captive portal"
|
||||||
option6=" Cancel"
|
option6=" Cancel"
|
||||||
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6"
|
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6"
|
||||||
|
|
||||||
wlan=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f1 | head -1)
|
wlan=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f1 | head -1)
|
||||||
|
@ -45,12 +43,12 @@ disconnect() {
|
||||||
connect() {
|
connect() {
|
||||||
notify-send "Scannig networks, please wait"
|
notify-send "Scannig networks, please wait"
|
||||||
sleep 1
|
sleep 1
|
||||||
bssid=$(nmcli device wifi list | sed -n '1!p' | cut -b 9- | $ROFI1 "Select Wifi :" | cut -d' ' -f1)
|
bssid=$(nmcli device wifi list | sed -n '1!p' | cut -b 9- | $ROFI "Select Wifi :" | cut -d' ' -f1)
|
||||||
}
|
}
|
||||||
|
|
||||||
## SELECT PASSWORD FUNCTION ##
|
## SELECT PASSWORD FUNCTION ##
|
||||||
password() {
|
password() {
|
||||||
pass=$(echo " " | $ROFI2 "Enter Password :")
|
pass=$(echo " " | $ROFI "Enter Password :")
|
||||||
}
|
}
|
||||||
|
|
||||||
## MAIN CONNECTION COMMAND ##
|
## MAIN CONNECTION COMMAND ##
|
||||||
|
@ -71,7 +69,7 @@ check() {
|
||||||
}
|
}
|
||||||
|
|
||||||
## MAIN ACTION COMMANDS ##
|
## MAIN ACTION COMMANDS ##
|
||||||
cases=$(echo -e "$options" | $ROFI3 "What do you want to do?" )
|
cases=$(echo -e "$options" | $ROFI " Wifi Settings " )
|
||||||
case "$cases" in
|
case "$cases" in
|
||||||
$option1*)
|
$option1*)
|
||||||
turnon;;
|
turnon;;
|
||||||
|
|
Loading…
Reference in a new issue