Giter VIP home page Giter VIP logo

polydock's Introduction

🚀 Polydock

Polydock is a fast and hackable application dock for your desktop.

Polydock running on top of PolybarPolydock (in the middle), running on top of Polybar

❓ Why another dock

I recently started using bspwm as my main window manager. Since bspwm is a tiling wm, most navigation is done using the keyboard. The only thing I really missed was the ability to quickly glance at a list of open, hidden, and grouped windows.

Polybar is a beautiful status bar, but unfortunately lacks the ability to show a window list. Since I couldn't find a good looking, customizable dock, I decided to build one myself, that can easily be styled to blend into any existing status bar. (I'm also terrible coming up with great project names)

✨ Features

  • highly customizable (see settings.ini)

  • themeable with Gtk+ CSS (see themes/default.css)

  • window grouping based on any combination of (example for a Google Chrome web app):

    • window class: Google Chrome
    • instance: mail.google.com
    • title: Inbox (123)
    • visibility: useful if you want to separate hidden/visible windows in different groups
  • limit the dock to windows on the current workspace or all workspaces

  • show only visible windows, hidden windows, or both

  • updates icon when it changes in the application (great for google chrome web application windows)

  • rules to define custom icons

  • exclude certain window classes / instances

  • clicking on a group cycles through the windows in that group (configurable)

  • right click to get a popup with all open windows in that group (configurable)

  • supports custom wm hide and unhide commands

    # Example for bspwm:
    [commands]
    unhide = bspc node {window} -g hidden=off -f
    hide = bspc node {window} -g hidden=on -f

📦 Installation

Make sure you have the following libraries on your system:

  • gtk3
  • gjs
  • libwnck3
  • gdk-pixbuf2

Grab the latest release and unzip it somewhere on your system.

You can start using polydock right away from the bin folder:

$ bin/polydock

or, copy the binary and config files to your local directories.

For example:

$ cp bin/polydock ~/.local/bin

$ cp -rv config ~/.config/polydock

⚙ Configuration

settings.ini

[appearance]
#One of top, bottom, left, right
position=top
#One of start, center, end
alignment=center
#Additional offsets to further fine-tune the position of the dock
offsetX=0
offsetY=0
iconSize=40
#Name of the theme file, or 'default'.
#See config/themes/default.css
theme=default
#An gtk icon theme name, or 'default'
iconTheme=default

[behavior]
#Specify a list of keys to group windows on: class;instance;title;visibility
groupBy=instance;visibility;
activeWorkspaceOnly=false
showHidden=true
showVisible=true
#Action on click. One of: show, hide, toggle, cycle, toggle-cycle
click=toggle-cycle
menu-click=show
#Exclude windows whose class or instance contains one of these values
exclude=scratchpad;
#Automatically hides Polydock if another window overlaps
autoHide=true

[commands]
hide=bspc node {window} -g hidden=on -f
unhide=bspc node {window} -g hidden=off -f

#Rules for custom icons matching the class::instance of windows
#icon-name=string to be part of class::instance
[icons]
google-agenda=calendar.google.com
gmail=mail.google.com
keep=keep.google.com
messengerfordesktop=www.messenger.com
whatsapp=whatsapp

Themes

Polydock can be fully themed using Gtk+ CSS.

To create a new theme:

# Copy the default theme
$ cp config/themes/default.css ~/.config/polydock/themes/awesome.css

Then hack away and set your custom theme ~/.config/polydock/settings.ini

[appearance]
theme=awesome

🔥 Building from source

Polydock is written in Typescript and needs some nodejs packages to transform the source into code that works with GJS

Installing and building has been tested with the package manager pnpm, but should also work with npm or yarn

$ cd polydock

# Install dependencies
$ pnpm i

# Build bundle
$ pnpm run build

# Run Polydock!
$ dist/bin/polydock

👋 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

⚖ License

Apache 2.0

polydock's People

Contributors

andrewswerlick avatar folke avatar renovate-bot avatar renovate[bot] 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  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

polydock's Issues

Polydock doesn't update icons when windows are closed

