new wayland system
This commit is contained in:
1
.focusState
Normal file
1
.focusState
Normal file
@@ -0,0 +1 @@
|
|||||||
|
1
|
||||||
@@ -6,8 +6,15 @@ externo=HDMI-A-0
|
|||||||
# ejecutar un solo randr con variables
|
# ejecutar un solo randr con variables
|
||||||
# modificar las variables en función de la entrada
|
# modificar las variables en función de la entrada
|
||||||
# igual renta sacar las opciones del propio xrandr usando awk y grep
|
# igual renta sacar las opciones del propio xrandr usando awk y grep
|
||||||
if xrandr | grep "$externo connected"; then
|
#
|
||||||
eleccion="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p 'System' -width 12 -line-padding 3 -lines 6 -theme /home/danih/Scripts/rofi/monitor.rasi <<< "Dual Side|Dual Top|Dual Side Vertical|Dual Side Low|Interna|Externa|Duplicar")"
|
|
||||||
|
lidstate="$(cat /proc/acpi/button/lid/LID0/state | awk '{print $2}')"
|
||||||
|
|
||||||
|
if test $lidstate == "closed"; then
|
||||||
|
xrandr --output "$interno" --auto --output "$externo" --auto --above "$interno" --output "$externo2" --off
|
||||||
|
xrandr --output "$externo" --mode 1920x1080 --rate 120 --output "$interno" --off
|
||||||
|
elif xrandr | grep "$externo connected"; then
|
||||||
|
eleccion="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p 'System' -width 12 -line-padding 3 -lines 6 -theme /home/danih/Scripts/rofi/monitor.rasi <<< "Externa|Dual Side|Dual Top|Interna|Duplicar")"
|
||||||
case "$eleccion" in
|
case "$eleccion" in
|
||||||
"Dual Top")
|
"Dual Top")
|
||||||
xrandr --output "$interno" --auto --mode 1920x1080 --output "$externo" --auto --above "$interno" --output "$externo2" --off
|
xrandr --output "$interno" --auto --mode 1920x1080 --output "$externo" --auto --above "$interno" --output "$externo2" --off
|
||||||
@@ -18,9 +25,6 @@ if xrandr | grep "$externo connected"; then
|
|||||||
"Dual Side Low")
|
"Dual Side Low")
|
||||||
xrandr --output HDMI-A-0 --mode 1600x900 --pos 0x0 --rotate normal --output eDP --primary --mode 1920x1080 --rate 60 --pos 0x1080 --rotate normal
|
xrandr --output HDMI-A-0 --mode 1600x900 --pos 0x0 --rotate normal --output eDP --primary --mode 1920x1080 --rate 60 --pos 0x1080 --rotate normal
|
||||||
;;
|
;;
|
||||||
"Dual Side Vertical")
|
|
||||||
xrandr --output HDMI-A-0 --mode 1920x1080 --pos 0x0 --rotate right --output eDP --primary --mode 1920x1080 --pos 1080x1762 --rotate normal
|
|
||||||
;;
|
|
||||||
Duplicar)
|
Duplicar)
|
||||||
xrandr --output "$interno" --auto --output "$externo" --same-as "$interno"
|
xrandr --output "$interno" --auto --output "$externo" --same-as "$interno"
|
||||||
;;
|
;;
|
||||||
@@ -32,7 +36,7 @@ if xrandr | grep "$externo connected"; then
|
|||||||
xrandr --output "$externo" --off --output "$interno" --auto
|
xrandr --output "$externo" --off --output "$interno" --auto
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
xrandr --output "$externo" --off --output "$externo2" --off --output "$interno" --auto
|
xrandr --output "$externo" --off --output "$externo2" --off --output "$interno" --auto
|
||||||
fi
|
fi
|
||||||
[[ "eleccion" = "" ]] && exit 1
|
[[ "eleccion" = "" ]] && exit 1
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ scroll=$(xinput list-props $id | grep "Natural Scrolling Enabled (" | awk '{prin
|
|||||||
echo $id $tap $speed
|
echo $id $tap $speed
|
||||||
|
|
||||||
xinput set-prop $id $tap 1
|
xinput set-prop $id $tap 1
|
||||||
xinput set-prop $id $speed 0.4
|
xinput set-prop $id $speed 0.12
|
||||||
xinput set-prop $id $scroll 1
|
xinput set-prop $id $scroll 1
|
||||||
|
|
||||||
unset id
|
unset id
|
||||||
|
|||||||
45
Tools/confirm.sh
Executable file
45
Tools/confirm.sh
Executable file
@@ -0,0 +1,45 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
dir="~/.config/polybar/floating/scripts/rofi"
|
||||||
|
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
|
||||||
|
if test $# == 0; then
|
||||||
|
echo "./confirm logout|suspend|poweroff|reboot "
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
ans=$(confirm_exit &)
|
||||||
|
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||||
|
case $1 in
|
||||||
|
"poweroff")
|
||||||
|
poweroff
|
||||||
|
;;
|
||||||
|
"suspend")
|
||||||
|
systemctl suspend
|
||||||
|
;;
|
||||||
|
"reboot")
|
||||||
|
reboot
|
||||||
|
;;
|
||||||
|
"logout")
|
||||||
|
i3-msg exit
|
||||||
|
;;
|
||||||
|
default)
|
||||||
|
echo "./confirm lock|suspend|poweroff|reboot "
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
msg
|
||||||
|
fi
|
||||||
11
Tools/free_ram.sh
Normal file
11
Tools/free_ram.sh
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Display the top applications of memory usage
|
||||||
|
# http://www.cyberciti.biz/faq/linux-check-memory-usage/#comment-51021
|
||||||
|
|
||||||
|
while read command percent rss; do
|
||||||
|
if [[ "${command}" != "COMMAND" ]]; then
|
||||||
|
rss="$(bc <<< "scale=2;${rss}/1024")"
|
||||||
|
fi
|
||||||
|
printf " %-26s%-8s%s\n" "${command}" "${percent}" "${rss} MB" \
|
||||||
|
| sed 's/COMMAND/PROGRAM/' | sed 's/RSS MB/#MEM/'
|
||||||
|
done < <(ps -A --sort -rss -o comm,pmem,rss | head -n 20)
|
||||||
16
cowsay.sh
Normal file
16
cowsay.sh
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
conversation=()
|
||||||
|
# conversation=("Hola dinosaurio" "Hola señora vaca" "Estás muuuuuu guapo" "Tu si que estás guapa" "No, tu" "He dicho que tu" "Eso he dicho yo me cago en mis muertos te voy a comer!" "Te falta valor chaval tu a mi no me conoces!" "ñam!" "~muere~")
|
||||||
|
|
||||||
|
for key in "${!conversation[@]}"
|
||||||
|
do
|
||||||
|
if test "$(($key % 2))" == "1"; then
|
||||||
|
python ~/Packages/dinosay/dinosay/dinosay.py -d para "${conversation[$key]}"
|
||||||
|
sleep 2
|
||||||
|
else
|
||||||
|
cowsay "${conversation[$key]}"
|
||||||
|
sleep 2
|
||||||
|
fi
|
||||||
|
clear
|
||||||
|
done
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
|
|
||||||
* {
|
* {
|
||||||
al: #00000000;
|
al: #00000000;
|
||||||
bg: #101010FF;
|
bg: #101010BF;
|
||||||
bga: #09090AA0;
|
bga: #09090ABA;
|
||||||
fg: #f5f5f5FF;
|
fg: #f5f5f5FF;
|
||||||
ac: #2b3648FF;
|
ac: #58809aFF;
|
||||||
se: #2b36485A;
|
se: #58809a5A;
|
||||||
font: "Terminus 12";
|
font: "Terminus 12";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user