Skip to content

Commit

Permalink
add flameshot
Browse files Browse the repository at this point in the history
  • Loading branch information
thelamer committed Apr 27, 2024
1 parent 0bfc683 commit b28a302
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 0 deletions.
30 changes: 30 additions & 0 deletions apps/flameshot/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
ARG REPO
FROM ghcr.io/${REPO}:alpine-edge-av as rootfs
ARG REPO

# Install packages
RUN \
echo "**** install packages ****" && \
apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
flameshot && \
echo "**** customize desktop file ****" && \
sed -i \
-e "/^Exec=/c Exec=/bin/sh -c \"\$HOME\/.local\/bin\/proot-apps run ghcr.io/${REPO}:flameshot %U\"" \
-e "s/Name=Flameshot/Name=Flameshot PA/g" \
-e '/^TryExec=/d' \
/usr/share/applications/org.flameshot.Flameshot.desktop && \
mv \
/usr/share/applications/org.flameshot.Flameshot.desktop \
/usr/share/applications/flameshot-pa.desktop && \
echo "**** set bin name ****" && \
echo "flameshot-pa" > /bin-name && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*

COPY ./entrypoint /entrypoint
COPY ./install /install
COPY ./remove /remove

FROM scratch
COPY --from=rootfs / /
4 changes: 4 additions & 0 deletions apps/flameshot/entrypoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

# Start Flameshot
flameshot "$@"
19 changes: 19 additions & 0 deletions apps/flameshot/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

## Desktop and icons install ##
echo "Adding icon"
mkdir -p $HOME/.local/share/icons/hicolor/scalable/apps/
cp \
/usr/share/icons/hicolor/scalable/apps/org.flameshot.Flameshot.svg \
$HOME/.local/share/icons/hicolor/scalable/apps/
echo "Adding start menu entry"
mkdir -p $HOME/.local/share/applications/
cp \
/usr/share/applications/flameshot-pa.desktop \
$HOME/.local/share/applications/
echo "Adding desktop shortcut"
mkdir -p $HOME/Desktop
cp \
/usr/share/applications/flameshot-pa.desktop \
$HOME/Desktop/
chmod +x $HOME/Desktop/flameshot-pa.desktop
7 changes: 7 additions & 0 deletions apps/flameshot/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
echo "Removing icon"
rm -f $HOME/.local/share/icons/hicolor/scalable/apps/org.flameshot.Flameshot.svg
echo "Removing start menu entry"
rm -f $HOME/.local/share/applications/flameshot-pa.desktop
echo "Removing desktop shortcut"
rm -f $HOME/Desktop/flameshot-pa.desktop
8 changes: 8 additions & 0 deletions metadata/img/flameshot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions metadata/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ include:
arch: linux/amd64,linux/arm64
icon: firefox-dev.svg
description: "The browser made for developers, all the latest developer tools in beta in addition to features like the Multi-line Console Editor and WebSocket Inspector. A separate profile and path so you can easily run it alongside Release or Beta Firefox. Preferences tailored for web developers: Browser and remote debugging are enabled by default, as are the dark theme and developer toolbar button."
- name: flameshot
full_name: Flameshot
arch: linux/amd64,linux/arm64
icon: flameshot.svg
description: "Flameshot is a free and open-source, cross-platform tool to take screenshots with many built-in features to save you time."
- name: freecad
full_name: FreeCAD
arch: linux/amd64,linux/arm64
Expand Down

0 comments on commit b28a302

Please sign in to comment.