Compare commits

...

3 Commits

Author SHA1 Message Date
TUNQRT 7ab4d72769 script to controll brightness. Changes user to avoid sudo needs 2025-09-30 16:34:15 +02:00
TUNQRT d2d606417f script to toggle bluetooth service (TODO: pripojeni sluchatek) 2025-09-30 16:32:32 +02:00
TUNQRT 57c459f5ec script for cz <-> us layout 2025-09-30 16:31:12 +02:00
3 changed files with 23 additions and 0 deletions

10
brightness Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
input=$1
input=${input%\%}
re_num='^100$|(^[0-9]{1,2}$)' #100 nebo [0-9] jednou az dvakrat
[[ $input =~ $re_num ]] && val=$(($input*240)) || echo "NavN"
su -c "sudo brightnessctl s $val" bash >/dev/null
#echo "brightness set to $val"

10
switch_keyboard.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
current=$(setxkbmap -print | grep symbols)
current=${current#*\+}
current=${current%\+*}
new=$( [[ $current == "us" ]] && echo "cz" || echo "us" )
setxkbmap $new
echo "$current -> $new"

3
toggle_bt.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
[[ "$(systemctl is-active bluetooth)" == 'active' ]] && $(systemctl stop bluetooth || :) || systemctl restart bluetooth