diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/battery_level | 4 | ||||
-rwxr-xr-x | scripts/fzf_menu.sh | 2 | ||||
-rwxr-xr-x | scripts/tablet | 8 |
3 files changed, 8 insertions, 6 deletions
diff --git a/scripts/battery_level b/scripts/battery_level new file mode 100755 index 0000000..7bc27d1 --- /dev/null +++ b/scripts/battery_level @@ -0,0 +1,4 @@ +#!/bin/sh +full=$(cat /sys/class/power_supply/BAT0/charge_now) +now=$(cat /sys/class/power_supply/BAT0/charge_full) +echo $full / $now \* 100 | bc -l diff --git a/scripts/fzf_menu.sh b/scripts/fzf_menu.sh index 8f6238f..3aecaf7 100755 --- a/scripts/fzf_menu.sh +++ b/scripts/fzf_menu.sh @@ -1,3 +1,3 @@ #!/bin/sh -file=$(fzf $@) +file="$(fzf $@)" xdg-open $file & diff --git a/scripts/tablet b/scripts/tablet index 8190919..f283635 100755 --- a/scripts/tablet +++ b/scripts/tablet @@ -20,21 +20,19 @@ tablet_ratio = (lambda s: float(s[0]) / float(s[1]))(sys.argv[4].split(":")) if screens = [ (0, 0, 1920, 1080), - (0, 1080, 1920, 1080), - (1920, 1080, 2560, 1440), ] #TODO find this with xrandr -target = screens[2] +target = screens[0] #Physical offset of the selected screen offsetx = target[0] offsety = target[1] #Size of the full screen areas -sh = 1080+ 1440 -sw = 1920 + 2560 +sh = 1080 +sw = 1920 #TODO calculate using list of screens #Aspect ratio of the tablet, to avoid weird scaling problems |