new wayland system
This commit is contained in:
1
.focusState
Normal file
1
.focusState
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -6,34 +6,38 @@ externo=HDMI-A-0
|
||||
# ejecutar un solo randr con variables
|
||||
# modificar las variables en función de la entrada
|
||||
# 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")"
|
||||
case "$eleccion" in
|
||||
"Dual Top")
|
||||
xrandr --output "$interno" --auto --mode 1920x1080 --output "$externo" --auto --above "$interno" --output "$externo2" --off
|
||||
;;
|
||||
"Dual Side")
|
||||
xrandr --output HDMI-A-0 --primary --mode 1920x1080 --rate 60 --pos 1920x0 --rotate normal --output eDP --mode 1920x1080 --rate 60 --pos 0x600 --rotate normal
|
||||
;;
|
||||
"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
|
||||
;;
|
||||
"Dual Side Vertical")
|
||||
xrandr --output HDMI-A-0 --mode 1920x1080 --pos 0x0 --rotate right --output eDP --primary --mode 1920x1080 --pos 1080x1762 --rotate normal
|
||||
;;
|
||||
Duplicar)
|
||||
xrandr --output "$interno" --auto --output "$externo" --same-as "$interno"
|
||||
;;
|
||||
Externa)
|
||||
#
|
||||
|
||||
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 144 --output "$interno" --off
|
||||
;;
|
||||
Interna)
|
||||
xrandr --output "$externo" --off --output "$interno" --auto
|
||||
;;
|
||||
esac
|
||||
else
|
||||
xrandr --output "$externo" --off --output "$externo2" --off --output "$interno" --auto
|
||||
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
|
||||
"Dual Top")
|
||||
xrandr --output "$interno" --auto --mode 1920x1080 --output "$externo" --auto --above "$interno" --output "$externo2" --off
|
||||
;;
|
||||
"Dual Side")
|
||||
xrandr --output HDMI-A-0 --primary --mode 1920x1080 --rate 60 --pos 1920x0 --rotate normal --output eDP --mode 1920x1080 --rate 60 --pos 0x600 --rotate normal
|
||||
;;
|
||||
"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
|
||||
;;
|
||||
Duplicar)
|
||||
xrandr --output "$interno" --auto --output "$externo" --same-as "$interno"
|
||||
;;
|
||||
Externa)
|
||||
xrandr --output "$interno" --auto --output "$externo" --auto --above "$interno" --output "$externo2" --off
|
||||
xrandr --output "$externo" --mode 1920x1080 --rate 144 --output "$interno" --off
|
||||
;;
|
||||
Interna)
|
||||
xrandr --output "$externo" --off --output "$interno" --auto
|
||||
;;
|
||||
esac
|
||||
else
|
||||
xrandr --output "$externo" --off --output "$externo2" --off --output "$interno" --auto
|
||||
fi
|
||||
[[ "eleccion" = "" ]] && exit 1
|
||||
i3 restart
|
||||
|
||||
@@ -7,7 +7,7 @@ scroll=$(xinput list-props $id | grep "Natural Scrolling Enabled (" | awk '{prin
|
||||
echo $id $tap $speed
|
||||
|
||||
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
|
||||
|
||||
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;
|
||||
bg: #101010FF;
|
||||
bga: #09090AA0;
|
||||
bg: #101010BF;
|
||||
bga: #09090ABA;
|
||||
fg: #f5f5f5FF;
|
||||
ac: #2b3648FF;
|
||||
se: #2b36485A;
|
||||
ac: #58809aFF;
|
||||
se: #58809a5A;
|
||||
font: "Terminus 12";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user