Git Product home page Git Product logo

bismuth-forge / bismuth Goto Github PK

View Code? Open in Web Editor NEW
2.4K 21.0 89.0 10.92 MB

KDE Plasma add-on, that tiles your windows automatically and lets you manage them via keyboard, similarly to i3, Sway or dwm.

Home Page: https://bismuth-forge.github.io/bismuth/

License: Other

Shell 4.19% QML 9.78% TypeScript 65.54% CMake 9.70% C++ 10.54% Makefile 0.25%
kde tiling-window-manager tiling linux desktop kde-plasma plasma kwin kwin-script wayland

bismuth's People

Contributors

abrac avatar arnauddupuis avatar bblaszkow06 avatar benemorius avatar biqqles avatar bladedvox avatar daxtorim avatar ddddanil avatar esjeon avatar farid-nl avatar gikari avatar github-actions[bot] avatar haukurpall avatar hellorge avatar ikajdan avatar jcapucho avatar jdzla avatar l1q avatar leononame avatar nicoweio avatar onuralpszr avatar phrxmd avatar rdimaio avatar sayan01 avatar shocklateboy92 avatar talperud avatar themachine02 avatar vanillabase1lb avatar viperml avatar volitank 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bismuth's Issues

[Bug]: Krohnkite import script says "'org.kde.keyboard' does not exist" and fails to import keybindings

Summary

There is not much more to say than what the title says.

This is shown:

$ source import_krohnkite.sh 
Config file path: ~/.config/kglobalshortcutsrc
Importing Krohnkite shortcuts...
Service 'org.kde.keyboard' does not exist.

Steps to Reproduce

  1. Execute import_krohnkite.sh
  2. Fails to do the job.

Expected behavior

  1. Execute import_krohnkite.sh
  2. Keybindings get transported.

Bismuth version

v1.0.1

KDE Plasma version

v5.22.5

The platform KWin is running on

Wayland

[DEV]: Add code formatting CI action

Summary

For some reason, ESLint integration with prettier does no work. It means, that we need to create separate "Check formatting" GitHub action.

Additional info

Also, for some reason, my local ESLint complains in the PR #45. Maybe it is worth checking out other GitHub actions for checks.

[Bug]: Shading and unshading windows corrupts the tiling

Summary

Shading a window is not working as expected.

Steps to Reproduce

  1. Start tiling with at least 2 windows
  2. shade a window
  3. When I shade a window (for example one located in the lower part of the screen), the remaining tiled windows do not resize. I can see the desktop under the previously shaded window.

Expected behavior

When a window is shaded the area under it should be used by the other windows.
Best solution (for me as a user) is that after the shading, the whole tiling and sizes of the windows should be updated (now shaded window has a little height, and should be tiled with this low height).
Or alternative solutions is that: shaded window should switch to floating mode (kwin-tiling script does that), and unshading should put it back into tiling.

Screenshots

No response

Bismuth version

NA

KDE Plasma version

5.22

The platform KWin is running on

X11

Additional context

No response

[FEATURE]: Bismuth crash in / Support for KwinFT

Summary

Bismuth won't work in KWinFT

A clear and concise description of what you want to happen

KWinFT makes KWin a lot smmother : https://gitlab.com/kwinft/kwinft works much better on Wayland.
Currently It is stable and working alot better when multiple windows are opened at the same time . Much smoother experience overall.
KWinFT have a few breaking api changes so most scripts won't work.

For Bismuth , the error is :

qml: Registering bismuth_rotate with the description Bismuth: Rotate
qml: Registering bismuth_rotate_part with the description Bismuth: Rotate Part
file:///home/nozander/.local/share/kwin/scripts/bismuth/contents/code/index.mjs:1940: TypeError: Cannot read property 'x' of undefined

Error is at

// src/util/kwinutil.ts
function toQRect(rect) {
  return Qt.rect(rect.x, rect.y, rect.width, rect.height);
}
function toRect(qrect) {
  return new Rect(qrect.x, qrect.y, qrect.width, qrect.height);
}

A clear and concise description of any alternative solutions or features you've considered.

Since major (Arch/Manjaro) distros are started supporting it would be nice if BIsmuth works on KwinFT

Additional info

https://gitlab.com/kwinft/kwinft

