feat: full sway config, removed awesome config
This commit is contained in:
parent
11bbdb42eb
commit
fe1959f01a
31 changed files with 641 additions and 1350 deletions
|
@ -1,11 +1,4 @@
|
|||
#!/usr/bin/bash
|
||||
set -e
|
||||
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "error: you cannot perform this operation unless you are root."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
systemctl start docker
|
||||
docker run -it --rm --name epitest -v "$PWD":/tmp epitechcontent/epitest-docker:latest /bin/bash
|
||||
systemctl stop docker
|
||||
docker run -it --rm -v "$PWD":/tmp epitechcontent/epitest-docker:latest /bin/bash
|
||||
|
|
BIN
bin/minecraft-launcher
Executable file
BIN
bin/minecraft-launcher
Executable file
Binary file not shown.
10
bin/set-ddc-light
Executable file
10
bin/set-ddc-light
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/bash
|
||||
set -e
|
||||
|
||||
CUR_LIGHT="$(set-light "$@")"
|
||||
|
||||
SCREENS="$(ddcutil detect | awk '$1 == "Display" {print $2}')"
|
||||
|
||||
for i in $SCREENS; do
|
||||
ddcutil -d "$i" setvcp 10 "$CUR_LIGHT"
|
||||
done
|
39
bin/set-light
Executable file
39
bin/set-light
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/bash
|
||||
set -e
|
||||
shopt -s extglob nullglob
|
||||
|
||||
set_brightness() {
|
||||
MAX="$(cat "$1"/max_brightness)"
|
||||
FILE="$1"/brightness
|
||||
VAL="$(($2 * MAX / 100))"
|
||||
|
||||
echo "$VAL" > "$FILE"
|
||||
}
|
||||
|
||||
CUR_FILE=/var/tmp/current_brightness
|
||||
|
||||
set +e
|
||||
CUR="$(cat "$CUR_FILE" || echo 50)"
|
||||
set -e
|
||||
|
||||
case "${1:0:1}" in
|
||||
"")
|
||||
exit 1
|
||||
;;
|
||||
"+"|"-")
|
||||
NEW="$((CUR + $1))"
|
||||
;;
|
||||
*)
|
||||
NEW="$1"
|
||||
;;
|
||||
esac
|
||||
|
||||
[ "$NEW" -lt 0 ] && NEW=0
|
||||
[ "$NEW" -gt 100 ] && NEW=100
|
||||
|
||||
for dev in /sys/class/backlight/*; do
|
||||
set_brightness "$dev" "$NEW"
|
||||
done
|
||||
|
||||
echo "$NEW" > "$CUR_FILE"
|
||||
echo "$NEW"
|
24
bin/set-vol
Executable file
24
bin/set-vol
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/bash
|
||||
set -e
|
||||
|
||||
CUR="$(pactl get-sink-volume 0 | awk '$1 == "Volume:" {print substr($5, 1, length($5) - 1)}')"
|
||||
SHIFT="${1}"
|
||||
|
||||
case "${1:0:1}" in
|
||||
"")
|
||||
exit 1
|
||||
;;
|
||||
"+"|"-")
|
||||
NEW="$((CUR - CUR % SHIFT + SHIFT))"
|
||||
;;
|
||||
*)
|
||||
NEW="$1"
|
||||
;;
|
||||
esac
|
||||
|
||||
[ "$NEW" -gt 100 ] && NEW=100
|
||||
|
||||
pactl set-sink-volume 0 "$NEW"%
|
||||
pactl set-sink-mute 0 0
|
||||
|
||||
echo "$NEW"
|
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
set -e
|
||||
|
||||
device="PNP0C50:0e 06CB:7E7E Touchpad"
|
||||
|
||||
enabled=$(xinput list-props "$device" | awk -F ':' '$1 ~ "Device Enabled" {print $2}')
|
||||
|
||||
xinput set-prop "$device" "Device Enabled" "$((1 - enabled))"
|
|
@ -1,15 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
set -e
|
||||
|
||||
if [ "$EUID" -eq 0 ]; then
|
||||
echo "error: cannot be root."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo systemctl start libvirtd
|
||||
sudo virsh net-start default
|
||||
|
||||
virt-manager --no-fork
|
||||
|
||||
sudo virsh net-destroy default
|
||||
sudo systemctl stop libvirtd
|
Loading…
Add table
Add a link
Reference in a new issue