diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..9978ef0 --- /dev/null +++ b/.envrc @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# Used by https://direnv.net + +# Automatically reload when this file changes +watch_file devshell.nix + +# Load `nix develop` +use flake + +# Extend the environment with per-user overrides +source_env_if_exists .envrc.local diff --git a/.gitignore b/.gitignore index f0e88ee..bf8a307 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ /.bundle/ /.yardoc -/Gemfile.lock /_yardoc/ /coverage/ /doc/ @@ -13,4 +12,4 @@ .ruby-version # direnv -.envrc +.direnv \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..2700bd5 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,287 @@ +PATH + remote: . + specs: + fusuma-plugin-appmatcher (0.7.1) + fusuma (>= 3.0) + rexml + ruby-dbus + +GEM + remote: https://rubygems.org/ + specs: + activesupport (8.0.1) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + ast (2.4.2) + async (2.21.1) + console (~> 1.29) + fiber-annotation + io-event (~> 1.6, >= 1.6.5) + async-http (0.86.0) + async (>= 2.10.2) + async-pool (~> 0.9) + io-endpoint (~> 0.14) + io-stream (~> 0.6) + metrics (~> 0.12) + protocol-http (~> 0.43) + protocol-http1 (>= 0.28.1) + protocol-http2 (~> 0.22) + traces (~> 0.10) + async-http-faraday (0.19.0) + async-http (~> 0.42) + faraday + async-pool (0.10.2) + async (>= 1.25) + traces + base64 (0.2.0) + benchmark (0.4.0) + bigdecimal (3.1.9) + bump (0.10.0) + byebug (11.1.3) + coderay (1.1.3) + concurrent-ruby (1.3.4) + connection_pool (2.4.1) + console (1.29.2) + fiber-annotation + fiber-local (~> 1.1) + json + coveralls (0.8.23) + json (>= 1.8, < 3) + simplecov (~> 0.16.1) + term-ansicolor (~> 1.3) + thor (>= 0.19.4, < 2.0) + tins (~> 1.6) + date (3.4.1) + debug (1.10.0) + irb (~> 1.10) + reline (>= 0.3.8) + diff-lcs (1.5.1) + docile (1.4.1) + drb (2.2.1) + dry-configurable (1.2.0) + dry-core (~> 1.0, < 2) + zeitwerk (~> 2.6) + dry-core (1.0.2) + concurrent-ruby (~> 1.0) + logger + zeitwerk (~> 2.6) + dry-inflector (1.1.0) + dry-initializer (3.1.1) + dry-logic (1.5.0) + concurrent-ruby (~> 1.0) + dry-core (~> 1.0, < 2) + zeitwerk (~> 2.6) + dry-schema (1.13.4) + concurrent-ruby (~> 1.0) + dry-configurable (~> 1.0, >= 1.0.1) + dry-core (~> 1.0, < 2) + dry-initializer (~> 3.0) + dry-logic (>= 1.4, < 2) + dry-types (>= 1.7, < 2) + zeitwerk (~> 2.6) + dry-types (1.7.2) + bigdecimal (~> 3.0) + concurrent-ruby (~> 1.0) + dry-core (~> 1.0) + dry-inflector (~> 1.0) + dry-logic (~> 1.4) + zeitwerk (~> 2.6) + faraday (2.12.2) + faraday-net_http (>= 2.0, < 3.5) + json + logger + faraday-http-cache (2.5.1) + faraday (>= 0.8) + faraday-net_http (3.4.0) + net-http (>= 0.5.0) + fiber-annotation (0.2.0) + fiber-local (1.1.0) + fiber-storage + fiber-storage (1.0.0) + fusuma (3.7.0) + github_changelog_generator (1.16.4) + activesupport + async (>= 1.25.0) + async-http-faraday + faraday-http-cache + multi_json + octokit (~> 4.6) + rainbow (>= 2.2.1) + rake (>= 10.0) + i18n (1.14.6) + concurrent-ruby (~> 1.0) + io-console (0.8.0) + io-endpoint (0.14.0) + io-event (1.7.5) + io-stream (0.6.1) + irb (1.14.3) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + json (2.9.1) + language_server-protocol (3.17.0.3) + lint_roller (1.1.0) + logger (1.6.4) + method_source (1.1.0) + metrics (0.12.1) + minitest (5.25.4) + multi_json (1.15.0) + net-http (0.6.0) + uri + octokit (4.25.1) + faraday (>= 1, < 3) + sawyer (~> 0.9) + parallel (1.26.3) + parser (3.3.6.0) + ast (~> 2.4.1) + racc + protocol-hpack (1.5.1) + protocol-http (0.47.1) + protocol-http1 (0.28.1) + protocol-http (~> 0.22) + protocol-http2 (0.22.0) + protocol-hpack (~> 1.4) + protocol-http (~> 0.18) + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + pry-byebug (3.10.1) + byebug (~> 11.0) + pry (>= 0.13, < 0.15) + pry-doc (1.5.0) + pry (~> 0.11) + yard (~> 0.9.11) + pry-inline (1.0.7) + pry (> 0.10.0) + unicode (~> 0.4.4) + psych (5.2.2) + date + stringio + public_suffix (6.0.1) + racc (1.8.1) + rainbow (3.1.1) + rake (13.2.1) + rdoc (6.10.0) + psych (>= 4.0.0) + reek (6.3.0) + dry-schema (~> 1.13.0) + parser (~> 3.3.0) + rainbow (>= 2.0, < 4.0) + rexml (~> 3.1) + regexp_parser (2.10.0) + reline (0.6.0) + io-console (~> 0.5) + rexml (3.4.0) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.2) + rspec-support (~> 3.13.0) + rspec-debug (0.2.0) + debug (>= 1.3.3) + rspec-expectations (3.13.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.2) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.2) + rubocop (1.69.2) + json (~> 2.3) + language_server-protocol (>= 3.17.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.36.2, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.37.0) + parser (>= 3.3.1.0) + rubocop-performance (1.23.0) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rake (0.6.0) + rubocop (~> 1.0) + rubocop-rspec (3.3.0) + rubocop (~> 1.61) + ruby-dbus (0.23.1) + rexml + ruby-progressbar (1.13.0) + sawyer (0.9.2) + addressable (>= 2.3.5) + faraday (>= 0.17.3, < 3) + securerandom (0.4.1) + simplecov (0.16.1) + docile (~> 1.1) + json (>= 1.8, < 3) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.2) + standard (1.43.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.69.1) + standard-custom (~> 1.0.0) + standard-performance (~> 1.6) + standard-custom (1.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.50) + standard-performance (1.6.0) + lint_roller (~> 1.1) + rubocop-performance (~> 1.23.0) + stringio (3.1.2) + sync (0.5.0) + term-ansicolor (1.11.2) + tins (~> 1.0) + thor (1.3.2) + tins (1.37.1) + bigdecimal + sync + traces (0.14.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode (0.4.4.5) + unicode-display_width (3.1.3) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) + uri (1.0.2) + yard (0.9.37) + zeitwerk (2.7.1) + +PLATFORMS + ruby + x86_64-linux + +DEPENDENCIES + bump + bundler + coveralls + fusuma-plugin-appmatcher! + github_changelog_generator (~> 1.16) + pry-byebug (~> 3.4) + pry-doc + pry-inline + rake (~> 13.0) + reek + rspec (~> 3.0) + rspec-debug + rubocop + rubocop-rake + rubocop-rspec + standard + yard + +BUNDLED WITH + 2.5.22 diff --git a/devshell.nix b/devshell.nix new file mode 100644 index 0000000..e5fdf3f --- /dev/null +++ b/devshell.nix @@ -0,0 +1,16 @@ +{ flake, pkgs }: +pkgs.mkShell { + # Add build dependencies + packages = [ + pkgs.ruby + pkgs.libyaml + ]; + + # Add environment variables + env = { }; + + # Load custom bash code + shellHook = '' + + ''; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..a225b41 --- /dev/null +++ b/flake.lock @@ -0,0 +1,64 @@ +{ + "nodes": { + "blueprint": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1724053269, + "narHash": "sha256-DinmPyxmUSLjBUYMe3eK0GKykwe33vWbVTmp7++P4Ng=", + "owner": "numtide", + "repo": "blueprint", + "rev": "766302be9063650ca6578e5ba09cc4260b0da29c", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "blueprint", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1735471104, + "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "blueprint": "blueprint", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..83f7e91 --- /dev/null +++ b/flake.nix @@ -0,0 +1,13 @@ +{ + description = "Fusuma plugin configure app-specific gestures"; + + # Add all your dependencies here + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable"; + blueprint.url = "github:numtide/blueprint"; + blueprint.inputs.nixpkgs.follows = "nixpkgs"; + }; + + # Load the blueprint + outputs = inputs: inputs.blueprint { inherit inputs; }; +} diff --git a/fusuma-plugin-appmatcher-0.7.1.gem b/fusuma-plugin-appmatcher-0.7.1.gem new file mode 100644 index 0000000..892876a Binary files /dev/null and b/fusuma-plugin-appmatcher-0.7.1.gem differ diff --git a/lib/fusuma/plugin/appmatcher/gnome_extensions/appmatcher45@iberianpig.dev/metadata.json b/lib/fusuma/plugin/appmatcher/gnome_extensions/appmatcher45@iberianpig.dev/metadata.json index cc0de17..3bf6e6c 100644 --- a/lib/fusuma/plugin/appmatcher/gnome_extensions/appmatcher45@iberianpig.dev/metadata.json +++ b/lib/fusuma/plugin/appmatcher/gnome_extensions/appmatcher45@iberianpig.dev/metadata.json @@ -2,9 +2,11 @@ "name": "Appmatcher", "description": "notify focused application using D-Bus", "shell-version" : [ - "45" + "45", + "46", + "47" ], "url" : "https://github.com/iberianpig/fusuma-plugin-appmatcher", - "uuid": "appmatcher@iberianpig.dev", + "uuid": "appmatcher45@iberianpig.dev", "version" : 1 } diff --git a/packages/appmatcher/default.nix b/packages/appmatcher/default.nix new file mode 100644 index 0000000..6307381 --- /dev/null +++ b/packages/appmatcher/default.nix @@ -0,0 +1,28 @@ +{ pkgs, ... }: with pkgs; +let + uuid = "appmatcher@iberianpig.dev"; + pname = "fusuma-plugin-appmatcher"; + version = 1; +in + lib.makeOverridable stdenv.mkDerivation { + pname = "gnome-shell-extension-${pname}"; + version = builtins.toString version; + src = ./../..; + installPhase = '' + runHook preInstall + mkdir -p $out/share/gnome-shell/extensions/ + cp -r -T ./lib/fusuma/plugin/appmatcher/gnome_extensions/${uuid} $out/share/gnome-shell/extensions/${uuid} + runHook postInstall + ''; + meta = { + description = "Fusuma plugin configure app-specific gestures"; + homepage = "https://github.com/iberianpig/fusuma-plugin-appmatcher"; + license = lib.licenses.mit; + platforms = lib.platforms.linux; + }; + passthru = { + extensionPortalSlug = pname; + # Store the extension's UUID, because we might need it at some places + extensionUuid = uuid; + }; + } \ No newline at end of file diff --git a/packages/appmatcher45/default.nix b/packages/appmatcher45/default.nix new file mode 100644 index 0000000..19cf8a2 --- /dev/null +++ b/packages/appmatcher45/default.nix @@ -0,0 +1,28 @@ +{ pkgs, ... }: with pkgs; +let + uuid = "appmatcher45@iberianpig.dev"; + pname = "fusuma-plugin-appmatcher45"; + version = 1; +in + lib.makeOverridable stdenv.mkDerivation { + pname = "gnome-shell-extension-${pname}"; + version = builtins.toString version; + src = ./../..; + installPhase = '' + runHook preInstall + mkdir -p $out/share/gnome-shell/extensions/ + cp -r -T ./lib/fusuma/plugin/appmatcher/gnome_extensions/${uuid} $out/share/gnome-shell/extensions/${uuid} + runHook postInstall + ''; + meta = { + description = "Fusuma plugin configure app-specific gestures"; + homepage = "https://github.com/iberianpig/fusuma-plugin-appmatcher"; + license = lib.licenses.mit; + platforms = lib.platforms.linux; + }; + passthru = { + extensionPortalSlug = pname; + # Store the extension's UUID, because we might need it at some places + extensionUuid = uuid; + }; + } \ No newline at end of file