Skip to content

Commit

Permalink
Document how to open windows in the center of the screen
Browse files Browse the repository at this point in the history
  • Loading branch information
sonnyp committed Jun 13, 2021
1 parent bdbf308 commit d44e355
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 27 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ install/
flatpak/
node_modules/
repo/
tests/
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ install/
flatpak/
node_modules/
repo/
tests/
21 changes: 0 additions & 21 deletions CHANGELOG.md

This file was deleted.

22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,24 @@ To abort and dismiss Commit, press the Cancel button or the _Escape_ key.
- Supports Mercurial commit messages
- Welcome window when launched from desktop (or without argument)

## Tips and trick

### Open Commit in the center of the screen

On GNOME you can make all new windows open in the center using

```sh
gsettings set org.gnome.mutter center-new-windows true
```

or set and use the move-to-center keybinding

```sh
gsettings set org.gnome.desktop.wm.keybindings move-to-center "['<Super><Control><Shift>Space']"
```

</details>

## Development

```sh
Expand All @@ -50,7 +68,7 @@ cd Commit

Make changes and hit `Ctrl+Shift+Q` on the Commit window to restart it.

To pass the tests you will have to install a few dependencies
To pass the tests you have to install a few dependencies

```
# Install development dependencies
Expand All @@ -63,6 +81,8 @@ flatpak install --user --assumeyes --noninteractive flathub org.freedesktop.apps
make test
```

Flathub builds https://flathub.org/builds/#/apps/re.sonny.Commit

## Building

<details>
Expand Down
3 changes: 0 additions & 3 deletions src/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ export default function Application({ version }) {
Gio.ApplicationFlags.NON_UNIQUE,
});

GLib.set_prgname("re.sonny.Commit");
GLib.set_application_name("Commit");

// Open gets called when a file is passed as a command=line argument.
// We expect Git or Mercurial to pass us one file.
application.connect("open", (self, files, hint) => {
Expand Down
3 changes: 3 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { programInvocationName } from "system";

import Application from "./application.js";

GLib.set_prgname("re.sonny.Commit");
GLib.set_application_name("Commit");

export default function main(argv, { version }) {
const application = new Application({ version });

Expand Down

0 comments on commit d44e355

Please sign in to comment.