Initial commit
This commit is contained in:
commit
afef2e3591
6
README.md
Normal file
6
README.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Mobian Scripts
|
||||||
|
|
||||||
|
This is just a collection of useful shell scripts for
|
||||||
|
[Mobian](https://mobian-project.org/) on Pinephone.
|
||||||
|
|
||||||
|
Clone it somewhere and add it to the end of your $PATH.
|
4
mobian-battery
Executable file
4
mobian-battery
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Shortcut to echo the raw battery status on Mobian.
|
||||||
|
|
||||||
|
cat /sys/devices/platform/soc/1f03400.rsb/sunxi-rsb-3a3/axp20x-battery-power-supply/power_supply/axp20x-battery/uevent
|
18
sleep-ttl
Executable file
18
sleep-ttl
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
|
# sleep-ttl: query or set the GNOME suspend timeout.
|
||||||
|
# usage: sleep-ttl [new value in seconds]
|
||||||
|
|
||||||
|
use feature qw(say);
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
if (scalar @ARGV > 0 && $ARGV[0] =~ /^(\d+)$/) {
|
||||||
|
my $ttl = $1;
|
||||||
|
say "Set TTL to $ttl";
|
||||||
|
exec("gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout $ttl");
|
||||||
|
}
|
||||||
|
|
||||||
|
my $current = `gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout`;
|
||||||
|
chomp $current;
|
||||||
|
say "Current suspend TTL is: $current";
|
Loading…
Reference in New Issue
Block a user