scripts, fixes

This commit is contained in:
Maddie H 2023-03-10 21:36:36 +00:00
parent b63282e3f8
commit 245fd26c92
No known key found for this signature in database
GPG Key ID: 64FAA9959751687D
9 changed files with 29 additions and 28 deletions

14
maddie/dmenu/dmenu-mpc Executable file
View File

@ -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"

View File

@ -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"

View File

@ -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";
};
};
}

View File

@ -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;

View File

@ -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 = ''

View File

@ -53,7 +53,7 @@
});
ncmpcpp = prev.ncmpcpp.override {
visualizerSupport = true;
clockSupport = true;
clockSupport = false;
};
nerdfonts = prev.nerdfonts.override {
fonts = [ "Iosevka" "Terminus" ];

View File

@ -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;
};
}

View File

@ -12,8 +12,6 @@
# Use startx for starting window managers
displayManager = {
startx.enable = true;
sessionCommands = ''
'';
};
};
}

View File

@ -1,3 +1,5 @@
sessionCommands = ''
'';
{ config, pkgs, ... }:
{