Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds setkiosk block and setresolution block #60

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions setkiosk/setkiosk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "setkiosk",
"text": "Set Kiosk to %1",
"script": "setkiosk.sh",
"args": [
{
"type": "text",
"default": "http://www.pibakery.org",
"maxLength": 0
}
],
"network": false,
"continue": true,
"type": "other",
"category":"other",
"supportedOperatingSystems": [
"raspbian-pibakery.img"
],
"shortDescription":"Set your pi in kiosk mode to show a webpage after boot.",
"longDescription":"Launches the Chromuim browser that comes with PIXEL. If unclutter is installed it will hide your cursor also"
}
11 changes: 11 additions & 0 deletions setkiosk/setkiosk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

text="@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xset s off
@xset -dpms
@xset s noblank
@chromium-browser --noerrdialogs --kiosk --disable-session-crashed-bubble --disable-infobars -no-first-run "$1"
@unclutter -idle 0.1 -root"

echo "$text" > /home/pi/.config/lxsession/LXDE-pi/autostart
132 changes: 132 additions & 0 deletions setresolution/setresolution.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
{
"name": "setresolution",
"text": "Set HDMI Group to %1\\nHDMI Mode to %2\\nDisable Overscan %3\\nForce HDMI on boot to %4",
"script": "setresolution.sh",
"args": [
{
"type": "menu",
"options": [
"1",
"0",
"1",
"2"
]
},
{
"type": "menu",
"options": [
"31",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30",
"31",
"32",
"33",
"34",
"35",
"36",
"37",
"38",
"39",
"40",
"41",
"42",
"43",
"44",
"45",
"46",
"47",
"48",
"49",
"50",
"51",
"52",
"53",
"54",
"55",
"56",
"57",
"58",
"59",
"60",
"61",
"62",
"63",
"64",
"65",
"66",
"67",
"68",
"69",
"70",
"71",
"72",
"73",
"74",
"75",
"76",
"77",
"78",
"79",
"80",
"81",
"82",
"83",
"84",
"85",
"86"
]
},
{
"type": "menu",
"options": [
"0",
"1"
]
},
{
"type": "menu",
"options": [
"0",
"1"
]
}
],
"network": false,
"continue": true,
"type": "other",
"category":"other",
"supportedOperatingSystems": [
"raspbian-pibakery.img",
"raspbian-lite-pibakery.img"
],
"shortDescription":"Specify resolution",
"longDescription":"Changes the boot.txt to specify the hdmi resolution. See https://www.raspberrypi.org/documentation/configuration/config-txt.md for specs"
}
14 changes: 14 additions & 0 deletions setresolution/setresolution.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
filepath="/boot/config.txt";

valuename="hdmi_group" newvalue="$1";
sed -i "s+^#\?\(${valuename}\)=.*$+\1=${newvalue}+" "${filepath}";

valuename="hdmi_mode" newvalue="$2";
sed -i "s+^#\?\(${valuename}\)=.*$+\1=${newvalue}+" "${filepath}";

valuename="disable_overscan" newvalue="$3";
sed -i "s+^#\?\(${valuename}\)=.*$+\1=${newvalue}+" "${filepath}";

valuename="hdmi_force_hotplug" newvalue="$3";
sed -i "s+^#\?\(${valuename}\)=.*$+\1=${newvalue}+" "${filepath}";