Skip to content

Commit f992b71

Browse files
committed
Fix deployed tray remote looking weird
1 parent ce4ac59 commit f992b71

File tree

8 files changed

+50
-35
lines changed

8 files changed

+50
-35
lines changed

.github/workflows/build-tray.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,11 @@ jobs:
3939
sudo apt-get update
4040
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
4141
42-
- name: Install dependencies (Windows)
43-
if: matrix.platform == 'windows-latest'
44-
run: choco install rsvg-convert -y
45-
46-
- name: Install dependencies (macOS)
47-
if: matrix.platform == 'macos-latest'
48-
run: brew install librsvg
42+
- name: Download icons
43+
uses: actions/download-artifact@v4
44+
with:
45+
name: icons
46+
path: lgtv-tray-remote/src-tauri/icons/
4947

5048
- name: Setup Rust
5149
uses: dtolnay/rust-toolchain@stable
@@ -66,11 +64,6 @@ jobs:
6664
sed -i.bak "s/\"version\": \"[^\"]*\"/\"version\": \"$VERSION\"/" src-tauri/tauri.conf.json
6765
sed -i.bak "s/^version = \"[^\"]*\"/version = \"$VERSION\"/" src-tauri/Cargo.toml
6866
69-
- name: Generate icons
70-
shell: bash
71-
working-directory: lgtv-tray-remote
72-
run: ./generate-icons.sh
73-
7467
- name: Install Tauri CLI
7568
run: cargo install tauri-cli
7669

.github/workflows/release.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@ permissions:
1414
contents: write
1515

1616
jobs:
17-
# Get version from tag or input
17+
# Get version and generate icons
1818
prepare:
1919
runs-on: ubuntu-latest
2020
outputs:
2121
version: ${{ steps.version.outputs.version }}
2222
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
2326
- name: Get version
2427
id: version
2528
run: |
@@ -29,14 +32,29 @@ jobs:
2932
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
3033
fi
3134
35+
- name: Install icon tools
36+
run: |
37+
sudo apt-get update
38+
sudo apt-get install -y librsvg2-bin imagemagick icoutils
39+
40+
- name: Generate icons
41+
working-directory: lgtv-tray-remote
42+
run: ./generate-icons.sh
43+
44+
- name: Upload icons
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: icons
48+
path: lgtv-tray-remote/src-tauri/icons/
49+
3250
# Build KDE Plasmoid
3351
build-plasmoid:
3452
needs: prepare
3553
uses: ./.github/workflows/build-plasmoid.yml
3654
with:
3755
version: ${{ needs.prepare.outputs.version }}
3856

39-
# Build Tauri tray app
57+
# Build Tauri tray app (needs prepare for icons artifact)
4058
build-tray:
4159
needs: prepare
4260
uses: ./.github/workflows/build-tray.yml

lgtv-tray-remote/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Or add to your NixOS configuration:
2929
```nix
3030
nix.settings = {
3131
substituters = [ "https://lgtv-tray-remote.cachix.org" ];
32-
trusted-public-keys = [ "lgtv-tray-remote.cachix.org-1:lgtv-tray-remote.cachix.org-1:no3KeuRIc/+Msy8eQLsIVy29FZ85KI2GC6/jJkMMrvg=" ];
32+
trusted-public-keys = [ "lgtv-tray-remote.cachix.org-1:no3KeuRIc/+Msy8eQLsIVy29FZ85KI2GC6/jJkMMrvg=" ];
3333
};
3434
```
3535

lgtv-tray-remote/flake.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@
9595
imagemagick
9696
makeWrapper
9797
copyDesktopItems
98+
fontconfig
99+
dejavu_fonts
98100
];
99101

100102
inherit buildInputs;
@@ -140,7 +142,9 @@ EOF
140142
wrapProgram $out/bin/lgtv-tray-remote \
141143
--prefix LD_LIBRARY_PATH : "${pkgs.lib.makeLibraryPath (buildInputs ++ runtimeLibs)}" \
142144
--set WEBKIT_DISABLE_COMPOSITING_MODE 1 \
143-
--set WEBKIT_DISABLE_DMABUF_RENDERER 1
145+
--set WEBKIT_DISABLE_DMABUF_RENDERER 1 \
146+
--set FONTCONFIG_FILE "${pkgs.fontconfig.out}/etc/fonts/fonts.conf" \
147+
--prefix XDG_DATA_DIRS : "${pkgs.dejavu_fonts}/share"
144148
145149
runHook postInstall
146150
'';

lgtv-tray-remote/generate-icons.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ else
3434
fi
3535

