Git Product home page Git Product logo

mate-i3-applet's Introduction

MATE i3 Workspace Applet

No Maintenance Intended

screenshot

This applet shows the current state of i3 workspaces when using i3 as your window manager in MATE.

Unsupported! (as of Aug 15, 2019)

I am sorry but I am not supporting this applet. I built it because it met a need I have. But the truth is I'm not a very good Python programmer, nor do I really know much at all about mate internals or various Linux distros. I don't have the time to learn these things unfortunately.

If anyone is interested in taking over, please let me know by creating an issue here in the repo

Features

  1. shows all workspaces in a similar fashion as i3bar
  2. urgent workspaces highlight same as i3bar
  3. shows modes such as "resize"
  4. clicking a workspace goes to that workspace
  5. uses the same colors as your i3bar in your i3 config (see below)
  6. robust, reconnects if i3 relaunches

Tested On

  • Ubuntu MATE 16.04 with MATE 1.12.1 and i3 4.11 (However no longer supporting GTK 2, see below)
  • Ubuntu MATE 17.10 with MATE 1.18.0 and i3 4.13
  • Ubuntu MATE 18.04 with MATE 1.20.1

There has been one report of the applet not working on Ubuntu MATE 18.10

Other Distros

Debian: It has been reported to work on Debian 10 after installing gir1.2-matepanelapplet-4.0 package. Discussion here

Only supporting GTK3

MATE 1.18.0 made the switch to GTK. This applet checks MATE version and imports appropriate version of GTK, however if you use GTK2 and encounter an issue, please upgrade before creating an issue. GTK2 specific issues will not be addressed.

How to Install

Requires Python 3 (minimum 3.5), no other dependencies

  1. Grab the most recent release
  2. sudo ./setup.py install
  3. killall mate-panel - this should kill then bring mate panel back, and it will now know about the i3 applet
  4. Right click a panel, choose 'Add to panel...' and add the i3 applet

How to setup i3 for this applet

The point of this applet is to use a MATE panel instead of an i3 bar. But, this applet also reads your bar config to determine the colors to use. This is not a catch-22, as i3 allows you to define invisible bars. So in your i3 config, define one bar like so:

bar {
    tray_output None
    mode invisible
    colors {
        background #000000
        statusline #ffffff
        separator #666666

        focused_workspace  #4c7899 #285577 #ffffff
        active_workspace   #333333 #5f676a #ffffff
        inactive_workspace #333333 #222222 #888888
        urgent_workspace   #2f343a #900000 #ffffff
        binding_mode       #2f343a #900000 #ffffff
    }
}

tray_output None: tells the bar to not accept tray icons. This allows them to go to the MATE panel.

mode invisible: means the bar is invisible and never shown. We really only want the bar for its colors...

colors: define the colors you want here. The applet will use these colors. Check the i3 user guide for more info on how to specify colors.

If you just want default colors

If you don't define a bar, or your bar doesn't have any colors defined, then the applet will use i3's default colors. Incidentally, the bar example above is what the default colors are.

Todo

Check the github issues, tracking all known issues and work there

License

This applet is using the BSD license. I also copied i3-ipc's source over into this applet because I needed the latest version and its not yet published to PyPI. i3-ipc is also licensed under the BSD license.

mate-i3-applet's People

Contributors

antoniotrkdz avatar city41 avatar tott avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mate-i3-applet's Issues

Support GTK 3

MATE 1.18 is now entirely GTK3. Need to either support GTK 2 and 3, or just ditch 2.

UnicodeDecodeError

Sometimes when the socket in i3.py receives a message from i3, it throws this error. Need to get to the bottom of this and make the socket handling more robust.

i3.py was stolen from https://github.com/ziberna/i3-py. Brought it in local to the applet to be able to fix bugs in it.

Suspending or locking computer seems to lock up keyboard

If I suspend my computer, or lock it. When I return, many times the keyboard no longer works. For the longest time I blamed USB and would unplug then replug the keyboard, and it'd work again.

But lately I've noticed if I use my mouse to switch desktops in the mate-i3-applet, the keyboard starts working again.

Unsure if this is a mate-i3-applet, i3, or X bug.

Mate version 1.16(.2) using GTK 3.0

I am using MATE 1.16.2 and it uses GTK 3.0.
I made the following change to mate_version.py

from

if version and version.major < 2 and version.minor < 18:
        gi.require_version("Gtk", "2.0")

to

if version and version.major < 2 and version.minor < 16:
        gi.require_version("Gtk", "2.0")

And it works now.
It could be that there are patches of mate 1.16 using GTK 2.0 or it could depend on how mate is installed on the system, but the method of choosing which GTK version to load based only on the mate-about output looks not accurate.
On debian based system the output of the apt package dependency could be more useful.
something like:

$ apt-get remove -s libgtk-3-0 | grep Remv | cut -d ' ' -f 2,3 | grep mate

Please note it is a simulation -s.

investigate multiple monitors

Not sure what i3 even does with two monitors as I've never tried it. Hook up a second monitor and figure this out, and adjust the applet as needed.

