diff --git a/maddie/dmenu/dmenu-mpc b/maddie/dmenu/dmenu-mpc new file mode 100755 index 0000000..5b7b3e9 --- /dev/null +++ b/maddie/dmenu/dmenu-mpc @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +playing=$(mpc current) +[ -z "$playing" ] && playing="Stopped" + +▶️play() { mpc play ;} +⏸️pause() { mpc pause ;} +⏭️next() { mpc next ;} +⏮️prev() { mpc prev ;} +⏹️stop() { mpc stop ;} +🔄update() { mpc update ;} + +func="$(declare -F | awk '{print $3}' | dmenu -i -p "$playing":)" +[ -z "$func" ] || "$func" diff --git a/maddie/dmenu/dmenu-power b/maddie/dmenu/dmenu-power index 760fab1..64e3bdf 100755 --- a/maddie/dmenu/dmenu-power +++ b/maddie/dmenu/dmenu-power @@ -1,9 +1,9 @@ #!/bin/sh -poweroff() { sudo poweroff ;} +poweroff() { systemctl shutdown ;} restart() { killall -HUP dwm ;} -reboot() { sudo reboot ;} +reboot() { system reboot ;} lock() { bosskey ;} -func="$(declare -F | awk '{print $3}' | dmenu -i -p "Powermenu:")" +func="$(declare -F | awk '{print $3}' | dmenu -i -p "Power:")" [ -z "$func" ] || "$func" diff --git a/maddie/mpd.nix b/maddie/mpd.nix index 993646b..af1fff6 100644 --- a/maddie/mpd.nix +++ b/maddie/mpd.nix @@ -28,8 +28,8 @@ programs.ncmpcpp = { enable = true; settings = { - ncmpcpp_directory = "~/.local/share/ncmpcpp"; - lyrics_directory = "~/.local/share/lyrics"; + ncmpcpp_directory = "${config.home.homeDirectory}/.local/share/ncmpcpp"; + lyrics_directory = "${config.home.homeDirectory}/.local/share/lyrics"; }; }; } diff --git a/maddie/shell.nix b/maddie/shell.nix index 7af6ff2..1b283cb 100644 --- a/maddie/shell.nix +++ b/maddie/shell.nix @@ -27,6 +27,7 @@ # System shortcuts heif-convert-dir = "for file in *.heic; do heif-convert -q 100 $file \${file/%.heic/.jpg}; done"; unfuck-wifi = "doas systemctl restart wpa_supplicant.service"; + cdt = "cd $(mktemp -d)"; sx = "startx ~/.config/x11/xinitrc"; sdn = "doas shutdown -h now"; kys = "kill $(pidof '$@')"; @@ -47,7 +48,7 @@ LC_ALL = "en_GB.UTF-8"; # Define nixfiles location - NIXFILES = "$HOME/Development/Personal/nixfiles"; + NIXFILES = "$HOME/Development/Personal/NixFiles"; # Java windows _JAVA_AWT_WM_NONREPARENTING = 1; diff --git a/maddie/xorg.nix b/maddie/xorg.nix index 5bbede8..a47b92f 100644 --- a/maddie/xorg.nix +++ b/maddie/xorg.nix @@ -32,6 +32,11 @@ XCOMPOSECACHE = "${config.xdg.cacheHome}/x11/xcompose"; }; + # Install notify-send + home.packages = with pkgs; [ + libnotify + ]; + # Configure ~/.xinitrc programs.feh.enable = true; home.file.".xinitrc".text = '' diff --git a/overlays.nix b/overlays.nix index b44bb91..7be0f81 100644 --- a/overlays.nix +++ b/overlays.nix @@ -53,7 +53,7 @@ }); ncmpcpp = prev.ncmpcpp.override { visualizerSupport = true; - clockSupport = true; + clockSupport = false; }; nerdfonts = prev.nerdfonts.override { fonts = [ "Iosevka" "Terminus" ]; diff --git a/system/unfree.nix b/system/unfree.nix deleted file mode 100644 index 5203d7b..0000000 --- a/system/unfree.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ config, lib, ... }: -let - allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.internal.allowUnfree; -in -{ - options.internal.allowUnfree = with lib; - mkOption { - type = types.listOf types.str; - default = [ ]; - description = "Unfree packages to permit installing via the AllowUnfreePredicate"; - }; - config = { - environment.variables = { - NIXPKGS_ALLOW_UNFREE = "1"; - }; - nixpkgs.config.allowUnfreePredicate = allowUnfreePredicate; - }; -} - diff --git a/system/xorg.nix b/system/xorg.nix index 6d8a649..f8389c2 100644 --- a/system/xorg.nix +++ b/system/xorg.nix @@ -12,8 +12,6 @@ # Use startx for starting window managers displayManager = { startx.enable = true; - sessionCommands = '' - ''; }; }; } diff --git a/system/yubikey.nix b/system/yubikey.nix index 46d9af9..9b70cc5 100644 --- a/system/yubikey.nix +++ b/system/yubikey.nix @@ -1,3 +1,5 @@ + sessionCommands = '' + ''; { config, pkgs, ... }: {