GithubHelp home page GithubHelp logo

khalid151 / flutter-layer-shell Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 42 KB

A bare-bones plugin to help creating wayland bars with gtk-layer-shell.

License: GNU General Public License v3.0

Dart 21.92% CMake 39.37% C++ 33.09% C 5.62%
gtk-layer-shell wayland

flutter-layer-shell's Introduction

flutter_layer_shell

A bare-bones plugin to help creating wayland bars. All it does is provide a function to configure the position and size of the bar.

Getting Started

To get started, edit linux/my_application.cc and add the following header

#include <flutter_layer_shell/flutter_layer_shell_plugin.h>

And call this function setup_layer_shell(window) right after creating the GTK window:

// Implements GApplication::activate.
static void my_application_activate(GApplication* application) {
  MyApplication* self = MY_APPLICATION(application);
  GtkWindow* window =
      GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));

  // Must run before creating the view
  setup_layer_shell(window);

Once done, bar can be set like this:

import 'package:flutter_layer_shell/flutter_layer_shell.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  FlutterLayerShell.configure(edge: LayerShellEdge.TOP, size: 65);
  runApp(const MyApp());
}

There are other to functions to update the size and position dynamically.

FlutterLayerShell.changeSize(size);
FlutterLayerShell.changePosition(layerShellEdge);

flutter-layer-shell's People

Contributors

khalid151 avatar

Stargazers

Ajeem Ahmad avatar

Watchers

 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.