created installable flatpak file, moved connect button a bit

This commit is contained in:
2024-11-19 02:55:03 +01:00
parent f7dd9eba0e
commit f709349ca2
9 changed files with 94 additions and 540 deletions

Binary file not shown.

View File

@@ -0,0 +1,3 @@
#!/bin/bash
flatpak-builder --force-clean --user --install-deps-from=flathub --repo=repo --install builddir com.angoosh.RDPConnect.yml
flatpak build-bundle repo RDPConnect.flatpak com.angoosh.RDPConnect --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo

View File

@@ -0,0 +1,6 @@
[Desktop Entry]
Name=RDP Connect
Exec=rdpconnect
Type=Application
Icon=com.angoosh.RDPConnect
Categories=Office;X-Tool;X-IT

View File

@@ -125,6 +125,7 @@
<property name="hexpand">True</property>
<property name="label">Connect</property>
<property name="valign">end</property>
<property name="margin-end">5</property>
</object>
</child>
</object>

View File

@@ -0,0 +1,59 @@
id: com.angoosh.RDPConnect
runtime: org.gnome.Platform
runtime-version: '47'
sdk: org.gnome.Sdk
command: rdpconnect
finish-args:
- --socket=x11
- --socket=wayland
- --share=network
- --filesystem=home
- --socket=system-bus
- --talk-name=org.freedesktop.Flatpak
modules:
- name: python
sources:
- type: archive
url: https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tar.xz
sha256: 06828c04a573c073a4e51c4292a27c1be4ae26621c3edc7cf9318418ce3b6d27
- name: rdpconnect
buildsystem: simple
build-commands:
- ls -l ./
- mkdir -p /app/share/icons/hicolor/scalable/apps/
- mkdir -p /app/share/applications/
- install -Dm755 rdpconnect.sh /app/bin/rdpconnect
- install -Dm755 main.py /app/
- install com.angoosh.RDPConnect.ui /app/
- install style-dark.css /app/
- install style-light.css /app/
- install -Dm644 com.angoosh.RDPConnect.svg /app/share/icons/hicolor/scalable/apps/
- install -Dm644 com.angoosh.RDPConnect.desktop /app/share/applications/
sources:
- type: script
dest-filename: rdpconnect.sh
commands:
- python3 /app/main.py
- type: file
path: main.py
- type: file
path: com.angoosh.RDPConnect.ui
- type: file
path: style-dark.css
- type: file
path: style-light.css
- type: file
path: com.angoosh.RDPConnect.svg
- type: file
path: com.angoosh.RDPConnect.desktop
- name: pip-deps
buildsystem: simple
build-options:
build-args:
- --share=network
build-commands:
- pip3 install PyGObject

View File