Support urgent

If a workspace is urgent, its background should be red

Cannot add to panel

Hi there,
I was following along with the instructions posted, but for some reason when I press the add button, nothing happens. I cannot add the applet to the panel.

Ideas?

Namespace error on Debian 10

So, I've installed this applet before without any problems. I just tried to install it on a new Debian 10 VM and I'm getting the following. I'm not sure what I'm missing that causes this. Do I need some other package to make this work?

Uncaught exception occurred: Namespace MatePanelApplet not available NoneType: None

AttributeError: 'PosixPath' object has no attribute 'startswith' - No Applet rendering

I'd love to use the applet but when I try to add it to the panel I only receive the following error in the logs and no output.

Nov 25 01:10:36 x330 org.mate.panel.applet.I3AppletFactory[2167]: Traceback (most recent call last): Nov 25 01:10:36 x330 org.mate.panel.applet.I3AppletFactory[2167]: File "/usr/lib/mate-i3-applet/matei3applet.py", line 6, in <module> Nov 25 01:10:36 x330 org.mate.panel.applet.I3AppletFactory[2167]: setup_logging() Nov 25 01:10:36 x330 org.mate.panel.applet.I3AppletFactory[2167]: File "/usr/lib/mate-i3-applet/log.py", line 21, in setup_logging Nov 25 01:10:36 x330 org.mate.panel.applet.I3AppletFactory[2167]: delay=True, Nov 25 01:10:36 x330 org.mate.panel.applet.I3AppletFactory[2167]: File "/usr/lib/python3.5/logging/handlers.py", line 202, in __init__ Nov 25 01:10:36 x330 org.mate.panel.applet.I3AppletFactory[2167]: BaseRotatingHandler.__init__(self, filename, 'a', encoding, delay) Nov 25 01:10:36 x330 org.mate.panel.applet.I3AppletFactory[2167]: File "/usr/lib/python3.5/logging/handlers.py", line 57, in __init__ Nov 25 01:10:36 x330 org.mate.panel.applet.I3AppletFactory[2167]: logging.FileHandler.__init__(self, filename, mode, encoding, delay) Nov 25 01:10:36 x330 org.mate.panel.applet.I3AppletFactory[2167]: File "/usr/lib/python3.5/logging/__init__.py", line 999, in __init__ Nov 25 01:10:36 x330 org.mate.panel.applet.I3AppletFactory[2167]: self.baseFilename = os.path.abspath(filename) Nov 25 01:10:36 x330 org.mate.panel.applet.I3AppletFactory[2167]: File "/usr/lib/python3.5/posixpath.py", line 358, in abspath Nov 25 01:10:36 x330 org.mate.panel.applet.I3AppletFactory[2167]: if not isabs(path): Nov 25 01:10:36 x330 org.mate.panel.applet.I3AppletFactory[2167]: File "/usr/lib/python3.5/posixpath.py", line 64, in isabs Nov 25 01:10:36 x330 org.mate.panel.applet.I3AppletFactory[2167]: return s.startswith(sep) Nov 25 01:10:36 x330 org.mate.panel.applet.I3AppletFactory[2167]: AttributeError: 'PosixPath' object has no attribute 'startswith' Nov 25 01:10:36 x330 dbus-daemon[2167]: Activated service 'org.mate.panel.applet.I3AppletFactory' failed: Process org.mate.panel.applet.I3AppletFactory exited with status 1

i3 version 4.15.0.1-262-gcf878da0 (2018-08-28, branch "gaps-next") © 2009 Michael Stapelberg and contributors
MATE Desktop Environment 1.20.3

Support for resize mode

It would be nice to have support for resize mode.
That is when you press $mod+r.
Thanks!

P.S.: Good job!

applet doesn't load right on login

Hello,
I recently started using this applet with mate/i3. I got my i3 config all set up and added the panel. everything seemed fine, even picked up my colors.
i3mateworking
The problem comes when i start my computer back up in the morning or log out and back in. The panel loads but its just white. If I remove it and re-add it, it comes back looking and functioning correctly, but this is a bit of a hassle every time.
i3matelogin

i3 config text color setting not having effect (MATE 1.16)

Setting the color of the text (and possibly the border) in i3 config does not have any effect on the color of the text of the i3 workspace indicator in mate-panel.
Only the background could be changed effectively from the i3 conf. file.
I suspect the color of the text in the mate panel, set by the general theme of MATE itself, is taking precedence over the text setting in the i3 config file.
Confirmation of this could be that regardless of the color set in i3 conf., with a light theme the text of the workspace indicators are always black, as opposite to dark themes, where they are always white.

It would be nice to be able to manipulate such colors from the i3 conf. file as originally designed (and working for the background value) in order to obtain more combinations such as dark text on light background on a dark MATE theme and viceversa.

Moreover changes don't take effect immediately on reloading of i3 conf or restarting of i3, but it takes to logout and back in from mate session for the changes to be visible, which could be annoying some times.

Thanks!

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.