refactor: new system basics
This commit is contained in:
21
polybar/scripts/alternaDormir.sh
Executable file
21
polybar/scripts/alternaDormir.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Author by : Daniel Heras
|
||||
# Mail : dani.heras@hotmail.com
|
||||
|
||||
# Posible enmascarando targets de systemd, pero mejor con caffeine
|
||||
# Ejecutar con caffeine
|
||||
|
||||
if [ -f "/tmp/sleepStopped" ]; then
|
||||
touch /tmp/sleep
|
||||
rm /tmp/sleepStopped
|
||||
else
|
||||
touch /tmp/sleepStopped
|
||||
for (( ; ; )); do
|
||||
if [ -f "/tmp/sleep" ]; then
|
||||
rm /tmp/sleep
|
||||
exit 123
|
||||
fi
|
||||
sleep 5
|
||||
done
|
||||
fi
|
||||
11
polybar/scripts/alternaNotificaciones.sh
Executable file
11
polybar/scripts/alternaNotificaciones.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
pausa=$(dunstctl is-paused)
|
||||
if [ $pausa == 'false' ]
|
||||
then
|
||||
dunstctl close-all
|
||||
dunstctl set-paused true
|
||||
else
|
||||
dunstctl close-all
|
||||
dunstctl set-paused false
|
||||
notify-send "Notificaciones activadas"
|
||||
fi
|
||||
18
polybar/scripts/alternaTouchpad.sh
Executable file
18
polybar/scripts/alternaTouchpad.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Author by : Daniel Heras
|
||||
# Mail : dani.heras@hotmail.com
|
||||
|
||||
id=$(xinput list | grep Touchpad | awk '{print $6}' | grep -o '[0-9]\+')
|
||||
prop=$(xinput list-props $id | grep "Device Enabled (" | awk '{print $3}' | grep -o '[0-9]\+')
|
||||
val=$(xinput list-props $id | grep "Device Enabled (" | awk '{print $4}' | grep -o '[0-9]\+')
|
||||
|
||||
if [ $val = 1 ]; then
|
||||
val=0
|
||||
else
|
||||
val=1
|
||||
fi
|
||||
xinput set-prop $id $prop $val
|
||||
unset id
|
||||
unset prop
|
||||
unset val
|
||||
17
polybar/scripts/bluetooth.sh
Executable file
17
polybar/scripts/bluetooth.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Author by : Daniel Heras
|
||||
# Mail : dani.heras@hotmail.com
|
||||
|
||||
if [ $(bluetoothctl show | grep "Powered: yes" | wc -c) -eq 0 ]
|
||||
then
|
||||
echo "%{F#415a77}"
|
||||
else
|
||||
if [ $(echo info | bluetoothctl | grep 'Device' | wc -c) -eq 0 ]
|
||||
then
|
||||
echo ""
|
||||
else
|
||||
echo "%{F#40916c}"
|
||||
fi
|
||||
fi
|
||||
|
||||
BIN
polybar/scripts/calendario.jar
Executable file
BIN
polybar/scripts/calendario.jar
Executable file
Binary file not shown.
15
polybar/scripts/cyclexkbmap.sh
Executable file
15
polybar/scripts/cyclexkbmap.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
layouts=("es" "us")
|
||||
variants=("none" "intl")
|
||||
|
||||
currentLayout=$(xkb-switch)
|
||||
currentLayoutCleaned=${currentLayout:0:2}
|
||||
for i in "${!layouts[@]}"; do
|
||||
if test ${layouts[i]} == $currentLayoutCleaned; then
|
||||
nextLayout=${layouts[(i+1)%${#layouts}]}
|
||||
nextVariant=${variants[(i+1)%${#variants}]}
|
||||
setxkbmap -layout $nextLayout -variant $nextVariant
|
||||
fi
|
||||
done
|
||||
|
||||
11
polybar/scripts/dunst.sh
Executable file
11
polybar/scripts/dunst.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Author by : Daniel Heras
|
||||
# Mail : dani.heras@hotmail.com
|
||||
|
||||
if [ $(dunstctl is-paused) == 'false' ]
|
||||
then
|
||||
echo "%{F#FFFFFF}"
|
||||
else
|
||||
echo "%{F#ffbe0b} Pausadas"
|
||||
fi
|
||||
4
polybar/scripts/getMemory.sh
Executable file
4
polybar/scripts/getMemory.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
memory=$(free -m -L | awk '{print $6'})
|
||||
echo $memory MiB
|
||||
9
polybar/scripts/listxkbmap.sh
Executable file
9
polybar/scripts/listxkbmap.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
layout=$(xkb-switch)
|
||||
caps_lock_status=$(xset -q | sed -n 's/^.*Caps Lock:\s*\(\S*\).*$/\1/p')
|
||||
if [ $caps_lock_status == "on" ]; then
|
||||
caps="- CAPS"
|
||||
fi
|
||||
|
||||
echo ${layout:0:2} ${caps}
|
||||
10
polybar/scripts/muestraDormir.sh
Executable file
10
polybar/scripts/muestraDormir.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Author by : Daniel Heras
|
||||
# Mail : dani.heras@hotmail.com
|
||||
|
||||
if [ -f "/tmp/sleepStopped" ]; then
|
||||
echo "%{F#ef476f} stopped"
|
||||
else
|
||||
echo "%{F#ced4da} sleepy"
|
||||
fi
|
||||
9
polybar/scripts/muestraFecha.sh
Executable file
9
polybar/scripts/muestraFecha.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Author by : Daniel Heras
|
||||
# Mail : dani.heras@hotmail.com
|
||||
|
||||
dia="$(date +"%a %d")"
|
||||
mes="$(date +"%B")"
|
||||
hora="$(date +"%R")"
|
||||
echo "%{F#ffffff} %{F#c4c7c5}$dia de $mes %{F#ffffff} %{F#ffffff}$hora"
|
||||
8
polybar/scripts/muestraNotificaciones.sh
Executable file
8
polybar/scripts/muestraNotificaciones.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Author by : Daniel Heras
|
||||
# Mail : dani.heras@hotmail.com
|
||||
|
||||
var=$(dunstctl history | sed -n /summary/,/}\,/p | grep data | awk '{$1=$2=""; print $0}' | sed 's/"//g')
|
||||
echo $var
|
||||
ver="$(rofi -no-config -no-lazy-grab -sep "\n" -dmenu -i -p 'Historial' -width 12 -line-padding 3 -lines 3 -theme ~/.config/polybar/floating/scripts/rofi/notificaciones.rasi <<< "$var")"
|
||||
9
polybar/scripts/muestraTemperatura.sh
Executable file
9
polybar/scripts/muestraTemperatura.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Author by : Daniel Heras
|
||||
# Mail : dani.heras@hotmail.com
|
||||
|
||||
grafica="$(sensors | grep 'Sensor 2' | awk '{print $3}')"
|
||||
cpu="$(sensors | grep -A 10 'gigabyte' | grep 'temp3' | awk '{print $2}')"
|
||||
|
||||
echo "%{F#ffffff} %{F#c4c7c5}CPU: $cpu %{F#c4c7c5}GPU: $grafica"
|
||||
10
polybar/scripts/muestraTiempo.sh
Executable file
10
polybar/scripts/muestraTiempo.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Author by : Daniel Heras
|
||||
# Mail : dani.heras@hotmail.com
|
||||
|
||||
#tiempo="$(~/Packages/ansiweather/ansiweather -l "Béjar,ES" -u metric -s true -f 1 -d true | awk '{print $7$8 $9}' | sed $'s/\e\\[[0-9;:]*[a-zA-Z]//g')"
|
||||
#tiempo=$(curl -s wttr.in/Béjar?format="%l:+%c+%t+%p\n")
|
||||
#echo "%{F#66ffffff}Béjar: %{F#ffffff}$tiempo"
|
||||
tiempo=$(curl -s wttr.in/Béjar?format="%l:+%C+%t+%p\n")
|
||||
echo "$tiempo"
|
||||
9
polybar/scripts/muestraTiempo_detalle.sh
Executable file
9
polybar/scripts/muestraTiempo_detalle.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Author by : Daniel Heras
|
||||
# Mail : dani.heras@hotmail.com
|
||||
|
||||
curl wttr.in/Béjar
|
||||
echo "Pulsa una tecla para salir"
|
||||
read q
|
||||
exit 1
|
||||
13
polybar/scripts/muestraTouchpad.sh
Executable file
13
polybar/scripts/muestraTouchpad.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Author by : Daniel Heras
|
||||
# Mail : dani.heras@hotmail.com
|
||||
|
||||
id=$(xinput list | grep Touchpad | awk '{print $6}' | grep -o '[0-9]\+')
|
||||
prop=$(xinput list-props $id | grep "Device Enabled (" | awk '{print $3}' | grep -o '[0-9]\+')
|
||||
val=$(xinput list-props $id | grep "Device Enabled (" | awk '{print $4}' | grep -o '[0-9]\+')
|
||||
if [ $val = 0 ]; then
|
||||
echo "%{F#ce4257}"
|
||||
else
|
||||
echo "%{F#40916c}"
|
||||
fi
|
||||
81
polybar/scripts/powermenu.sh
Executable file
81
polybar/scripts/powermenu.sh
Executable file
@@ -0,0 +1,81 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
## Original Author : Aditya Shakya
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Modified by : Daniel Heras
|
||||
## Mail : dani.heras@hotmail.com
|
||||
|
||||
dir="~/.config/polybar/floating/scripts/rofi"
|
||||
#uptime=$(uptime -p | sed -e 's/up //g')
|
||||
uptime=$(uptime | awk '{print $3}' | sed 's/,//g')
|
||||
|
||||
rofi_command="rofi -theme $dir/powermenuRight.rasi"
|
||||
|
||||
shutdown="Shutdown "
|
||||
reboot="Restart "
|
||||
lock="Lock "
|
||||
suspend="Sleep "
|
||||
logout="Logout "
|
||||
|
||||
confirm_exit() {
|
||||
rofi -dmenu\
|
||||
-i\
|
||||
-no-fixed-num-lines\
|
||||
-p "Are You Sure? : "\
|
||||
-theme $dir/confirm.rasi
|
||||
}
|
||||
msg() {
|
||||
rofi -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n"
|
||||
}
|
||||
|
||||
options="$lock\n$suspend\n$logout\n$reboot\n$shutdown"
|
||||
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "$uptime" -dmenu -selected-row 0)"
|
||||
case $chosen in
|
||||
$shutdown)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
systemctl poweroff
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$reboot)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
systemctl reboot
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$lock)
|
||||
mpc -q pause
|
||||
pulseaudio-ctl mute yes
|
||||
if [[ -f /usr/bin/i3lock ]]; then
|
||||
i3lock
|
||||
elif [[ -f /usr/bin/betterlockscreen ]]; then
|
||||
betterlockscreen -l
|
||||
elif [[ -f /usr/bin/light-locker-command ]]; then
|
||||
light-locker-command -l
|
||||
fi
|
||||
;;
|
||||
$suspend)
|
||||
mpc -q pause
|
||||
pulseaudio-ctl mute yes
|
||||
systemctl suspend
|
||||
;;
|
||||
$logout)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
i3-msg exit
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
10
polybar/scripts/rofi/colors.rasi
Normal file
10
polybar/scripts/rofi/colors.rasi
Normal file
@@ -0,0 +1,10 @@
|
||||
/* colors */
|
||||
|
||||
* {
|
||||
al: #00000000;
|
||||
bg: #090909FF;
|
||||
bga: #000000FF;
|
||||
fg: #f5f5f5FF;
|
||||
ac: #415a77FF;
|
||||
se: #415a775A;
|
||||
}
|
||||
24
polybar/scripts/rofi/confirm.rasi
Normal file
24
polybar/scripts/rofi/confirm.rasi
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Confirm Dialog */
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
* {
|
||||
background-color: @bg;
|
||||
text-color: @fg;
|
||||
font: "Terminus 9";
|
||||
}
|
||||
|
||||
window {
|
||||
width: 225px;
|
||||
padding: 25px;
|
||||
border: 0px 0px 4px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
location: center;
|
||||
y-offset: -2em;
|
||||
}
|
||||
|
||||
entry {
|
||||
expand: true;
|
||||
text-color: @bg;
|
||||
}
|
||||
118
polybar/scripts/rofi/launcherLeft.rasi
Normal file
118
polybar/scripts/rofi/launcherLeft.rasi
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
*
|
||||
* Author : Aditya Shakya
|
||||
* Mail : adi1090x@gmail.com
|
||||
* Github : @adi1090x
|
||||
* Twitter : @adi1090x
|
||||
*
|
||||
*/
|
||||
|
||||
configuration {
|
||||
font: "Terminus 10";
|
||||
show-icons: true;
|
||||
icon-theme: "Papirus";
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
disable-history: false;
|
||||
fullscreen: false;
|
||||
hide-scrollbar: true;
|
||||
sidebar-mode: false;
|
||||
}
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @bg;
|
||||
text-color: @fg;
|
||||
border: 0px 0px 4px 0px;
|
||||
border-color: @ac;
|
||||
border-radius: 0px;
|
||||
width: 350px;
|
||||
location: center;
|
||||
x-offset: -777;
|
||||
y-offset: 20;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 0px;
|
||||
background-color: @al;
|
||||
text-color: @ac;
|
||||
font: "feather 8";
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
placeholder-color: @fg;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
placeholder: "Search...";
|
||||
padding: 0px 0px 0px 8px;
|
||||
blink: true;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [ prompt, entry ];
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
expand: false;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
margin: 0px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @al;
|
||||
padding: 0px;
|
||||
columns: 1;
|
||||
lines: 22;
|
||||
spacing: 5px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @al;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
orientation: horizontal;
|
||||
border-radius: 0px;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 24px;
|
||||
border: 0px;
|
||||
background-color: @al;
|
||||
}
|
||||
|
||||
element-text {
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
vertical-align: 0.5;
|
||||
margin: 0px 2.5px 0px 2.5px;
|
||||
background-color: @al;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @se;
|
||||
text-color: @fg;
|
||||
border: 0px 0px 0px 2px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
}
|
||||
24
polybar/scripts/rofi/message.rasi
Normal file
24
polybar/scripts/rofi/message.rasi
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Confirm Dialog */
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
* {
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
font: "Terminus 9";
|
||||
}
|
||||
|
||||
window {
|
||||
width: 320px;
|
||||
padding: 25px;
|
||||
border: 0px 0px 4px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
location: center;
|
||||
y-offset: -2em;
|
||||
}
|
||||
|
||||
entry {
|
||||
expand: true;
|
||||
text-color: @ac;
|
||||
}
|
||||
127
polybar/scripts/rofi/notificaciones.rasi
Normal file
127
polybar/scripts/rofi/notificaciones.rasi
Normal file
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
*
|
||||
* Author : Aditya Shakya
|
||||
* Mail : adi1090x@gmail.com
|
||||
* Github : @adi1090x
|
||||
* Twitter : @adi1090x
|
||||
*
|
||||
*/
|
||||
|
||||
configuration {
|
||||
font: "Terminus 12";
|
||||
show-icons: true;
|
||||
icon-theme: "Papirus";
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
disable-history: false;
|
||||
fullscreen: false;
|
||||
hide-scrollbar: true;
|
||||
sidebar-mode: false;
|
||||
}
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @bg;
|
||||
text-color: @fg;
|
||||
border: 0px;
|
||||
border-color: @ac;
|
||||
border-radius: 0px;
|
||||
width: 200px;
|
||||
location: center;
|
||||
x-offset: 865;
|
||||
y-offset: 383;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 10px 10px 10px 0px;
|
||||
background-color: @al;
|
||||
text-color: @ac;
|
||||
font: "Terminus 9";
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
padding: 8px 15px 10px 15px;
|
||||
font: "Iosevka Nerd Font 8";
|
||||
background-color: @al;
|
||||
text-color: @ac;
|
||||
expand: false;
|
||||
str: "";
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @al;
|
||||
text-color: @ac;
|
||||
placeholder-color: @ac;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
placeholder: "Search...";
|
||||
padding: 10px 10px 10px 0px;
|
||||
border-radius: 0px;
|
||||
blink: true;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [ textbox-prompt-colon, prompt ];
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
expand: false;
|
||||
border: 0px 0px 1px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
spacing: 0px;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @al;
|
||||
padding: 0px;
|
||||
columns: 1;
|
||||
lines: 5;
|
||||
spacing: 5px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @al;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
orientation: horizontal;
|
||||
border-radius: 0px;
|
||||
padding: 8px 8px 8px -20px;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 24px;
|
||||
border: 0px;
|
||||
background-color: @al;
|
||||
}
|
||||
|
||||
element-text {
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
vertical-align: 0.5;
|
||||
margin: 0px 2.5px 0px 2.5px;
|
||||
background-color: @al;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
}
|
||||
127
polybar/scripts/rofi/powermenuRight.rasi
Normal file
127
polybar/scripts/rofi/powermenuRight.rasi
Normal file
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
*
|
||||
* Author : Aditya Shakya
|
||||
* Mail : adi1090x@gmail.com
|
||||
* Github : @adi1090x
|
||||
* Twitter : @adi1090x
|
||||
*
|
||||
*/
|
||||
|
||||
configuration {
|
||||
font: "Terminus 9";
|
||||
show-icons: true;
|
||||
icon-theme: "Papirus";
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
disable-history: false;
|
||||
fullscreen: false;
|
||||
hide-scrollbar: true;
|
||||
sidebar-mode: false;
|
||||
}
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @bg;
|
||||
text-color: @fg;
|
||||
border: 0px 0px 4px 0px;
|
||||
border-color: @ac;
|
||||
border-radius: 0px;
|
||||
width: 170px;
|
||||
location: center;
|
||||
x-offset: 866;
|
||||
y-offset: -365;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 10px 10px 10px 0px;
|
||||
background-color: @al;
|
||||
text-color: @ac;
|
||||
font: "Terminus 9";
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
padding: 8px 15px 10px 15px;
|
||||
font: "Iosevka Nerd Font 8";
|
||||
background-color: @al;
|
||||
text-color: @ac;
|
||||
expand: false;
|
||||
str: "";
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @al;
|
||||
text-color: @ac;
|
||||
placeholder-color: @ac;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
placeholder: "Search...";
|
||||
padding: 10px 10px 10px 0px;
|
||||
border-radius: 0px;
|
||||
blink: true;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [ textbox-prompt-colon, prompt ];
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
expand: false;
|
||||
border: 0px 0px 1px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
spacing: 0px;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @al;
|
||||
padding: 0px;
|
||||
columns: 1;
|
||||
lines: 5;
|
||||
spacing: 5px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @al;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
orientation: horizontal;
|
||||
border-radius: 0px;
|
||||
padding: 8px 8px 8px -20px;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 24px;
|
||||
border: 0px;
|
||||
background-color: @al;
|
||||
}
|
||||
|
||||
element-text {
|
||||
expand: true;
|
||||
horizontal-align: 0.5;
|
||||
vertical-align: 0.5;
|
||||
margin: 0px 2.5px 0px 2.5px;
|
||||
background-color: @al;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @se;
|
||||
text-color: @fg;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
}
|
||||
9
polybar/scripts/showdate.sh
Executable file
9
polybar/scripts/showdate.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Author by : Daniel Heras
|
||||
# Mail : dani.heras@hotmail.com
|
||||
|
||||
day="$(date +"%a %d")"
|
||||
month="$(date +"%B")"
|
||||
hour="$(date +"%R")"
|
||||
echo " $hour at $day of $month "
|
||||
11
polybar/scripts/toggleEscSwap.sh
Executable file
11
polybar/scripts/toggleEscSwap.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $1 == "off" ]]; then
|
||||
xmodmap -e "keycode 49 = dead_grave dead_tilde dead_grave dead_tilde grave asciitilde grave"
|
||||
xmodmap -e "keycode 9 = Escape NoSymbol Escape"
|
||||
else
|
||||
xmodmap -e "keycode 49 = Escape NoSymbol Escape"
|
||||
xmodmap -e "keycode 9 = dead_grave dead_tilde dead_grave dead_tilde grave asciitilde grave"
|
||||
xmodmap -e "keycode 66 = Escape NoSymbol Escape"
|
||||
xmodmap -e "clear lock"
|
||||
fi
|
||||
32
polybar/scripts/toggleInternalKeyboard.sh
Executable file
32
polybar/scripts/toggleInternalKeyboard.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
masterId=$(xinput list | grep "Virtual core keyboard" | awk '{print $5}')
|
||||
internalId=$(xinput list | grep "AT Translated.*keyboard" | awk '{print $7}')
|
||||
floatingId=$(xinput list | grep "AT Translated.*keyboard.*floating" | awk '{print $7}')
|
||||
masterId=${masterId:3}
|
||||
internalId=${internalId:3}
|
||||
floatingId=${floatingId:3}
|
||||
|
||||
if [[ $1 == "toggle" ]]; then
|
||||
if [[ -n $floatingId ]]; then
|
||||
xinput reattach $floatingId $masterId
|
||||
xmodmap -e "keycode 49 = dead_grave dead_tilde dead_grave dead_tilde grave asciitilde grave"
|
||||
xmodmap -e "keycode 9 = Escape NoSymbol Escape"
|
||||
else
|
||||
xinput float $internalId
|
||||
xmodmap -e "keycode 49 = Escape NoSymbol Escape"
|
||||
xmodmap -e "keycode 9 = dead_grave dead_tilde dead_grave dead_tilde grave asciitilde grave"
|
||||
xmodmap -e "keycode 66 = Escape NoSymbol Escape"
|
||||
xmodmap -e "clear lock"
|
||||
fi
|
||||
elif [[ $1 == "on" ]]; then
|
||||
xinput reattach $floatingId $masterId
|
||||
xmodmap -e "keycode 49 = dead_grave dead_tilde dead_grave dead_tilde grave asciitilde grave"
|
||||
xmodmap -e "keycode 9 = Escape NoSymbol Escape"
|
||||
else
|
||||
if [[ -n $floatingId ]]; then
|
||||
echo " off"
|
||||
else
|
||||
echo " on"
|
||||
fi
|
||||
fi
|
||||
11
polybar/scripts/toggle_bluetooth.sh
Executable file
11
polybar/scripts/toggle_bluetooth.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Author by : Daniel Heras
|
||||
# Mail : dani.heras@hotmail.com
|
||||
|
||||
if [ $(bluetoothctl show | grep "Powered: yes" | wc -c) -eq 0 ]
|
||||
then
|
||||
bluetoothctl power on
|
||||
else
|
||||
bluetoothctl power off
|
||||
fi
|
||||
17
polybar/scripts/wifi_status.sh
Executable file
17
polybar/scripts/wifi_status.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Author by : Daniel Heras
|
||||
# Mail : dani.heras@hotmail.com
|
||||
|
||||
n=$(nmcli device status | grep -wc connected)
|
||||
#id=$(nmcli device status | grep -w connected | awk '{print $4}')
|
||||
id=$(nmcli -t -f active,ssid dev wifi | grep -E '^yes' | cut -d\' -f2)
|
||||
final_id=$(echo "${id#*:}")
|
||||
|
||||
if test $n -gt 1; then
|
||||
echo "%{F#ffffff} %{F#ced4da}$final_id"
|
||||
elif test $n -eq 0; then
|
||||
echo "%{F#a4133c} %{F#ced4da}Sin conexión"
|
||||
else
|
||||
echo "%{F#ffffff} %{F#ced4da}$final_id"
|
||||
fi
|
||||
Reference in New Issue
Block a user