@@ -1,532 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="300mm"
height="300mm"
viewBox="0 0 300 300"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<g
id="layer1">
<path
style="fill:#000000;stroke:none"
d="M 79.84774,227.91491 455.0546,743.43673"
id="path8" />
<path
style="fill:#333333;stroke-width:0.264583"
d="M 31.997237,271.15608 282.23204,271.56629 255.9779,158.3453 50.046961,158.14019 Z"
id="path26" />
<rect
style="fill:#333333;stroke-width:0.264583"
id="rect26"
width="205.93092"
height="125.52761"
x="50.046959"
y="32.817677" />
<rect
style="fill:#0000ff;stroke-width:0.264583"
id="rect27"
width="195.2652"
height="111.99033"
x="55.174725"
y="41.227211"
ry="0" />
<rect
style="fill:#1a1a1a;stroke-width:0.264583"
id="rect28"
width="205.93094"
height="2.3587706"
x="50.149513"
y="157.11464" />
<path
style="fill:#1a1a1a;stroke-width:0.264583"
d="m 57.738605,166.95994 191.573205,0.20511 10.87085,53.94406 -211.161251,0.51278 z"
id="path28" />
<path
style="fill:#1a1a1a;stroke-width:0.264583"
d="m 192.70131,269.9254 -3.28177,-46.66263 -66.66091,0.20511 -3.07666,46.56009 z"
id="path29" />
<rect
style="fill:#333333;stroke-width:0.264583"
id="rect29"
width="209.52037"
height="1.4357735"
x="49.226521"
y="210.95615" />
<rect
style="fill:#333333;stroke-width:0.264583"
id="rect30"
width="207.05905"
height="1.6408839"
x="50.046959"
y="199.3674" />
<rect
style="fill:#333333;stroke-width:0.264583"
id="rect31"
width="201.93127"
height="1.2306629"
x="52.098068"
y="188.70166" />
<rect
style="fill:#333333;stroke-width:0.264583"
id="rect32"
width="199.3674"
height="1.6408839"
x="52.610844"
y="178.24103" />
<rect
style="fill:#333333;stroke-width:0.264583"
id="rect33"
width="196.90608"
height="1.6408839"
x="54.354279"
y="171.06215" />
<rect
style="fill:#333333;stroke-width:0.264583"
id="rect34"
width="1.5383288"
height="14.357735"
x="151.78177"
y="165.11395" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 62.251036,223.36533 2.153658,-11.99897 h 2.563882 L 64.302139,223.673 Z"
id="path34" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 76.967714,223.92938 2.666436,-12.30663 h 2.204937 l -3.179212,12.71685 z"
id="path35" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 92.863777,223.98066 2.922823,-12.20407 2.41005,-0.10256 -3.384325,12.51174 z"
id="path36" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 186.03522,222.75 -1.07683,-11.2298 1.84599,0.0513 1.07683,11.02469 z"
id="path37" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 260.10575,216.13519 v 0 l -24.99784,0.10255 -0.0769,0.87172 25.15167,-0.0256 z"
id="path38" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 250.2348,211.82786 1.74344,10.66575 0.79481,-0.0513 -1.64089,-10.92213 z"
id="path39" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 241.13303,211.80223 1.15374,10.84521 1.07683,0.0256 -1.46141,-10.97341 z"
id="path40" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 234.64641,211.8535 1.41013,10.48628 -1.48705,-0.17947 -1.23066,-10.40936 z"
id="path41" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 197.82777,212.00494 v 0 l 1.88546,9.9349 1.55912,0.21756 -2.10301,-10.22498 z"
id="path42" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 222.55624,211.75113 1.92172,10.58756 -1.37784,0.0363 -2.103,-10.73259 z"
id="path43" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 211.67862,211.82365 1.4866,10.29749 -2.50185,-0.43511 -0.72518,-10.11619 z"
id="path44" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 76.070869,200.4384 -2.030492,10.95014 h 1.957975 l 2.030489,-10.95014 z"
id="path45" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 229.51864,211.62275 -2.30749,-11.17852 -3.02538,-0.15383 2.9741,11.28107 z"
id="path46" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 230.5442,189.36826 2.76899,10.87086 2.10238,-0.15383 -3.12793,-10.7683 z"
id="path47" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 237.10773,179.01018 2.5126,10.46064 -2.25621,-0.25639 -2.10238,-10.05041 z"
id="path48" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 224.64727,171.93387 1.58961,7.23015 -1.79472,0.0513 -1.23066,-7.79419 z"
id="path49" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 71.634841,200.03401 2.410047,-10.66575 h -2.051105 l -2.204937,10.7683 z"
id="path50" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 71.275897,179.36913 -1.94855,9.8453 -1.897272,-0.15383 2.204937,-9.94786 z"
id="path51" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 64.763639,172.29281 -1.281941,6.6661 1.53833,-0.0513 1.28194,-6.51226 z"
id="path52" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 65.122583,172.19026 1.230662,-6.35842 1.07683,0.15383 -1.179385,6.4097 z"
id="path53" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 73.173168,178.95891 2.666437,-13.28091 1.845995,0.15384 -2.871547,13.17834 z"
id="path54" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 84.044024,178.85635 2.717716,-13.07579 h 2.410047 l -3.230489,13.48601 z"
id="path55" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 95.684045,178.90763 2.974102,-13.12707 h 1.845993 l -3.281765,13.22962 z"
id="path56" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 107.0164,178.90763 3.07666,-12.81941 2.25621,-0.10255 -3.58943,13.07579 z"
id="path57" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 121.06647,178.85635 2.76899,-12.56302 2.35877,-0.10255 -2.92282,13.02451 z"
id="path58" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 135.16782,178.85635 2.30749,-12.51174 2.35877,0.10256 -3.33305,12.76812 z"
id="path59" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 166.95994,178.70252 -1.1281,-12.40919 1.28194,0.0513 1.28194,12.66557 z"
id="path60" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 177.42058,166.39589 1.69216,12.46046 2.15366,-0.0513 -1.64088,-12.61429 z"
id="path61" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 191.16298,166.54972 2.25622,12.51174 2.92282,0.0513 -3.23049,-12.97324 z"
id="path62" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 204.82571,166.0651 2.93696,13.16193 2.57437,0.0725 -3.26329,-13.19818 z"
id="path63" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 220.67079,166.02884 2.2843,5.58385 1.19654,-0.10878 -1.70417,-5.185 z"
id="path64" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 234.41285,166.57272 1.77668,5.07623 h 2.57437 l -2.103,-5.29378 z"
id="path65" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 82.556973,179.21529 -2.666436,10.05042 2.41005,0.0513 2.307492,-9.84531 z"
id="path66" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 86.146409,189.5221 -2.974102,10.51191 2.461323,0.10255 2.666437,-10.66574 z"
id="path67" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 89.889675,200.44423 -2.61516,11.17852 1.589606,0.10256 2.615161,-11.43491 z"
id="path68" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 93.786774,179.52296 -2.768992,9.69147 2.204937,-0.10255 2.41005,-9.69147 z"
id="path69" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 98.19665,189.57337 -3.025381,10.51192 h 2.204937 l 2.61516,-10.71703 z"
id="path70" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 102.1963,200.59806 -3.076654,10.87086 2.051104,0.15383 2.9741,-11.43491 z"
id="path71" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 105.06785,179.72807 -2.82027,9.53764 h 2.25622 l 2.71771,-9.94786 z"
id="path72" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 117.57959,179.42041 -2.87155,9.89658 2.05111,-0.0513 3.02538,-9.94786 z"
id="path73" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 128.96322,179.57424 -2.0511,9.53764 h 1.79472 l 2.30749,-9.74275 z"
id="path74" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 140.39813,179.52296 -1.23066,9.69147 2.30749,0.0513 0.87172,-9.89658 z"
id="path75" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 151.73049,179.62552 0.20511,9.69147 1.69216,0.0513 -0.35894,-9.79402 z"
id="path76" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 163.47306,179.47168 1.12811,10.15297 2.35877,-0.0513 -1.5896,-10.35808 z"
id="path77" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 177.06164,179.47168 1.94854,9.79403 2.46133,0.15383 -2.61516,-10.05041 z"
id="path78" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 190.08615,179.42041 1.94855,9.94785 2.05111,-0.10255 -2.3075,-10.35808 z"
id="path79" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 204.75155,179.42041 3.17921,9.8453 1.79472,-0.10256 -3.48688,-9.8453 z"
id="path80" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 218.75034,179.47168 3.33305,9.94786 2.35877,-0.10255 -3.53816,-9.94786 z"
id="path81" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 110.14434,189.21443 -3.07666,10.7683 h 1.69216 l 3.12793,-10.7683 z"
id="path84" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 113.4261,200.59806 -2.41004,11.17853 1.43577,-0.10256 2.41005,-10.92213 z"
id="path85" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 123.37396,189.62465 -2.76899,10.56319 -1.02555,-0.35894 2.61516,-10.20425 z"
id="path86" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 127.06595,200.80317 -2.87155,10.87086 -1.48705,-0.15383 2.82027,-11.12725 z"
id="path87" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 135.11654,189.41954 -1.79472,10.56319 1.74344,0.10256 1.48705,-10.51192 z"
id="path90" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 137.98809,200.39295 -0.0513,1.69216 -1.12811,9.53764 1.94855,0.0513 1.07683,-11.48619 z"
id="path91" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 147.26934,189.5221 -0.76917,10.56319 1.74344,-0.0513 0.61533,-10.7683 z"
id="path92" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 151.73049,200.49551 0.15383,0.41022 0.30767,10.35808 h 1.5896 l -0.30766,-10.87086 z"
id="path93" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 160.49896,189.72721 1.3845,10.51191 1.5896,-0.0513 -1.74344,-10.87085 z"
id="path94" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 166.49845,200.70062 2.71771,10.87085 1.5896,-0.0513 -2.5126,-11.12725 z"
id="path95" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 174.03625,189.26571 2.87155,10.7683 h 1.48705 l -2.61515,-11.07597 z"
id="path96" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 187.36844,189.62465 2.9741,10.46064 1.48705,0.0513 -2.76899,-10.51191 z"
id="path97" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 202.03384,189.77848 3.33304,10.35808 1.58961,0.15384 -3.07666,-10.97341 z"
id="path98" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 216.03263,189.77848 3.79454,10.46064 1.79472,-0.0513 -4.05093,-10.87085 -1.79472,0.10255 z"
id="path99" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 182.1894,200.2904 3.4356,11.12724 1.53833,0.0513 -3.12794,-11.38363 z"
id="path100" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 197.3163,200.2904 3.84582,11.2298 -1.79472,-0.25639 -3.58943,-11.07597 h 1.17938 z"
id="path101" />
<path
style="fill:#333333;stroke-width:0.264583"
d="m 210.08442,200.39295 3.33305,11.2298 h 1.23066 l -3.23049,-11.48619 z"
id="path102" />
<path
style="fill:#ff0000;stroke-width:0.264583"
id="path103"
d="m 151.01261,199.90581 a 3.4356008,3.4099619 0 0 1 -2.96429,3.37772 3.4356008,3.4099619 0 0 1 -3.7776,-2.45098 3.4356008,3.4099619 0 0 1 1.92784,-4.0502 3.4356008,3.4099619 0 0 1 4.30653,1.33974" />
<path
style="fill:#ff0000;stroke-width:0.264583"
id="path104"
d="m 148.75639,200.49551 a 0.84608078,1.2306629 0 0 1 -0.73001,1.21903 0.84608078,1.2306629 0 0 1 -0.93031,-0.88456 0.84608078,1.2306629 0 0 1 0.47477,-1.46173 0.84608078,1.2306629 0 0 1 1.06056,0.48352" />
<path
style="fill:#00ff00;stroke-width:0.264583"
id="path105"
d="m 248.40873,163.27316 a 6.8347754,2.6831479 0 0 1 -5.89715,2.65778 6.8347754,2.6831479 0 0 1 -7.51514,-1.92857 6.8347754,2.6831479 0 0 1 3.83523,-3.18691 6.8347754,2.6831479 0 0 1 8.56741,1.05417" />
<path
style="fill:#4d4d4d;stroke-width:0.264583"
id="path106"
d="m 247.35722,163.21878 a 5.5838485,2.3749483 0 0 1 -4.81783,2.35249 5.5838485,2.3749483 0 0 1 -6.13969,-1.70704 5.5838485,2.3749483 0 0 1 3.13329,-2.82085 5.5838485,2.3749483 0 0 1 6.99937,0.93309" />
<path
style="fill:#00ff00;stroke-width:0.264583"
id="path107"
d="m 242.67985,163.23691 a 0.90646887,0.47136381 0 0 1 -0.78212,0.46691 0.90646887,0.47136381 0 0 1 -0.9967,-0.33881 0.90646887,0.47136381 0 0 1 0.50865,-0.55986 0.90646887,0.47136381 0 0 1 1.13626,0.18519" />
<rect
style="fill:#2a7fff;stroke-width:0.264583"
id="rect107"
width="195.25558"
height="6.7654347"
x="55.184338"
y="146.45209"
ry="0" />
<rect
style="fill:#80b3ff;stroke-width:0.255309"
id="rect108"
width="8.9223061"
height="6.7173686"
x="55.200363"
y="146.44891" />
<rect
style="fill:#2a7fff;stroke-width:0.264583"
id="rect109"
width="0.69224793"
height="6.7173691"
x="59.328209"
y="146.47453" />
<rect
style="fill:#2a7fff;stroke-width:0.264583"
id="rect110"
width="9.28125"
height="0.66660911"
x="55.200359"
y="149.44862" />
<rect
style="fill:#80b3ff;stroke-width:0.264583"
id="rect111"
width="35.663589"
height="6.7430077"
x="214.75069"
y="146.47453" />
<rect
style="fill:#4d4d4d;stroke-width:0.264583"
id="rect112"
width="165.42162"
height="90.248627"
x="76.301102"
y="52.405731" />
<rect
style="fill:#ff0000;stroke-width:0.683704"
id="rect113"
width="9.3383827"
height="5.9639702"
x="232.37833"
y="52.407501" />
<rect
style="fill:#000080;stroke-width:0.264583"
id="rect114"
width="161.13391"
height="81.364647"
x="78.608986"
y="59.319324" />
<rect
style="fill:#666666;stroke-width:0.264583"
id="rect115"
width="8.7564898"
height="5.9464359"
x="223.51711"
y="52.430161" />
<rect
style="fill:#666666;stroke-width:0.264583"
id="rect116"
width="8.2851257"
height="5.9645653"
x="215.03255"
y="52.412029" />
<rect
style="fill:#999999;stroke-width:0.264583"
id="rect117"
width="5.4750719"
height="0.94272763"
x="216.62794"
y="56.418625" />
<rect
style="fill:#999999;stroke-width:0.264583"
id="rect118"
width="6.0189533"
height="4.042851"
x="225.02184"
y="53.391018" />
<rect
style="fill:#666666;stroke-width:0.264583"
id="rect119"
width="5.221241"
height="2.8644409"
x="225.43883"
y="54.279358"
ry="0" />
<path
style="fill:#666666;stroke-width:0.264583"
d="m 239.32591,53.644828 -5.54758,3.063865 0.21755,0.398846 5.54759,-2.991347 z"
id="path119" />
<path
style="fill:#666666;stroke-width:0.264583"
d="m 233.66955,53.717345 5.40255,3.390194 0.41698,-0.489492 -5.56572,-3.263289 z"
id="path120" />
<rect
style="fill:#5f8dd3;stroke-width:0.264583"
id="rect120"
width="161.1143"
height="7.691638"
x="78.634232"
y="132.98853" />
<rect
style="fill:#2ca02c;stroke-width:0.264583"
id="rect121"
width="17.126726"
height="7.2814226"
x="78.762428"
y="133.11671"
ry="0" />
<path
style="fill:#2ca02c;stroke-width:0.545668"
id="path121"
d="m 101.36135,136.74084 a 5.3209724,3.6349404 0 0 1 -4.591021,3.60058 5.3209724,3.6349404 0 0 1 -5.85065,-2.61269 5.3209724,3.6349404 0 0 1 2.985783,-4.31741 5.3209724,3.6349404 0 0 1 6.669858,1.42812" />
<rect
style="fill:#2a7fff;stroke-width:0.264583"
id="rect122"
width="20.703749"
height="7.5055623"
x="218.78534"
y="133.06963" />
<rect
style="fill:#b3b3b3;stroke-width:0.264583"
id="rect123"
width="85.325966"
height="53.021065"
x="92.402283"
y="68.09668" />
<rect
style="fill:#e6e6e6;stroke-width:0.264583"
id="rect124"
width="59.071823"
height="46.457527"
x="158.24275"
y="81.736534" />
<rect
style="fill:#ff0000;stroke-width:0.264583"
id="rect125"
width="4.4098754"
height="2.9741023"
x="173.29274"
y="68.096687" />
<rect
style="fill:#ff0000;stroke-width:0.264583"
id="rect126"
width="4.1919456"
height="2.5638812"
x="213.09698"
y="81.749352" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -17,8 +17,6 @@ from gi.repository import Gtk, Adw, Gdk, Gio
APPID = "com.angoosh.RDPConnect"
HOMEDIR = os.path.expanduser('~')
print(HOMEDIR)
conn_info = {}
settings = {}
@@ -52,10 +50,13 @@ class MyApp(Adw.Application):
def on_activate(self, app):
builder = Gtk.Builder()
builder.add_from_file(APPID+".ui")
builder.add_from_file("/app/"+APPID+".ui")
css_provider = Gtk.CssProvider()
css_provider.load_from_file(Gio.File.new_for_path("style.css"))
if Adw.StyleManager().get_default().get_dark():
css_provider.load_from_file(Gio.File.new_for_path("/app/style-dark.css"))
else:
css_provider.load_from_file(Gio.File.new_for_path("/app/style-light.css"))
Gtk.StyleContext.add_provider_for_display(Gdk.Display.get_default(), css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
connect = builder.get_object("connect")
@@ -80,7 +81,7 @@ class MyApp(Adw.Application):
self.win = builder.get_object("main_window")
self.win.set_application(self)
self.win.present()
def saveConnConf(self):
if settings["save_conn"]:
print("Saving connection config to "+HOMEDIR+"/.config/rdpconnect/connection.json")
@@ -109,7 +110,7 @@ class MyApp(Adw.Application):
settings["extra_params"] = []
self.saveConnConf()
subprocess.Popen(["flatpak", "run", "com.freerdp.FreeRDP", "/v:"+str(conn_info["ip"]), "/u:"+str(conn_info["user"]), "/p:"+str(conn_info["passwd"])]+settings["extra_params"])
subprocess.Popen(["flatpak-spawn", "--host", "com.freerdp.FreeRDP", "/v:"+str(conn_info["ip"]), "/u:"+str(conn_info["user"]), "/p:"+str(conn_info["passwd"])]+settings["extra_params"])
#subprocess.run(["xfreerdp", "/v:"+str(ip), "/u:"+str(user), "/p:"+str(passwd)])
if not os.path.isdir(HOMEDIR+"/.config/rdpconnect"):

View File

@@ -10,5 +10,6 @@ textentry{
}
window{
background-color: #303030;
}
background-color: @window_bg_color;
color: @window_fg_color;
}

View File

@@ -0,0 +1,15 @@
text{
font-size: 16pt;
}
textentry{
font-size: 16pt;
background-color: #E0E0E0;
border-radius: 6pt;
}
window{
background-color: @window_bg_color;
color: @window_fg_color;
}