aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-07-07 17:31:10 +0200
committerAdrian Kummerlaender2018-07-07 17:31:10 +0200
commit7696a056cb69649eae83eeea0bfa53575a1f405d (patch)
tree1808e42ace0af70f1a62e2f02cc428bf996852d7
parent76cb1ea2e2c8a7100e8d6086cb721a3a737c6993 (diff)
downloadnixos_home-7696a056cb69649eae83eeea0bfa53575a1f405d.tar
nixos_home-7696a056cb69649eae83eeea0bfa53575a1f405d.tar.gz
nixos_home-7696a056cb69649eae83eeea0bfa53575a1f405d.tar.bz2
nixos_home-7696a056cb69649eae83eeea0bfa53575a1f405d.tar.lz
nixos_home-7696a056cb69649eae83eeea0bfa53575a1f405d.tar.xz
nixos_home-7696a056cb69649eae83eeea0bfa53575a1f405d.tar.zst
nixos_home-7696a056cb69649eae83eeea0bfa53575a1f405d.zip
Setup twmn for displaying notifications
-rw-r--r--gui/conf/xmonad.hs3
-rw-r--r--gui/twmn.nix46
-rw-r--r--gui/xmonad.nix1
3 files changed, 50 insertions, 0 deletions
diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs
index 9354c6d..cab108a 100644
--- a/gui/conf/xmonad.hs
+++ b/gui/conf/xmonad.hs
@@ -121,6 +121,9 @@ customKeybindings =
, ("M-w S-k" , withFocused $ placeFloating dropDownLarge)
, ("M-w h" , withFocused $ placeFloating sideBarLeft)
, ("M-w l" , withFocused $ placeFloating sideBarRight)
+-- system information
+ , ("M-i t" , spawn "notify-send \"`date +%T`\" \"`date +\"%Y-%m-%d\"`\"")
+ , ("M-i b" , spawn "notify-send Battery \"`acpi | cut -c 10-`\"")
-- system control
, ("M-c <Up>" , spawn "amixer sset Master 10%+")
, ("M-c <Down>" , spawn "amixer sset Master 10%-")
diff --git a/gui/twmn.nix b/gui/twmn.nix
new file mode 100644
index 0000000..9ae6848
--- /dev/null
+++ b/gui/twmn.nix
@@ -0,0 +1,46 @@
+{ pkgs, ... }:
+
+{
+ home.packages = with pkgs; [
+ twmn
+ libnotify
+ ];
+
+ systemd.user.services.twmnd = {
+ Unit = {
+ Description = "twmn notification deamon";
+ After = [ "graphical-session-pre.target" ];
+ PartOf = [ "graphical-session.target" ];
+ };
+
+ Install = {
+ WantedBy = [ "graphical-session.target" ];
+ };
+
+ Service = {
+ Environment = "PATH=%h/.nix-profile/bin";
+ ExecStart = "${pkgs.twmn}/bin/twmnd";
+ Restart = "on-failure";
+ };
+ };
+
+ home.file.".config/twmn/twmn.conf".text = ''
+ [gui]
+ always_on_top=true
+ background_color=#909737
+ bounce=true
+ font=Iosevka
+ font_size=15
+ foreground_color=#111111
+ height=20
+ in_animation=5
+ in_animation_duration=500
+ opacity=100
+ out_animation=6
+ out_animation_duration=500
+ position=bottom_right
+ screen=0
+ [main]
+ duration=5000
+ '';
+}
diff --git a/gui/xmonad.nix b/gui/xmonad.nix
index bf7c0d5..31f5832 100644
--- a/gui/xmonad.nix
+++ b/gui/xmonad.nix
@@ -4,6 +4,7 @@
imports = [
./gtk.nix
./rofi.nix
+ ./twmn.nix
];
xsession = {