mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-04 19:46:53 +00:00
scratch: Simplify scratch menu
This commit is contained in:
+3
-13
@@ -64,19 +64,9 @@ function enable() {
|
||||
WindowMenu.WindowMenu.prototype._buildMenu =
|
||||
function (window) {
|
||||
let item;
|
||||
item = this.addAction(_('Scratch'), Lang.bind(this, function() {
|
||||
if (isScratchWindow(window)) {
|
||||
window.unmake_above();
|
||||
// Make sure to detach and attach the window to the
|
||||
// workspace
|
||||
window.stick();
|
||||
window.unstick();
|
||||
}
|
||||
else {
|
||||
window.make_above();
|
||||
window.stick();
|
||||
}
|
||||
}));
|
||||
item = this.addAction(_('Scratch'), () => {
|
||||
toggle(window);
|
||||
});
|
||||
if (isScratchWindow(window))
|
||||
item.setOrnament(PopupMenu.Ornament.CHECK);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user