diff --git a/.import/icon.png-bce08264caa064c6c37c915877805b7a.md5 b/.import/icon.png-bce08264caa064c6c37c915877805b7a.md5 new file mode 100644 index 0000000..d82ed40 --- /dev/null +++ b/.import/icon.png-bce08264caa064c6c37c915877805b7a.md5 @@ -0,0 +1,3 @@ +source_md5="bad161405724e1c36ce3ac4311ca92e6" +dest_md5="6c2faec7178c27d5b7372870eaff55ee" + diff --git a/.import/icon.png-bce08264caa064c6c37c915877805b7a.stex b/.import/icon.png-bce08264caa064c6c37c915877805b7a.stex new file mode 100644 index 0000000..b559bef Binary files /dev/null and b/.import/icon.png-bce08264caa064c6c37c915877805b7a.stex differ diff --git a/.import/logout.png-fdf953280127b7ae22ebc6d7696d27a4.md5 b/.import/logout.png-fdf953280127b7ae22ebc6d7696d27a4.md5 new file mode 100644 index 0000000..fc4301c --- /dev/null +++ b/.import/logout.png-fdf953280127b7ae22ebc6d7696d27a4.md5 @@ -0,0 +1,3 @@ +source_md5="8359752bf3ade1ec85a8db2de451cb9f" +dest_md5="3e9af54f1fead03dc52751339681e627" + diff --git a/.import/logout.png-fdf953280127b7ae22ebc6d7696d27a4.stex b/.import/logout.png-fdf953280127b7ae22ebc6d7696d27a4.stex new file mode 100644 index 0000000..5ca0af4 Binary files /dev/null and b/.import/logout.png-fdf953280127b7ae22ebc6d7696d27a4.stex differ diff --git a/binaries/x86_64/icon.png.import b/binaries/x86_64/icon.png.import new file mode 100644 index 0000000..fdd94ac --- /dev/null +++ b/binaries/x86_64/icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon.png-bce08264caa064c6c37c915877805b7a.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://binaries/x86_64/icon.png" +dest_files=[ "res://.import/icon.png-bce08264caa064c6c37c915877805b7a.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/binaries/x86_64/power-can b/binaries/x86_64/power-can index 3647ca4..354b3c5 100755 Binary files a/binaries/x86_64/power-can and b/binaries/x86_64/power-can differ diff --git a/export_presets.cfg b/export_presets.cfg index 4ac66aa..1a25d28 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -7,7 +7,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="./power.x86_64" +export_path="binaries/x86_64/power-can" script_export_mode=1 script_encryption_key="" diff --git a/src/main.gd b/src/main.gd index 16e0ab4..ae5ae2b 100644 --- a/src/main.gd +++ b/src/main.gd @@ -23,7 +23,8 @@ func _on_reboot_pressed(): func _on_shutdown_pressed(): OS.execute("xterm", ["-e", "sudo poweroff"]) - - func _on_back_pressed(): get_tree().quit() + +func _on_logout_pressed(): + OS.execute("xterm", ["-e", "sudo pkill -KILL -u $USER"]) diff --git a/src/main.tscn b/src/main.tscn index 0703dd1..81e59db 100644 --- a/src/main.tscn +++ b/src/main.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=7 format=2] [ext_resource path="res://textures/shutdown.png" type="Texture" id=1] [ext_resource path="res://textures/reboot.png" type="Texture" id=2] [ext_resource path="res://src/main.gd" type="Script" id=3] [ext_resource path="res://textures/back.png" type="Texture" id=4] [ext_resource path="res://textures/white.png" type="Texture" id=5] +[ext_resource path="res://textures/logout.png" type="Texture" id=6] [node name="main" type="Node2D"] position = Vector2( 0, -80 ) @@ -16,15 +17,20 @@ scale = Vector2( 1.11771, 1.11771 ) texture = ExtResource( 5 ) [node name="reboot" type="TouchScreenButton" parent="."] -position = Vector2( 96, 155 ) +position = Vector2( 24, 160 ) scale = Vector2( 0.3, 0.3 ) normal = ExtResource( 2 ) [node name="shutdown" type="TouchScreenButton" parent="."] -position = Vector2( 264, 155 ) +position = Vector2( 184, 160 ) scale = Vector2( 0.3, 0.3 ) normal = ExtResource( 1 ) +[node name="logout" type="TouchScreenButton" parent="."] +position = Vector2( 352, 160 ) +scale = Vector2( 0.3, 0.3 ) +normal = ExtResource( 6 ) + [node name="back" type="TouchScreenButton" parent="."] position = Vector2( 0, 80 ) scale = Vector2( 0.125, 0.125 ) @@ -32,4 +38,5 @@ normal = ExtResource( 4 ) [connection signal="pressed" from="reboot" to="." method="_on_reboot_pressed"] [connection signal="pressed" from="shutdown" to="." method="_on_shutdown_pressed"] +[connection signal="pressed" from="logout" to="." method="_on_logout_pressed"] [connection signal="pressed" from="back" to="." method="_on_back_pressed"] diff --git a/textures/logout.png b/textures/logout.png new file mode 100644 index 0000000..6c0615f Binary files /dev/null and b/textures/logout.png differ diff --git a/textures/logout.png.import b/textures/logout.png.import new file mode 100644 index 0000000..82bdfc5 --- /dev/null +++ b/textures/logout.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/logout.png-fdf953280127b7ae22ebc6d7696d27a4.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://textures/logout.png" +dest_files=[ "res://.import/logout.png-fdf953280127b7ae22ebc6d7696d27a4.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0