[Bug]: Monocle + config.monocleMinimizeRest causes KWin to hang when closing transient Dialogs

Summary

As in the title, the window manager freezes until you kill the parent process of the window in question.

Doesn't seem to affect File Open/Save dialogs though

Steps to Reproduce

  1. Enable the "Monocle: Minimize unfocused windows" setting
  2. Open a dialog window (excluding file open/save for some reason)
  3. Try closing the window either with the window manager or with internal controls (Apply/Cancel/Ok, whatever)
  4. Observe the WM has hung dreadfully

Expected behavior

Dialog should close normally and focus restored to the parent window.

Screenshots

No response

Bismuth version

master

KDE Plasma version

5.21.2

The platform KWin is running on

X11

Additional context

No response

[Bug]: When selecting minimized window on other desktop in Latte Dock, GUI freezes

Summary

Selecting a minimized window in Latte Dock on another desktop causes everything to freeze, requiring a restart (to my knowledge).

Steps to Reproduce

  1. Open a program on two separate desktops
  2. Minimize program on desktop 1
  3. Switch to desktop 2
  4. Using Latte Dock, select the minimized program on desktop one
  5. Everything freezes

Expected behavior

For the window to be selected and be tiled alongside the existing window(s) on the other desktop.

Screenshots

No response

Bismuth version

1.01

KDE Plasma version

5.22.5

The platform KWin is running on

X11

Additional context

No response

[Bug]: Conky is being relocated

Summary

Hi,

i'm not sure if it is a bug or a side effect.

Can i specify the conky output as an exception to be left alone is the background ? if yes how can i achieve this.

Steps to Reproduce

launch conlky with example config
activate bismuth
oberv conky background being moved around

Expected behavior

conky left is the background at its specified position

Screenshots

No response

Bismuth version

1.03

KDE Plasma version

5.22.5

The platform KWin is running on

X11

Additional context

No response

[Bug]: "Leave" Menu not visible when using multiple monitors

Plasma version : 5.22.5
Bismuth version : 1.0.1
Platform : X11

Steps to reproduce

  1. Plug in a second monitor
  2. Hit CTRL+ALT+DEL or the shutdown / logout buttons in the application launcher.

Extra notes

This issue wasn't present when using Krohnkite. The menu can still be interacted with using the keyboard.

[FEATURE]: Implement sublayouts

Summary

Sometimes we want to arrange windows on a different way than the included layouts. For example, sometimes could be helpful to have the first half of the stack area with two horizontal windows and the second half with the windows stacked. A configurable (but not too configurable at the level of i3 to avoid too much complexity) can be very hepful for those situations.

A clear and concise description of what you want to happen

signal-2021-10-03-104956

Look at this example of the stacktile layout for river, at the right it's a window, at the left it's the stack, the first half has only one window and the second half has a stack of windows.

A clear and concise description of any alternative solutions or features you've considered.

Instead of having a configurable layout can be a bunch of hardcoded layouts .

Additional info

I'm not sure if that is even possible with kwin, QML or the kwin API

[FEATURE]: Consider simplifying gaps configuration

Summary

In short, I want to unify outer gaps configurability: use only one spinbox instead of 4. I've never seen people using different values for Left, Right, Top and Bottom sides.

This would make adjusting the gaps much easier.

A clear and concise description of what you want to happen

One spinbox to rule them all.

A clear and concise description of any alternative solutions or features you've considered.

No response

Additional info

No response

[Bug]: No keyboard shortcut entry for spiral layout

Summary

See above

Steps to Reproduce

Go to Settings>Shortcuts>KWin
No entry for spiral layout

Expected behavior

There is an entry

Screenshots

No response

Bismuth version

most recent release, installed with wget command in readme

KDE Plasma version

5.22.5

The platform KWin is running on

X11

Additional context

No response

[FEATURE]: Missing "Cycle Layout" and "Float All" functions?"

Summary

Problem: Krohnkite originally featured shortcuts for Cycle Layout and Float All functions. Are these replicated in Bismuth, or superseded by other functions? (I might be daft.)

A clear and concise description of what you want to happen

Solution: Implement Cycle Layout and Float All functions and shortcuts. Make any language tweaks necessary to fit the new shortcut naming scheme.

