Coder Social home page Coder Social logo

martinloeper / usbguard-applet-qt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pinotree/usbguard-applet-qt

0.0 0.0 0.0 696 KB

Qt applet of USBGuard, as available before its removal from the USBGuard sources

License: GNU General Public License v2.0

Shell 3.74% C++ 84.96% C 2.28% CMake 2.75% Nix 3.31% Dockerfile 2.96%

usbguard-applet-qt's Introduction

USBGuard Applet QT

Installation

This project is packaged using Nix. Run using: nix run github:MartinLoeper/usbguard-applet-qt. You can also install from NUR if you prefer the official version by pinotree.

Developing

Navigate to the repo root and run: ./scripts/ncode Note: VSCode might have to be closed for this to work. Run the command from a standalone terminal.

We pull all dependencies onto the path using the devshell mechanism and rely on the vscode extensions to discover them proberly from there on. If something is not auto-discovered properly, we tweak the config using workspace-relative .vscode settings.json. The strategy is based on the following tutorial: https://blog.jchw.io/vs-code-with-flakes/

VS Code CMake Shortcuts

  • Build: CTRL + SHIFT + B
  • (Build) & Run: SHIFT + F5 -> note: you must set and export QT_QPA_PLATFORM=wayland for this to work (see flake.nix)
  • Debug: F5 -> note: you must set and export QT_QPA_PLATFORM=wayland for this to work (see flake.nix)
  • (Build) & Test: CTRL + SHIFT + SPACE -> runs test task (keybinding added via nix home-manager)

Note: As is, under wayland we either need to use the nix qtWrapper or set the env var QT_QPA_PLATFORM=wayland (WORKAROUND!)

QTCreator

We ship the qtcreator with the devShell. Just run qtcreator . from within the devShell project root directory.

Logging

Replace the logging category in Log.cpp with: Q_LOGGING_CATEGORY(LOG, "usbguard.applet-qt", QtDebugMsg).

Translations

  • Using Nix, you can launch a devshell using: nix develop .
  • Then you can make some code changes
  • Regenerate the ts files: lupdate -source-language en_US -target-language cs_CZ . -ts translations/cs_CZ.ts
  • You can then launch linguist to make the translations using: QT_QPA_PLATFORM=wayland linguist translations/cs_CZ.ts

Note: Replace cs_CZ with your target language. For more information see: TRANSLATIONS.md

Resources

Settings

The QSettings are stored under ~/.config/USBGuard/usbguard-applet-qt.conf by default. It did not find a good way to manage them via home-manager yet as I want them to be both: predefined by the distro and overridable by the user.

Icons

The icons are packaged into the qt app using the QR Resource System. It works well for the language files but since the systray compat in gnome is broken, it does not work well for displaying systray icons.

usbguard-applet-qt's People

Contributors

pinotree avatar martinloeper avatar murinicanor avatar allen-webb avatar genodeftest avatar elkaze avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.