add scripts

This commit is contained in:
tristan 2023-04-14 18:00:03 +01:00
parent e8be34d9c2
commit e871ce10c7
3 changed files with 58 additions and 9 deletions

View file

@ -9,13 +9,37 @@
home.homeDirectory = "/home/tristan";
xdg.userDirs.enable = true;
xdg.mimeApps = {
enable = true;
associations.added = {
"inode/directory" = "lf.desktop;vscodium.desktop;pcmanfm.desktop";
};
defaultApplications = {
"inode/directory" = "lf.desktop";
"text/html" = "brave-browser.desktop";
"x-scheme-handler/http" = "brave-browser.desktop";
"x-scheme-handler/https" = "brave-browser.desktop";
};
};
home.packages = with pkgs; [
exa
# script requirements
libnotify
du-dust
playerctl
grim
wl-clipboard
slurp
chafa
wofi
# utils
exa
du-dust
htop
imv
libsixel
# apps
gimp
logseq
quickemu
@ -96,10 +120,26 @@
];
};
services.mako.enable = true;
services.fnott = {
enable = true;
# https://codeberg.org/dnkl/fnott/src/branch/master/fnott.ini
settings = {
main = {
selection-helper = "wofi --show dmenu";
};
};
};
programs.ncmpcpp.enable = true;
programs.ncmpcpp.settings.mpd_host = "music.local";
programs.ncmpcpp = {
enable = true;
settings.mpd_host = "music.local";
bindings = [
{ key = "j"; command = "scroll_down"; }
{ key = "k"; command = "scroll_up"; }
{ key = "J"; command = [ "select_item" "scroll_down" ]; }
{ key = "K"; command = [ "select_item" "scroll_up" ]; }
];
};
services.mpd-mpris.enable = true;
services.mpd-mpris.mpd = {
host = "music.local";
@ -225,15 +265,16 @@
"$HOME/.local/scripts"
];
home.file.".local/scripts" = {
enable = true;
source = ./scripts;
executable = true;
recursive = true;
};
home.file.".config/hypr" = {
enable = true;
source = ./hyprland;
recursive = true;
};
home.file.".config/wofi/config".text = ''
term=foot
'';
}

View file

@ -81,8 +81,7 @@ bind=SUPER,O,exec,pcmanfm
bind=SUPER,y,exec,foot -e ytui
bind=SUPER,Z,exec,swaylock -f
bind=SUPER,T,exec,notify-send "$(date)"
bind=SUPER,s,exec,screenshotSectionClipboard
bind=SUPER_SHIFT,S,exec,screenshotSection
bind=SUPER_SHIFT,S,exec,~/.local/scripts/screenshot
bind=SUPERCTRL_SHIFT,S,exec,qrcode.sh
bind=SUPER,p,exec,hyprpicker | wl-copy; wl-paste | xargs notify-send Copied
bind=SUPER,slash,exec,brave

9
scripts/screenshot Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
OUT_DIR=${GRIM_DEFAULT_DIR:-~/Pictures/Screenshots/}
mkdir -p "$OUT_DIR"
grim -g "$(slurp -o)" - | wl-copy
notify-send "Screenshot Taken" "to the clipboard"
wl-paste > $OUT_DIR/$(date +"%Y-%m-%dT%H:%M:%SZ").png