Added option 'center' for 'positionX' in config (#30)
Co-authored-by: Christopher Lübbemeier <luebbemeier@metaventis.com>
This commit is contained in:
@@ -84,7 +84,7 @@ to your `.config/swaync/` folder to customize without needing root access.
|
||||
|
||||
To reload the config, you'll need to run `swaync-client --reload-config`
|
||||
|
||||
- `positionX`: `left` or `right`
|
||||
- `positionX`: `left`, `right` or `center`
|
||||
- `positionY`: `top` or `bottom`
|
||||
- `timeout`: uint (Any positive number). The notification timeout for notifications with normal priority
|
||||
- `timeout-low`: uint (any positive number). The notification timeout for notifications with low priority
|
||||
|
@@ -1,6 +1,6 @@
|
||||
namespace SwayNotificatonCenter {
|
||||
public enum PositionX {
|
||||
RIGHT, LEFT;
|
||||
RIGHT, LEFT, CENTER;
|
||||
|
||||
public string parse () {
|
||||
EnumClass enumc = (EnumClass) typeof (PositionX).class_ref ();
|
||||
|
@@ -227,6 +227,14 @@ namespace SwayNotificatonCenter {
|
||||
GtkLayerShell.Edge.LEFT,
|
||||
true);
|
||||
break;
|
||||
case PositionX.CENTER:
|
||||
GtkLayerShell.set_anchor (this,
|
||||
GtkLayerShell.Edge.RIGHT,
|
||||
false);
|
||||
GtkLayerShell.set_anchor (this,
|
||||
GtkLayerShell.Edge.LEFT,
|
||||
false);
|
||||
break;
|
||||
default:
|
||||
GtkLayerShell.set_anchor (this,
|
||||
GtkLayerShell.Edge.LEFT,
|
||||
|
@@ -37,6 +37,12 @@ namespace SwayNotificatonCenter {
|
||||
GtkLayerShell.set_anchor (
|
||||
this, GtkLayerShell.Edge.LEFT, true);
|
||||
break;
|
||||
case PositionX.CENTER:
|
||||
GtkLayerShell.set_anchor (
|
||||
this, GtkLayerShell.Edge.RIGHT, false);
|
||||
GtkLayerShell.set_anchor (
|
||||
this, GtkLayerShell.Edge.LEFT, false);
|
||||
break;
|
||||
default:
|
||||
GtkLayerShell.set_anchor (
|
||||
this, GtkLayerShell.Edge.LEFT, false);
|
||||
|
Reference in New Issue
Block a user