Skip to content

Commit

Permalink
flatpak apps inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
zachvlat committed Apr 15, 2024
1 parent e7863b4 commit 17951f6
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 90 deletions.
147 changes: 81 additions & 66 deletions appData.json
Original file line number Diff line number Diff line change
@@ -1,99 +1,114 @@
[
{
{
"icon": "firefox",
"title": "Firefox",
"subtitle": "The best browser",
"command": "winget install --id=Mozilla.Firefox -e"
},
{
"command": "winget install --id=Mozilla.Firefox -e",
"flatpakcommand": "flatpak install flathub org.mozilla.firefox"
},
{
"icon": "google-chrome",
"title": "ungoogled-chromium",
"subtitle": "The 2nd best browser",
"command": "winget install -e --id eloston.ungoogled-chromium"
},
{
"command": "winget install -e --id eloston.ungoogled-chromium",
"flatpakcommand": "flatpak install flathub com.github.Eloston.UngoogledChromium"
},
{
"icon": "vlc",
"title": "VLC",
"subtitle": "VLC is a free and open source cross-platform multimedia player",
"command": "winget install --id=VideoLAN.VLC -e"
},
{
"command": "winget install --id=VideoLAN.VLC -e",
"flatpakcommand": "flatpak install flathub org.videolan.VLC"
},
{
"icon": "spotify",
"title": "Spotube",
"subtitle": "The best Spotify alternative",
"command": "winget install -e --id KRTirtho.Spotube"
},
{
"command": "winget install -e --id KRTirtho.Spotube",
"flatpakcommand": "flatpak install flathub com.spotify.Client"
},
{
"icon": "steam",
"title": "Steam",
"subtitle": "The best game library",
"command": "winget install --id=Valve.Steam -e"
},
{
"command": "winget install --id=Valve.Steam -e",
"flatpakcommand": "flatpak install flathub com.valvesoftware.Steam"
},
{
"icon": "note",
"title": "Notepad++",
"subtitle": "The best text-editor",
"command": "winget install --id=Notepad++.Notepad++ -e"
},
{
"command": "winget install --id=Notepad++.Notepad++ -e",
"flatpakcommand": "Not available in Flatpak"
},
{
"icon": "chat-processing",
"title": "Signal",
"subtitle": "The best messenger",
"command": "winget install --id=OpenWhisperSystems.Signal -e"
},
{
"command": "winget install --id=OpenWhisperSystems.Signal -e",
"flatpakcommand": "flatpak install flathub org.signal.Signal"
},
{
"icon": "send-circle",
"title": "Telegram",
"subtitle": "The best messenger",
"command": "winget install --id=Telegram.TelegramDesktop -e"
},
{
"command": "winget install --id=Telegram.TelegramDesktop -e",
"flatpakcommand": "flatpak install flathub org.telegram.desktop"
},
{
"icon": "vector-circle",
"title": "Element",
"subtitle": "The best group chat",
"command": "winget install -e --id Element.Element"
},
{
"command": "winget install -e --id Element.Element",
"flatpakcommand": "flatpak install flathub im.riot.Riot"
},
{
"icon": "mail",
"title": "Thunderbird",
"subtitle": "The best mail client",
"command": "winget install -e --id Mozilla.Thunderbird"
},
{
"command": "winget install -e --id Mozilla.Thunderbird",
"flatpakcommand": "flatpak install flathub org.mozilla.thunderbird"
},
{
"icon": "keyboard",
"title": "Playnite",
"subtitle":"An open source video game library manager and launcher",
"command": "winget install -e --id Playnite.Playnite"
},
{
"icon":"fire",
"title":"Flameshot",
"subtitle":"Powerful yet simple to use screenshot software.",
"command":"winget install -e --id Flameshot.Flameshot"
},
{
"icon":"sword",
"title":"Heroic Games Launcher",
"subtitle":"Heroic is an Open Source Game Launcher.",
"command":"winget install -e --id HeroicGamesLauncher.HeroicGamesLauncher"
},
{
"icon":"download-circle",
"title":"qBittorrent",
"subtitle":"qBittorrent is a bittorrent client.",
"command":"winget install -e --id qBittorrent.qBittorrent"
},
{
"icon":"microsoft-visual-studio-code",
"title":"Visual Studio Code",
"subtitle":"Visual Studio Code is a code editor.",
"command":"winget install -e --id Microsoft.VisualStudioCode"
},
{
"icon":"monitor-cellphone",
"title":"KDE Connect",
"subtitle":"Enabling communication between all your devices.",
"command":"winget install -e --id KDE.KDEConnect"
}
]

"subtitle": "An open source video game library manager and launcher",
"command": "winget install -e --id Playnite.Playnite",
"flatpakcommand": "Not available in Flatpak"
},
{
"icon": "fire",
"title": "Flameshot",
"subtitle": "Powerful yet simple to use screenshot software.",
"command": "winget install -e --id Flameshot.Flameshot",
"flatpakcommand": "flatpak install flathub org.flameshot.Flameshot"
},
{
"icon": "sword",
"title": "Heroic Games Launcher",
"subtitle": "Heroic is an Open Source Game Launcher.",
"command": "winget install -e --id HeroicGamesLauncher.HeroicGamesLauncher",
"flatpakcommand": "Not available in Flatpak"
},
{
"icon": "download-circle",
"title": "qBittorrent",
"subtitle": "qBittorrent is a bittorrent client.",
"command": "winget install -e --id qBittorrent.qBittorrent",
"flatpakcommand": "flatpak install flathub org.qbittorrent.qBittorrent"
},
{
"icon": "microsoft-visual-studio-code",
"title": "Visual Studio Code",
"subtitle": "Visual Studio Code is a code editor.",
"command": "winget install -e --id Microsoft.VisualStudioCode",
"flatpakcommand": "flatpak install flathub com.visualstudio.code"
},
{
"icon": "monitor-cellphone",
"title": "KDE Connect",
"subtitle": "Enabling communication between all your devices.",
"command": "winget install -e --id KDE.KDEConnect",
"flatpakcommand": "flatpak install flathub com.github.bajoja.indicator-kdeconnect"
}
]
8 changes: 3 additions & 5 deletions components/Appcard.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@ import * as React from 'react';
import { Avatar, Card, IconButton } from 'react-native-paper';
import { toggleIcon, getLogs } from '../iconToggleUtils';