A clear and concise description of any alternative solutions or features you've considered.

No response

Additional info

Thank you for this wonderful fork <3

[FEATURE]: Resize and move modes

Summary

Some tiling WM have a so-called resize mode - it is when you press some key, and then you can use arrows to adjust the window width.

A clear and concise description of what you want to happen

KWin already have a resize mode (see Resize Window shortcut). It is just Bismuth is not reacting properly to resize events. Bismuth should try to react to resize events and adjust the layout dynamically. Now it is working for the mouse, but not the keyboard resize.

A clear and concise description of any alternative solutions or features you've considered.

No response

Additional info

KWin also has a move mode, theoretically, if we can distinguish between mouse window drag and move mode drag we can implement this as well.

[DEV]: Output logs to a file

For now, debug is just a wrapper around console.log. It's better to use some logger, that can do output to the file, so that the logs can be seen not only from KWin. This will be very helpful, when debugging in Wayland.

Importing configs from Krohnkite

Hello there! I was just searching for Krohnkite related stuff on github and found this project. It seems very promising for me, and I hope it goes well.

So, is there an easy way to import Krohnkite configs directly? I have some neat shortcuts and reconfiguring them seems a pain in the ass.

Thanks for this project, really helpful!

Monocle "minimize others" prevents change of focus without minimizing first

After the wayland patch that removes the timers, this feature is completely broken. The only way I can change focus is to minimize the current window first and then change focus to the desired window.

Perhaps to fix this we will need Actions that minimize/unminimize windows? I was thinking that might be nice anyways because the binding I usually use to activate a KWin task switcher that steps through minimized windows is OK (although this issue renders it ineffectual) but not quite the behavior I would like.

I will experiment in my branch to see if I can come up with a solution for this.

install script throws error

Script doesn't installs

Operating System: Garuda Linux (Arch)
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Kernel Version: 5.13.13-zen1-1-zen (64-bit)
Graphics Platform: Wayland

 !  /m/G/S/G/bismuth   *  npm run script-install                                                                                                                                184ms  Fri 10 Sep 2021 05:15:45 PM MSK


> [email protected] prescript-install
> npm run package


> [email protected] prepackage
> npm run build


> [email protected] build
> bin/build.sh

Compiling typescript...
'res/config.ui' -> 'build/contents/ui/config.ui'
'res/popup.qml' -> 'build/contents/ui/popup.qml'
'res/main.qml' -> 'build/contents/ui/main.qml'
'res/config.xml' -> 'build/contents/config/main.xml'
'res/metadata.desktop' -> 'build/metadata.desktop'

> [email protected] package
> bin/package.sh


7-Zip [64] 17.04 : Copyright (c) 1999-2021 Igor Pavlov : 2017-08-28
p7zip Version 17.04 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,12 CPUs x64)

Scanning the drive:
8 folders, 39 files, 157944 bytes (155 KiB)

Creating archive: build/bismuth-0.9.0.kwinscript

Items to compress: 47

    
Files read from disk: 39
Archive size: 40844 bytes (40 KiB)
Everything is Ok

> [email protected] script-install
> bin/install.sh

Error: Can't find plugin metadata: bismuth

Also

./bin/install.sh line 12 should edited a bit
cp res/icons/bismuth.svg "$APP_ICONS_DIR/bismuth.svg"
to
cp ./res/icons/bismuth.svg "$APP_ICONS_DIR/bismuth.svg"

[FEATURE]: Manual tiling (i.e. windows-style snapping)

Summary

Manual tiling like windows, with joing resizing. This is something nearly every desktop has nowadays, except for KDE.

A clear and concise description of what you want to happen

Snap window to one side, resize it.
Snap another window to the other side, have it fill the empty space.
Resize any tiled window, and have the other window resized automatically in tandem.
Un-snapping a window returns the original floating size.

Basically everything that windows does, minus the snap assist which would be nice but is also a lot of work. It would require drawing an overview like https://github.com/tcorreabr/Parachute

A clear and concise description of any alternative solutions or features you've considered.

there are other kwin scripts that try to do this but they are unmaintained and bugged.

Additional info

No response

Rethink keyboard shortcuts

Current shortcuts system has an issue: there are two modes of shortcuts handling (dwm and focus style). This complicates shortcuts setup and code.

