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`
|
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`
|
- `positionY`: `top` or `bottom`
|
||||||
- `timeout`: uint (Any positive number). The notification timeout for notifications with normal priority
|
- `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
|
- `timeout-low`: uint (any positive number). The notification timeout for notifications with low priority
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
namespace SwayNotificatonCenter {
|
namespace SwayNotificatonCenter {
|
||||||
public enum PositionX {
|
public enum PositionX {
|
||||||
RIGHT, LEFT;
|
RIGHT, LEFT, CENTER;
|
||||||
|
|
||||||
public string parse () {
|
public string parse () {
|
||||||
EnumClass enumc = (EnumClass) typeof (PositionX).class_ref ();
|
EnumClass enumc = (EnumClass) typeof (PositionX).class_ref ();
|
||||||
|
@@ -227,6 +227,14 @@ namespace SwayNotificatonCenter {
|
|||||||
GtkLayerShell.Edge.LEFT,
|
GtkLayerShell.Edge.LEFT,
|
||||||
true);
|
true);
|
||||||
break;
|
break;
|
||||||
|
case PositionX.CENTER:
|
||||||
|
GtkLayerShell.set_anchor (this,
|
||||||
|
GtkLayerShell.Edge.RIGHT,
|
||||||
|
false);
|
||||||
|
GtkLayerShell.set_anchor (this,
|
||||||
|
GtkLayerShell.Edge.LEFT,
|
||||||
|
false);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
GtkLayerShell.set_anchor (this,
|
GtkLayerShell.set_anchor (this,
|
||||||
GtkLayerShell.Edge.LEFT,
|
GtkLayerShell.Edge.LEFT,
|
||||||
|
@@ -37,6 +37,12 @@ namespace SwayNotificatonCenter {
|
|||||||
GtkLayerShell.set_anchor (
|
GtkLayerShell.set_anchor (
|
||||||
this, GtkLayerShell.Edge.LEFT, true);
|
this, GtkLayerShell.Edge.LEFT, true);
|
||||||
break;
|
break;
|
||||||
|
case PositionX.CENTER:
|
||||||
|
GtkLayerShell.set_anchor (
|
||||||
|
this, GtkLayerShell.Edge.RIGHT, false);
|
||||||
|
GtkLayerShell.set_anchor (
|
||||||
|
this, GtkLayerShell.Edge.LEFT, false);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
GtkLayerShell.set_anchor (
|
GtkLayerShell.set_anchor (
|
||||||
this, GtkLayerShell.Edge.LEFT, false);
|
this, GtkLayerShell.Edge.LEFT, false);
|
||||||
|
Reference in New Issue
Block a user