3636
# Generate Windows .ico
37-
if command -v convert &> /dev/null; then
37+
if command -v magick &> /dev/null; then
3838
echo "Generating Windows .ico..."
39-
convert "$ICON_DIR/32x32.png" "$ICON_DIR/128x128.png" "$ICON_DIR/128x128@2x.png" "$ICON_DIR/icon.ico"
39+
magick "$ICON_DIR/32x32.png" "$ICON_DIR/128x128.png" "$ICON_DIR/128x128@2x.png" "$ICON_DIR/icon.ico"
4040
elif command -v icotool &> /dev/null; then
4141
icotool -c -o "$ICON_DIR/icon.ico" "$ICON_DIR/32x32.png" "$ICON_DIR/128x128.png"
4242
else

lgtv-tray-remote/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"label": "main",
1919
"title": "LG TV Remote",
2020
"width": 320,
21-
"height": 500,
21+
"height": 520,
2222
"resizable": true,
2323
"visible": false,
2424
"decorations": false,

lgtv-tray-remote/src/index.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ <h1>LG TV Remote</h1>
1616
<span id="status-dot" class="dot disconnected"></span>
1717
<span id="status-text">Not Connected</span>
1818
</div>
19-
<button class="btn-icon quit-btn" onclick="quitApp()" title="Quit">&#10005;</button>
19+
<button class="btn-icon quit-btn" onclick="quitApp()" title="Quit">&times;</button>
2020
</div>
2121
</header>
2222

2323
<!-- Settings Panel (collapsible) -->
2424
<section id="settings-panel" class="settings collapsed">
2525
<button class="settings-toggle" onclick="toggleSettings()">
26-
<span class="icon">&#9881;</span> Settings
27-
<span class="arrow">&#9662;</span>
26+
<span class="icon">&#x2699;</span> Settings
27+
<span class="arrow">&#x25BC;</span>
2828
</button>
2929
<div class="settings-content">
3030
<div class="field">
@@ -66,42 +66,42 @@ <h1>LG TV Remote</h1>
6666
<section class="dpad">
6767
<div class="dpad-grid">
6868
<div></div>
69-
<button class="btn dpad-btn" onclick="sendButton('UP')" title="Up">&#9650;</button>
69+
<button class="btn dpad-btn" onclick="sendButton('UP')" title="Up">&uarr;</button>
7070
<div></div>
71-
<button class="btn dpad-btn" onclick="sendButton('LEFT')" title="Left">&#9664;</button>
71+
<button class="btn dpad-btn" onclick="sendButton('LEFT')" title="Left">&larr;</button>
7272
<button class="btn dpad-btn ok-btn" onclick="sendButton('ENTER')" title="OK">OK</button>
73-
<button class="btn dpad-btn" onclick="sendButton('RIGHT')" title="Right">&#9654;</button>
73+
<button class="btn dpad-btn" onclick="sendButton('RIGHT')" title="Right">&rarr;</button>
7474
<div></div>
75-
<button class="btn dpad-btn" onclick="sendButton('DOWN')" title="Down">&#9660;</button>
75+
<button class="btn dpad-btn" onclick="sendButton('DOWN')" title="Down">&darr;</button>
7676
<div></div>
7777
</div>
7878
</section>
7979

8080
<!-- Volume Controls -->
8181
<section class="volume">
8282
<button class="btn" onclick="volumeDown()" title="Volume Down">
83-
<span class="icon">&#128265;</span> Vol -
83+
<span class="icon">-</span> Vol
8484
</button>
85-
<button class="btn icon-btn" onclick="setMute(true)" title="Mute">&#128263;</button>
86-
<button class="btn icon-btn" onclick="setMute(false)" title="Unmute">&#128266;</button>
85+
<button class="btn icon-btn" onclick="setMute(true)" title="Mute">M</button>
86+
<button class="btn icon-btn" onclick="setMute(false)" title="Unmute">U</button>
8787
<button class="btn" onclick="volumeUp()" title="Volume Up">
88-
Vol + <span class="icon">&#128266;</span>
88+
Vol <span class="icon">+</span>
8989
</button>
9090
</section>
9191

9292
<!-- Quick Actions -->
9393
<section class="actions">
9494
<button class="btn action-btn" onclick="powerOn()" title="Power On">
95-
<span class="icon">&#9211;</span> Power On
95+
Power On
9696
</button>
9797
<button class="btn action-btn danger" onclick="powerOff()" title="Power Off">
98-
<span class="icon">&#9211;</span> Power Off
98+
Power Off
9999
</button>
100100
<button class="btn action-btn" onclick="sendButton('HOME')" title="Home">
101-
<span class="icon">&#8962;</span> Home
101+
Home
102102
</button>
103103
<button class="btn action-btn" onclick="sendButton('BACK')" title="Back">
104-
<span class="icon">&#8592;</span> Back
104+
&larr; Back
105105
</button>
106106
</section>
107107

lgtv-tray-remote/src/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020

2121
body {
22-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
22+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, 'Noto Sans', 'DejaVu Sans', sans-serif;
2323
background: var(--bg-primary);
2424
color: var(--text-primary);
2525
user-select: none;

0 commit comments

Comments
 (0)