Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ debian/*
!debian/control
!debian/copyright
!debian/rules
!debian/*install
.confirm_shortcut_change
.vscode
14 changes: 3 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ configure:
sh scripts/configure.sh

compile: $(sources) clean
env PROJECTS="$(PROJECTS)" sh scripts/transpile.sh
env PROJECTS="$(PROJECTS)" ./scripts/transpile.sh

# Rebuild, install, reconfigure local settings, restart shell, and listen to journalctl logs
debug: depcheck compile install install-system76-plugins configure enable restart-shell listen
debug: depcheck compile install configure enable restart-shell listen

depcheck:
@echo depcheck
Expand All @@ -57,20 +57,12 @@ disable:
listen:
journalctl -o cat -n 0 -f "$$(which gnome-shell)" | grep -v warning

local-install: depcheck compile install install-system76-plugins configure enable restart-shell
local-install: depcheck compile install configure enable restart-shell

install:
rm -rf $(INSTALLBASE)/$(INSTALLNAME)
mkdir -p $(INSTALLBASE)/$(INSTALLNAME) $(PLUGIN_BASE) $(SCRIPTS_BASE)
cp -r _build/* $(INSTALLBASE)/$(INSTALLNAME)/
cp -r src/plugins/* $(PLUGIN_BASE)
cp -r src/scripts/* $(SCRIPTS_BASE)
chmod +x $(PLUGIN_BASE)/**/*.js $(SCRIPTS_BASE)/*

install-system76-plugins:
mkdir -p $(SCRIPTS_BASE)
cp -r src/scripts_system76/* $(SCRIPTS_BASE)
chmod +x $(SCRIPTS_BASE)/*

uninstall:
rm -rf $(INSTALLBASE)/$(INSTALLNAME)
Expand Down
65 changes: 8 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ If you want to uninstall the extension, you may invoke `make uninstall`, and the

### Packaging status

- [Fedora](https://src.fedoraproject.org/rpms/gnome-shell-extension-pop-shell/): `sudo dnf install gnome-shell-extension-pop-shell`
- [Fedora](https://src.fedoraproject.org/rpms/gnome-shell-extension-pop-shell/): `sudo dnf install gnome-shell-extension-pop-shell`
- [Gentoo](https://packages.gentoo.org/packages/gnome-extra/gnome-shell-extension-pop-shell): `emerge gnome-shell-extension-pop-shell`
- [Arch Linux](https://aur.archlinux.org/packages/?O=0&K=gnome-shell-extension-pop-shell) (Using Yay as AUR helper):
- [Arch Linux](https://aur.archlinux.org/packages/?O=0&K=gnome-shell-extension-pop-shell) (Using Yay as AUR helper):
- `yay -S gnome-shell-extension-pop-shell`
- For precompiled binary version: `yay -S gnome-shell-extension-pop-shell-bin`
- For GitHub repository version: `yay -S gnome-shell-extension-pop-shell-git`
Expand Down Expand Up @@ -142,29 +142,19 @@ Switching focus to the left will calculate from the center of the east side of t

### Launcher

The launcher is summoned with `Super` + `/`. The search list displays matching windows based on their window name and title, and applications on the system which can be launched. The arrow keys are used to select an application or window from the search list. If it is a window, the selected window will be visually highlighted with an overlay. Pressing `Return` on a window will bring that window to focus, switching to its workspace, and unminimizing it if it was minimized.

#### Launcher Modes

By default, the launcher searches windows and applications. However, you can designate a special launch mode using one of the supported prefixes:

- `:`: Execute a command in `sh`
- `run` | `t:`: Execute a command in `sh` in a terminal
- `=`: Calculator mode, powered by [MathJS](https://mathjs.org/)
- `/` | `~`: Navigate and open directories and files in the file system
- `d:`: Search recent documents
Pop Shell provides an integrated launcher which interfaces directly with our [pop-launcher](https://github.com/pop-os/launcher) service. JSON IPC is used to communicate between the shell and the launcher in an asynchronous fashion. This functionality was separated from the shell due to performance and maintainability issues. The new launcher is written in Rust and fully async. The launcher has extensive features that would be useful for implementing desktop launchers beyond a shell extension.

### Inner and Outer Gaps

Gaps improve the aesthetics of tiled windows and make it easier to grab the edge of a specific window. We've decided to add support for inner and outer gaps, and made these settings configurable in the extension's popup menu.

### Hiding Window Title Bars

Windows with server-side decorations may have their title bars completely hidden, resulting in additional screen real estate for your applications, and a visually cleaner environment. This feature can be toggled in the extension's popup menu. Windows can be moved with the mouse by holding `Super` when clicking and dragging a window to another location. Windows may be closed by pressing GNOME's default `Super` + (`grave` / `~`) shortcut.
Windows with server-side decorations may have their title bars completely hidden, resulting in additional screen real estate for your applications, and a visually cleaner environment. This feature can be toggled in the extension's popup menu. Windows can be moved with the mouse by holding `Super` when clicking and dragging a window to another location, or using the keyboard shortcuts native to pop-shell. Windows may be closed by pressing `Super` + `Q`, and maximized with `Super` + `M`.

---

## Stacking Mode
## Floating Mode

This is the default mode of Pop Shell, which combines traditional stacking window management, with optional tiling window management features.

Expand All @@ -178,30 +168,18 @@ An optional feature to improve your tiling experience is the ability to snap win

---

## Auto-Tile Mode
## Tiling Mode

This provides the tiling window manager experience, where windows are automatically tiled across the screen as they are created. This feature is disabled by default but can be enabled through the extension's popup menu in the panel. When enabled, windows that were launched before enabling it will not be associated with any tree. Dragging and dropping them will begin to tile them in a tree.
Disabled by default, this mode manages windows using a tree-based tiling window manager. Similar to i3, each node of the tree represents two branches. A branch may be a window, a fork containing more branches, or a stack that contains many windows. Each branch represents a rectangular area of space on the screen, and can be subdivided by creating more branches inside of a branch. As windows are created, they are assigned to the window or stack that is actively focused, which creates a new fork on a window, or attaches the window to the focused stack. As windows are destroyed, the opposite is performed to compress the tree and rearrange windows to their new dimensions.

### Keyboard Shortcuts

- `Super` + `O`
- Toggles the orientation of a fork's tiling orientation
- `Super` + `G`
- Toggles a window between floating and tiling.
- Toggles a window between floating and tiling.
- See [#customizing the window float list](#customizing-the-floating-window-list)

### Feature Overview

- If no windows are on a display, a newly-opened window will start maximized on the display
- As new windows are opened, they are tiled into the currently focused window
- Windows can be detached and reattached to different areas of the tree by dragging and dropping them
- The default tiling orientation is based on the dimensions of the window being attached to
- The tiling orientation of the fork associated with the focused window can be altered with `Super` + `O`.
- The division of space between branches in a fork can be altered by resizing windows
- Window resizes can be carried out with the mouse
- Tiling mode may also be used to adjust sizes with the keyboard
- Ultra-wide displays are treated as two separate displays by default (**Unimplemented**)

### Customizing the Floating Window List
There is file `$XDG_CONFIG_HOME/pop-shell/config.json` where you can add the following structure:
```
Expand All @@ -214,26 +192,6 @@ For example, doing `xprop` on GNOME Settings (or GNOME Control Center), the WM_C

After applying changes in `config.json`, you can reload the tiling if it doesn't work the first time.

## Plugins

### Launcher Plugins

Pop Shell supports extending the functionality of its launcher and comes with some plugins by default. System plugins are stored in `/usr/lib/pop-shell/launcher/`, while user plugins are stored in `$HOME/.local/share/pop-shell/launcher/`. Some plugins are included by default:

- [calc](src/plugins/calc)
- [files](src/plugins/files)
- [pulse](src/plugins/pulse)
- [recent](src/plugins/recent)
- [terminal](src/plugins/terminal)
- [web](src/plugins/web)
- [scripts](src/plugin_scripts.ts)

> Plugin developers, see [the API documentation for the launcher API](src/plugins/README.md).

### Scripts Plugin

This built-in plugin displays scripts in search results. Included with Pop Shell is a set of scripts for log out, reboot, and power off. Scripts are stored in `/usr/lib/pop-shell/scripts/` and `$HOME/.local/share/pop-shell/scripts/`. [See the included scripts as an example of how to create our own](src/scripts/).

## Developers

Due to the risky nature of plain JavaScript, this GNOME Shell extension is written in [TypeScript](https://www.typescriptlang.org/). In addition to supplying static type-checking and self-documenting classes and interfaces, it allows us to write modern JavaScript syntax whilst supporting the generation of code for older targets.
Expand All @@ -248,13 +206,6 @@ While working on the shell, you can recompile, reconfigure, reinstall, and resta

[Discussions welcome on Pop Chat](https://chat.pop-os.org/community/channels/dev)

## GNOME JS
GNOME JS is a little different from standard JS, so the included `Makefile` runs `sed` on the transpiled JavaScript to convert the small number of differences between JS and GJS. Notably, GJS only partially supports ES2015, and has its own module system which works differently from what ES2015 expects. The sed scripts will replace `import` and `export` statements with the expected GNOME variants.

```js
const Me = imports.misc.extensionUtils.getCurrentExtension();
```

## License

Licensed under the GNU General Public License, Version 3.0, ([LICENSE](LICENSE) or https://www.gnu.org/licenses/gpl-3.0.en.html)
Expand Down
2 changes: 1 addition & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pop-shell (1.1.0) focal; urgency=medium

* Bug fixes & Launcher update w/ plugin support
* Bug fixes & Launcher update w/ plugin support

-- Michael Aaron Murphy <[email protected]> Fri, 11 Dec 2020 13:27:27 -0700

Expand Down
6 changes: 1 addition & 5 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@ Standards-Version: 3.9.8
Homepage: https://github.com/pop-os/shell
Vcs-Git: https://github.com/pop-os/shell

Package: pop-shell-plugin-system76-power
Architecture: all
Depends: pop-shell, system76-power
Description: Launcher integration with system76-power

Package: pop-shell
Architecture: all
Depends:
${misc:Depends},
pop-launcher,
pop-shell-shortcuts,
fd-find
Recommends: pop-shell-plugin-system76-power
Expand Down
2 changes: 1 addition & 1 deletion debian/pop-shell.install → debian/install
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
schemas/org.gnome.shell.extensions.pop-shell.gschema.xml usr/share/glib-2.0/schemas
keybindings/*.xml usr/share/gnome-control-center/keybindings
usr/
usr
4 changes: 0 additions & 4 deletions debian/pop-shell-plugin-system76-power.files

This file was deleted.

13 changes: 2 additions & 11 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,9 @@
#export DH_VERBOSE=1

BASEDIR=debian/pop-shell/usr/share/gnome-shell/extensions/[email protected]
DESTDIR=debian/tmp

%:
dh $@

override_dh_install:
make install-system76-plugins DESTDIR=$(DESTDIR)
dh_movefiles
dh_install
rm -rf $(BASEDIR)/schemas

override_dh_fixperms:
dh_fixperms
chmod +x debian/pop-shell/usr/lib/pop-shell/launcher/**/*.js
chmod +x debian/pop-shell/usr/lib/pop-shell/scripts/*
override_dh_auto_install:
dh_auto_install --destdir=debian/tmp
6 changes: 3 additions & 3 deletions scripts/transpile.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ glib-compile-schemas schemas &

for proj in ${PROJECTS}; do
mkdir -p _build/${proj}
tsc --p src/${proj} &
tsc --p src/${proj}
done

tsc &
tsc

wait

Expand All @@ -34,7 +34,7 @@ cp -r metadata.json icons schemas *.css _build &

for src in $(find target -name '*.js'); do
dest=$(echo $src | sed s#target#_build#g)
transpile &
transpile
done

wait
145 changes: 0 additions & 145 deletions src/app_info.ts

This file was deleted.

Loading