commit
ed0817f6b5
23 changed files with 598 additions and 50 deletions
@ -0,0 +1,21 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
options="End All Calls |
||||
Check for Calls |
||||
Check for Texts |
||||
Dialer" |
||||
|
||||
while true ; do |
||||
choice="$(echo "$options" | trofi)" |
||||
case "$choice" in |
||||
"End All Calls") |
||||
modem="$(mmcli -L | grep -oE 'Modem\/[0-9]+' | head -n 1 | cut -d'/' -f2)" |
||||
mmcli -m "$modem" --voice-hangup-all |
||||
break ;; |
||||
"Check for Calls") checkCall ;; |
||||
"Check for Texts") checkSMS ;; |
||||
"Dialer") (dialer &); break ;; |
||||
"Back") break;; |
||||
esac |
||||
done |
||||
|
@ -0,0 +1,21 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
options="Zoom In |
||||
Zoom Out |
||||
Paste |
||||
System Menu |
||||
Exit" |
||||
|
||||
choice="" |
||||
while : ; do |
||||
choice="$(echo "$options" | trofi)" |
||||
case "$choice" in |
||||
"Zoom In") sleep 0.3; xdotool key --clearmodifiers "ctrl+shift+j" ;; |
||||
"Zoom Out") sleep 0.3; xdotool key --clearmodifiers "ctrl+shift+k" ;; |
||||
"Paste") sleep 0.3; xdotool key --clearmodifiers "ctrl+shift+v" ;; |
||||
"System Menu") menu-system; break ;; |
||||
"Exit") sleep 0.3; xdotool key --clearmodifiers "Super_L+q"; break ;; |
||||
"") break ;; |
||||
esac |
||||
done |
||||
|
@ -0,0 +1,37 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
options="Terminal |
||||
Browser |
||||
Phone |
||||
Podcasts |
||||
Go To Workspace |
||||
Move To Workspace |
||||
Power Menu |
||||
Exit" |
||||
|
||||
chooseWorkspace(){ |
||||
seq 1 10 | trofi |
||||
} |
||||
|
||||
goToWorkspace(){ |
||||
xdotool key --clearmodifiers "Super_L+$(chooseWorkspace)" |
||||
} |
||||
moveToWorkspace(){ |
||||
xdotool key --clearmodifiers "Super_L+Shift+$(chooseWorkspace)" |
||||
} |
||||
|
||||
while true ; do |
||||
choice="$(echo "$options" | trofi)" |
||||
case "$choice" in |
||||
"Terminal") (folder-shell &); break ;; |
||||
"Browser") (firefox &); break ;; |
||||
"Podcasts") (gnome-podcasts &); break ;; |
||||
"Phone") spawn-phone-menu phone ; break ;; |
||||
"Go To Workspace") goToWorkspace ; break ;; |
||||
"Move To Workspace") moveToWorkspace ; break ;; |
||||
"Power Menu") (rofi-shutdown &); break ;; |
||||
"Exit") sleep 0.3; xdotool key --clearmodifiers "Super_L+q"; break ;; |
||||
"") break;; |
||||
esac |
||||
done |
||||
|
@ -0,0 +1,27 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
# This script creates menus for applications running on my phone |
||||
|
||||
error(){ |
||||
echo "$@" > /dev/stderr |
||||
exit 1 |
||||
} |
||||
|
||||
windowFocus="$(xdotool getwindowfocus)" |
||||
if [ -n "$1" ]; then |
||||
menu="menu-$1" |
||||
else |
||||
class="$(xprop -id "$windowFocus" | grep "WM_CLASS" | cut -d '"' -f 2)" |
||||
case "$class" in |
||||
"xterm-256color") menu="menu-st" ;; |
||||
*) menu="menu-$class" ;; |
||||
esac |
||||
fi |
||||
|
||||
|
||||
type "$menu" > /dev/null 2>&1 || menu="menu-system" |
||||
|
||||
"$menu" |
||||
|
||||
|
||||
|
@ -0,0 +1,12 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
# THis is a simple wrapper around rofi which makes it nicer to use with touch screens |
||||
|
||||
|
||||
input="$(cat -)" |
||||
|
||||
lines="$(echo "$input" | wc -l )" |
||||
|
||||
[ "$lines" -gt 15 ] && lines=15 |
||||
|
||||
echo "$input" | rofi -dmenu -me-accept-entry '!MousePrimary' -theme "themes/touch-dmenu.rasi" -lines "$lines" |
@ -0,0 +1,41 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" |
||||
source "$DIR/common" |
||||
|
||||
export DISPLAY=:0.0 |
||||
|
||||
usage(){ |
||||
echo "makeCall number" |
||||
echo "Options:" |
||||
echo " -h|--help Display this help text" |
||||
echo " -m|--modem Specify a modem" |
||||
echo " --dry-run Don't actually call" |
||||
} |
||||
|
||||
modem="$(mmcli -L | grep -oE 'Modem\/[0-9]+' | head -n 1 | cut -d'/' -f2)" |
||||
|
||||
# Read the options and set stuff |
||||
while [[ $1 = -?* ]]; do |
||||
case $1 in |
||||
-h|--help) usage; exit;; |
||||
-m|--modem) modem="$2"; shift ;; |
||||
--dry-run) dryrun="--dry-run" ;; |
||||
--) shift; break ;; |
||||
*) die "invalid option: '$1'." ;; |
||||
esac |
||||
shift |
||||
done |
||||
|
||||
number="$1" |
||||
|
||||
[ -z "$number" ] && die "No Number Specified" |
||||
|
||||
callID="$(mmcli -m "$modem" --voice-create-call "number=$number" | |
||||
grep -Eo 'Call\/[0-9]+' | head -n 1 | cut -d'/' -f2)" |
||||
|
||||
|
||||
|
||||
checkCall $dryrun "$callID" |
||||
|
||||
|
@ -0,0 +1,10 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
battery="$(cat /sys/class/power_supply/axp20x-battery/capacity)" |
||||
batteryStatus="$(cat /sys/class/power_supply/axp20x-battery/status)" |
||||
[ "$batteryStatus" = "Charging" ] && batteryIcon="🔌" || batteryIcon="🔋" |
||||
|
||||
time="$(date "+%H:%M")" |
||||
|
||||
notify-send "$(hostname)" "$batteryIcon ${battery}%\nTime $time" |
||||
|
@ -0,0 +1,7 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
if pidof svkbd-colemak || pidof svkbd-numbers; then |
||||
pkill "svkbd-*" |
||||
else |
||||
svkbd-colemak & disown |
||||
fi |
@ -0,0 +1,18 @@ |
||||
|
||||
configuration { |
||||
font: "iosevka 30"; |
||||
disable-history: false; |
||||
fullscreen: false; |
||||
hide-scrollbar: true; |
||||
sidebar-mode: false; |
||||
} |
||||
|
||||
@import "gruvbox-dark.rasi" |
||||
|
||||
window { |
||||
width: 90%; |
||||
} |
||||
|
||||
mainbox { |
||||
children: [ listview ]; |
||||
} |
@ -0,0 +1,107 @@ |
||||
configuration { |
||||
disable-history: false; |
||||
fullscreen: false; |
||||
hide-scrollbar: true; |
||||
sidebar-mode: false; |
||||
} |
||||
|
||||
@import "gruvbox-dark.rasi" |
||||
|
||||
* { |
||||
background-color: @background; |
||||
text-color: @foreground; |
||||
} |
||||
|
||||
window { |
||||
transparency: "real"; |
||||
border-radius: 12px; |
||||
width: 500px; |
||||
location: east; |
||||
x-offset: -15px; |
||||
y-offset: 0px; |
||||
} |
||||
|
||||
listview { |
||||
lines: 3; |
||||
margin: 8px; |
||||
spacing: 8px; |
||||
cycle: true; |
||||
dynamic: true; |
||||
layout: vertical; |
||||
} |
||||
|
||||
mainbox { |
||||
background-color: @background; |
||||
children: [ inputbar, listview ]; |
||||
} |
||||
|
||||
prompt{ |
||||
text-align: center; |
||||
background-color: red; |
||||
position: center; |
||||
|
||||
horizontal-align: 0.5; |
||||
} |
||||
|
||||
inputbar { |
||||
children: [ prompt ]; |
||||
spacing: 0px; |
||||
background-color: @background; |
||||
text-color: @foreground; |
||||
expand: false; |
||||
horizontal-align: 0.5; |
||||
border: 0px; |
||||
border-radius: 0px; |
||||
border-color: @accent; |
||||
margin: 0px 0px 0px 0px; |
||||
padding: 0px; |
||||
position: center; |
||||
text-align: center; |
||||
} |
||||
|
||||
element { |
||||
background-color: @background-light; |
||||
text-color: @foreground; |
||||
orientation: vertical; |
||||
border-radius: 12px; |
||||
} |
||||
|
||||
element-text { |
||||
font: "iosevka 25"; |
||||
expand: true; |
||||
horizontal-align: 0.5; |
||||
vertical-align: 0; |
||||
margin: 10px 10px 33px 10px; |
||||
} |
||||
|
||||
element normal.urgent, |
||||
element alternate.urgent { |
||||
background-color: @urgent; |
||||
text-color: @foreground; |
||||
border-radius: 10px; |
||||
} |
||||
|
||||
element normal.active, |
||||
element alternate.active { |
||||
background-color: @background-alt; |
||||
text-color: @foreground; |
||||
} |
||||
|
||||
element selected { |
||||
background-color: @accent; |
||||
text-color: @background; |
||||
border: 0px; |
||||
border-radius: 10px; |
||||
border-color: @border; |
||||
} |
||||
|
||||
element selected.urgent { |
||||
background-color: @urgent; |
||||
text-color: @foreground; |
||||
} |
||||
|
||||
element selected.active { |
||||
background-color: @background-alt; |
||||
color: @foreground; |
||||
} |
||||
|
@ -0,0 +1,9 @@ |
||||
[Unit] |
||||
Description=Monitor Modem |
||||
|
||||
[Service] |
||||
Environment="PATH=/usr/bin:/usr/local/bin:/home/jonathan/.bin:/home/jonathan/.bin/modem:/home/jonathan/.bin/dmenu" |
||||
ExecStart=/home/jonathan/.bin/modem/monitorModem |
||||
|
||||
[Install] |
||||
WantedBy=default.target |
@ -0,0 +1,9 @@ |
||||
[Unit] |
||||
Description=Enable user access to pinephone hardware kernel interface |
||||
|
||||
[Service] |
||||
Type=oneshot |
||||
ExecStart=/bin/bash -c 'for i in /sys/module/8723cs/parameters/rtw_scan_interval_thr /sys/devices/platform/backlight/backlight/backlight/brightness /sys/power/state /sys/devices/platform/soc/1f00000.rtc/power/wakeup /sys/power/mem_sleep /sys/bus/usb/drivers/usb/unbind /sys/bus/usb/drivers/usb/bind /sys/class/leds/red:indicator/brightness /sys/class/leds/blue:indicator/brightness /sys/class/leds/green:indicator/brightness /sys/class/leds/white:flash/brightness /dev/rtc0 /sys/devices/platform/soc/1f03400.rsb/sunxi-rsb-3a3/axp221-pek/power/wakeup /sys/class/wakeup/*; do [ -e "$i" ] && chmod a+rw "$i" >> /tmp/log 2>&1; done' |
||||
|
||||
[Install] |
||||
WantedBy=multi-user.target |
Loading…
Reference in new issue