The solution is to remove these two modes and instead use separate shortcuts for focusing next and previous windows. This will simplify the code and will clear the confusion when configuring the shortcuts from the user side.

This will surely break some sort of the backwards compatibility with Krohnkite. It is why I am hesitant to fix #26 right now.

Wayland Support

Script should work in Wayland session.

Currently, it does not.

In my personal case, I will wait for the new Plasma 5.23 release, so that I can finally properly launch a Wayland session on my PC.

Provide an installation script for Pling users

I see, that some items put their contents into the archive and put a script inside like install.sh or install.py. When a script is installed within the KWin Scripts KCM, the user is asked to trust the script.

If we could implement this approach, we potentially could remove a lot of tweaks from TWEAKS.md file, as they will be performed automatically on installation.

[FEATURE]: Simple installation

Summary

Hi,
Thank you for forking and maintaining krohnkite.
I think it would be nice if you can provide a simpler installation procedure (similar to other kwin scripts).
Usually installing a kwin script is done with few files. I couldn't do that with bismuth.

A clear and concise description of what you want to happen

I had to install npm and run two scripts using npm (which I don't know what it is doing) and it took much longer compared to builtin kpackagetool5 .
Usual kwin installation using kpackagetool5 is much simpler and familiar to KDE users.

A clear and concise description of any alternative solutions or features you've considered.

No response

Additional info

No response

Monocle layout is broken

It seems to set all windows to floating without changing their geometries.

I can't find the source of it as of yet.

[Bug]: Application menu dropdown menus are tiled

Summary

I am using the application menu. When I select a category, the available choices are treated as a new window and tiled.

Steps to Reproduce

Press the menu icon or press the META key. Position the cursor on one of the available categories.

Expected behavior

The choices should appear next to the selected category.

Screenshots

Bug

Bismuth version

1.01

KDE Plasma version

5.22.5

The platform KWin is running on

Wayland

Additional context

I am using KaOS Linux with KDE Framework 5.86.0 and My Kernel is 5.13.11.

[Bug]: "Toggle Quarter Layout" shortcut doesn't work

Summary

The Toggle Quarter Layout shortcut does nothing, no matter what the shortcut is bound to.

Using Switch to the Next Layout to access Quarter Layout still works. Other layout shortcuts (including Toggle Three Column Layout) work.

Steps to Reproduce

  1. Go to Settings > Shortcuts
  2. Add any shortcut binding to System Services > Kwin > Bismuth: Toggle Quarter Layout
  3. Press the assigned binding.

Expected behavior

Pressing the assigned shortcut should enable the Quarter Layout, with a dialog appearing at the center of the display.

Screenshots

image

Bismuth version

Latest from master branch

KDE Plasma version

5.22.5

The platform KWin is running on

X11

Additional context

I took a look through the code but couldn't find a source for this unexpected behavior.

Debugging steps I've taken:

  • Cleared my system of Krohnkite remnants
  • Rebooted multiple times
  • Uninstalled/reinstalled Bismuth multiple times
  • Attempted to set a default shortcut binding in src/controller/action.ts, line 527. (No default shortcut appeared in the settings menu.)

Let me know if there's any other debugging steps I should take. Once we debug, I'll adjust this post's title to be more descriptive of the issue at hand.

And best of luck, I've got zero clue why the bug occurs o7

Provide adequate default keyboard shortcuts for basic actions

Summary

Currently, there are issues with current schema:

  • Meta-I and Meta-D shortcuts do not make sense. Meta-D conflicts with the default Plasma shortcut. I and D are apart on the keyboard.
  • Meta-L seems to be conflicting shortcut on new Plasma versions.
  • Many actions are unbound to anything, so the user is bound to map the keys themselves. We need to provide mappings to those actions.

Solution I propose:

  • Substitute Meta-I and Meta-D with Meta+[ and Meta+]. [ and ] are nearby, and this combo does not conflict with the existing shortcuts. This also make sense, since these keys are near | key on the ASCII keyboard layout, which is essentially "Next/Prev Layout". Changing the window count in the master area is also changing the layout, but in a "sublayout" sense.
  • At first glance, we cannot give up HJKL, because the arrows are occupied with even more standard shortcuts. But on the second thought, we can, because Meta+arrows are shortcuts for quick tiling and since this script basically replaces substitutes all the tiling logic, we can override these shortcuts with the user notification in the installation script.
  • Map focus of next-previous window to J and K. Map window movement accordingly with Shift.
  • Map float layout shortcuts to Meta+Shift+F, since the Meta+F is bound to "Float Window"
  • Leave the other "Switch Layout" shortcuts unbound, because the other layouts are quite esoteric, imo.

Additional info

No response

[Bug]: Can't maximize windows with bismuth

Summary

Windows can't be maximized when pressing the maximize button on the title bar. The button itself and the window adopt the shape of a maximized window but neither the size or the position of the window varies.

Steps to Reproduce

  1. Enable Bismuth
  2. Use the maximize button to maximize a window

Expected behavior

The window gets maximized as it would happen with bismuth disabled

Screenshots

No response

Bismuth version

1.0.1

KDE Plasma version

5.22.5

The platform KWin is running on

Wayland

Additional context

I also tested X11. This behaviour was possible with Khronkite

[DEV]: Write more Unit-tests

In particular:

  • All Engine public methods
  • All Controller public methods
  • All Driver public methods
  • All Actions executions
    • Actions typical executions
    • Actions layout specific executions

[FEATURE]: Consider using separate KCM for configuration

Summary

Current configuration system is very limiting. It is basically a bunch of raw values, checkboxes and strings presented in a very user unfriendly way. It is also based on the limiting technology - Qt Widgets, from which KDE is moving away from towards QML, if we are speaking about system settings.

Those limitations present a road block for some interesting UI/UX ideas, for example - layout editor, where the user can create their custom layouts (presets of how windows are arranged). It is impossible to implement this concept without writing UI logic with at least JavaScript inside QML.

A clear and concise description of what you want to happen

To counter this, it is technically possible to implement Bismuth KCM, that will provide a freedom to write any complex UI logic we want without any restrictions. It will also use modern technologies and integrate more nicely into the existing KDE HIG.

A clear and concise description of any alternative solutions or features you've considered.

No response

Additional info

A couple of advantages and disadvantages of this approach:

Advantages:

  • Freedom of UI/UX logic. With this it will be possible to implement more powerful concepts.
  • It will be possible to create separate section for shortcuts, which will partially solve messy KWin Shortctus problem.
  • Will allow us to change config without manually reloading the script.
  • Will allow us to apply some of the tweaks from the TWEAKS.md without leaving the configuration dialog.

Disadvantages:

  • Requires a lot of work and creating separate C++ project (in the subfolder).
  • While not 100%, but with high probability will break existing users' configuration.

[Bug]: Dragging a tab from chrome causes strange behaviour

Summary

Dragging a Chrome tab out in to a new window has expected behaviour (50/50 split tiling) initially, but upon letting go the original window returns to its original size

Steps to Reproduce

Open chrome on its own on a virtual desktop, create a new tab, drag tab out to new window

Expected behavior

Windows remain tiled

Screenshots

No response

Bismuth version

most recent release, installed with wget command in readme

KDE Plasma version

5.22.5

The platform KWin is running on

X11

Additional context

No response

[Bug]: Krohnkite importing script doesn't actually work

Summary

The script to import the keybindings from Krohnkite doesn't actually work.

Steps to Reproduce

  1. Run the importing script
  2. Enable Bismuth

Expected behavior

The keybindings should be the same as the ones I had on Krohnkite.

Screenshots

No response

Bismuth version

1.0.1

KDE Plasma version

5.22.5

The platform KWin is running on

X11

Additional context

Little question: does it also import the settings?

Provide a logo for the project

The project should have its own logo.

Here is one for inspiration (it's terrible, I know, but I like the idea of two letters of Bi formed from a Bismuth crystal):
Logo

Look how beautiful the real Bismuth crystal is:
image

[Bug]: Some windows are not sized properly

Summary

Some windows are not sized properly to the tiles and appear bigger then they should.

Steps to Reproduce

Just open e.g. default plasma "System Settings" app with some other windows.

Expected behavior

Window should size properly.

Screenshots

image

image

Bismuth version

1.0.1

KDE Plasma version

5.22.5

The platform KWin is running on

X11

Additional context

No response

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.