I start Polydock in my bspwmrc using /home/user/.local/bin/polydock &.
It starts fine and shows all running programs, but when I open or close windows it won't update. I have to kill and restart polydock to update it.

Goes behind polybar

First off awesome project, love it, really cool.
I use a polybar theme called Blocks with some minor tweaks. Polybar and Polydock are configured to run at startup(in the order i mentioned them). For the first few minutes, about 10 to 15, everything is ok, but after a while Polydock goes behind Polybar(still running and working, but I lose access to it ). As for the config(the theme is the default):
`
[appearance]
#One of top, bottom, left, right
position=top
#One of start, center, end
alignment=center
#Additional offsets to further fine-tune the position of the dock
offsetX=0
offsetY=0
iconSize=25
#Name of the theme file, or 'default'.
#See config/themes/default.css
theme=default
#An gtk icon theme name, or 'default'
iconTheme=default

[behavior]
#Specify a list of keys to group windows on: class;instance;title;visibility
groupBy=instance;visibility;
activeWorkspaceOnly=false
showHidden=true
showVisible=true
#Action on click. One of: show, hide, toggle, cycle, toggle-cycle
click=toggle-cycle
menu-click=show
#Exclude windows whose class or instance contains one of these values
exclude=scratchpad;
#Automatically hides Polydock if another window overlaps
autoHide=false

[commands]
hide=node {window} -g hidden=on -f
unhide=node {window} -g hidden=off -f

#Rules for custom icons matching the class::instance of windows
#icon-name=string to be part of class::instance
[icons]
google-agenda=calendar.google.com
gmail=mail.google.com
keep=keep.google.com
messengerfordesktop=www.messenger.com
whatsapp=whatsapp
`
I removed bspc because otherwise I wouldn't be able to hide and unhide my windows.
I am running Manjaro XFCE.

Again thank for the awesome software.

SyntaxError: invalid property id...

Having an issue trying to run Polydock. I have ensured all the dependencies are installed, and have tried both from the current folder (bin/polydock) and installed to ~/.local/bin/

I have also tried with and without the default configuration installed to ~/.config/polydock/

This is the result every time:

# bin/polydock

(gjs:29578): Gjs-CRITICAL **: 15:44:55.103: JS ERROR: SyntaxError: invalid property id @ bin/polydock:138
Script bin/polydock threw an exception

Nothing is displayed.

I have tried running it from release zip, however nothing is displayed. In the terminal I get following log:

Gjs-Message: 17:45:55.345: JS LOG: [app] startup
Gjs-Message: 17:45:55.367: JS LOG: [app] activate
Gjs-Message: 17:45:55.367: JS LOG: [settings] /tmp/polydock-bin-2.0.2/bin/config/settings.ini
Gjs-Message: 17:45:55.368: JS LOG: [theme] /tmp/polydock-bin-2.0.2/bin/config/themes/default.css
Gjs-Message: 17:45:55.369: JS LOG: Alpha Visuals: true
Gjs-Message: 17:45:55.369: JS LOG: Composited: true
Gjs-Message: 17:45:55.376: JS LOG: [update] + constructor
Gjs-Message: 17:45:55.387: JS LOG: + 2 brave-browser
Gjs-Message: 17:45:55.388: JS LOG: [icon] /usr/share/icons/hicolor/scalable/apps/nemo.svg
Gjs-Message: 17:45:55.391: JS LOG: + 2 nemo
Gjs-Message: 17:45:55.392: JS LOG: [icon] /usr/share/icons/hicolor/scalable/apps/com.gexperts.Tilix.svg
Gjs-Message: 17:45:55.393: JS LOG: + 2 tilix
Gjs-Message: 17:45:55.394: JS LOG: [icon] /usr/share/icons/hicolor/scalable/apps/com.gexperts.Tilix.svg
Gjs-Message: 17:45:55.394: JS LOG: + 2 tilix
Gjs-Message: 17:45:55.395: JS LOG: + 2 polybar
Gjs-Message: 17:45:55.396: JS LOG: [update] - constructor [4]
Gjs-Message: 17:45:55.396: JS LOG: [toobar] show
Gjs-Message: 17:45:55.434: JS LOG: [update] + window-opened
Gjs-Message: 17:45:55.436: JS LOG: + 3 polydock
Gjs-Message: 17:45:55.437: JS LOG: [update] - window-opened [5]
Gjs-Message: 17:45:55.437: JS LOG: [toobar] show
Gjs-Message: 17:45:55.439: JS LOG: [update] + workspace-changed
Gjs-Message: 17:45:55.441: JS LOG: [update] - workspace-changed [5]
Gjs-Message: 17:45:55.441: JS LOG: [toobar] show
Gjs-Message: 17:45:55.458: JS LOG: [update] + window-closed
Gjs-Message: 17:45:55.458: JS LOG: - 3 polydock
Gjs-Message: 17:45:55.459: JS LOG: [update] - window-closed [4]
Gjs-Message: 17:45:55.459: JS LOG: [toobar] show

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm @types/prettier Unavailable
npm @types/rimraf Unavailable
npm @zeit/ncc Unavailable
npm eslint-plugin-node Available
npm rollup-plugin-terser Unavailable

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency @types/rimraf to v4
  • chore(deps): update dependency husky to v9
  • chore(deps): update dependency release-it to v17
  • chore(deps): update dependency rimraf to v6
  • chore(deps): update dependency rollup to v4
  • chore(deps): update dependency typescript to v5
  • 🔐 Create all rate-limited PRs at once 🔐

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • @release-it/conventional-changelog 1.1.4
  • @rollup/plugin-node-resolve 8.0.1
  • @rollup/plugin-replace 2.3.3
  • @rollup/plugin-sucrase 3.0.2
  • @rollup/plugin-typescript 4.1.2
  • @types/eslint 7.2.14
  • @types/eslint-plugin-prettier 3.1.0
  • @types/prettier 2.0.1
  • @types/rimraf 3.0.2
  • @typescript-eslint/eslint-plugin 3.3.0
  • @typescript-eslint/parser 3.3.0
  • @zeit/ncc 0.22.3
  • devmoji 2.1.9
  • eslint 7.3.0
  • eslint-config-prettier 6.11.0
  • eslint-plugin-import 2.21.2
  • eslint-plugin-node 11.1.0
  • eslint-plugin-prettier 3.1.4
  • eslint-plugin-promise 4.2.1
  • eslint-plugin-unicorn 20.1.0
  • husky 4.2.5
  • prettier 2.0.5
  • release-it 13.6.3
  • rimraf 3.0.2
  • rollup 2.17.1
  • rollup-plugin-copy 3.3.0
  • rollup-plugin-terser 6.1.0
  • tslib 2.0.0
  • typescript 3.9.10
  • typesync 0.7.0
  • node >=10.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

Error trying to run polydock

I couldn't detect the required dependencies, so i installed everything containing the mentioned dependencies in their name. However when i try to run polydock i get the following error:

$ ./bin/polydock

(gjs:18188): Gjs-CRITICAL **: 11:54:23.095: JS ERROR: Error: Constructor called as normal method. Use 'new SomeObject()' not 'SomeObject()'
class_1@./bin/polydock:899:46
imports.gi.versions.GdkPixbuf<@./bin/polydock:951:15
@./bin/polydock:955:2

(gjs:18188): Gjs-CRITICAL **: 11:54:23.095: Script ./bin/polydock threw an exception

How do i get past this. Really want to try it.
I am running Antix linux with debian sid sources

No display found on X11 with bspwm

Hey folke,

You've created the project that's been brewing in my head for the past few months (seriously what haven't you written?), and I would love to try it out before taking a swing at it myself. Unfortunately I get a segfault when trying to run polydock. Here is my error:

(gjs:5505): Wnck-WARNING **: 20:38:01.033: libwnck is designed to work in X11 only, no valid display found
^C/sbin/polydock: line 13:  5505 Segmentation fault      (core dumped) gjs "$dist/polydock.js" $@
[restarting]

I did, however, install polydock from the AUR with yay -S polydock instead of building from source. Can you offer any advice on how to get it working? 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.