const Appcard = ({ icon, title, subtitle, command }) => {
const Appcard = ({ icon, title, subtitle, command, flatpakcommand, isFlatpakAppsRoute }) => {
const [iconName, setIconName] = React.useState('plus');

const handleToggleIcon = () => {
const newIcon = toggleIcon(iconName, command);

const newIcon = toggleIcon(iconName, isFlatpakAppsRoute ? flatpakcommand : command);
setIconName(newIcon);

console.log(getLogs());
};

return (
<Card.Title
title={title}
subtitle={subtitle}
command={command}
command={isFlatpakAppsRoute ? flatpakcommand : command}
left={(props) => <Avatar.Icon {...props} icon={icon} />}
right={(props) => (
<IconButton {...props} icon={iconName} onPress={handleToggleIcon} />
Expand Down
4 changes: 0 additions & 4 deletions components/Fab.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,14 @@ const Fab = () => {
const [logCount, setLogCount] = React.useState(0);

React.useEffect(() => {
// Update the log count whenever the logs list changes
setLogCount(getLogs().length);
}, [getLogs()]);

const handleFabPress = async () => {
// Concatenate the list items with " && " between them
const logsString = getLogs().join(' && ');

// Log the resulting string
console.log(logsString);

// Share the string using the Share API
try {
await Share.share({
message: logsString,
Expand Down
18 changes: 18 additions & 0 deletions components/Flatpakapps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';
import { ScrollView } from 'react-native';
import Appcard from './Appcard';
import appData from '../appData.json';

export default function Flatpakapps() {
return (
<ScrollView>
{appData.map((app, index) => (
<Appcard
key={index}
{...app}
isFlatpakAppsRoute={true}
/>
))}
</ScrollView>
);
}
8 changes: 4 additions & 4 deletions components/MainTabs.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import * as React from 'react';
import { BottomNavigation } from 'react-native-paper';
import Wingetapps from './Wingetapps';
import Mylist from './Mylist';
import Flatpakapps from './Flatpakapps';

const WingetappsRoute = () => <Wingetapps></Wingetapps>;

const MylistRoute = () => <Mylist></Mylist>;
const FlatpakappsRoute = () => <Flatpakapps></Flatpakapps>;


const Footer = () => {
const [index, setIndex] = React.useState(0);
const [routes] = React.useState([
{ key: 'Wingetapps', title: 'Winget Apps', focusedIcon: 'apps', unfocusedIcon: 'apps' },
{ key: 'Mylist', title: 'My list', focusedIcon: 'format-list-bulleted', unfocusedIcon: 'format-list-bulleted' },
{ key: 'Flatpakapps', title: 'Flatpak Apps', focusedIcon: 'format-list-bulleted', unfocusedIcon: 'format-list-bulleted' },
]);

const renderScene = BottomNavigation.SceneMap({
Wingetapps: WingetappsRoute,
Mylist: MylistRoute,
Flatpakapps: FlatpakappsRoute,
});

return (
Expand Down
9 changes: 0 additions & 9 deletions components/Mylist.js

This file was deleted.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 17951f6

Please sign in to comment.