From 35e33047e2269306688d83849c6c1371ae8a7dc7 Mon Sep 17 00:00:00 2001 From: Matthew Ess Date: Fri, 24 Jan 2020 16:19:15 -0500 Subject: [PATCH] Reorganize fish scripts --- {scripts => assets}/systemctl.fish | 0 configuration.nix | 1 + home.nix | 26 ++++++++++++++++++++++---- scripts/kbl.fish | 4 ---- scripts/mkdcd.fish | 4 ---- 5 files changed, 23 insertions(+), 12 deletions(-) rename {scripts => assets}/systemctl.fish (100%) delete mode 100644 scripts/kbl.fish delete mode 100644 scripts/mkdcd.fish diff --git a/scripts/systemctl.fish b/assets/systemctl.fish similarity index 100% rename from scripts/systemctl.fish rename to assets/systemctl.fish diff --git a/configuration.nix b/configuration.nix index bb053b3..7ddc714 100644 --- a/configuration.nix +++ b/configuration.nix @@ -51,6 +51,7 @@ fira-code fira-code-symbols font-awesome_5 + aileron ]; fontconfig = { enable = true; diff --git a/home.nix b/home.nix index 8c71518..74f136d 100644 --- a/home.nix +++ b/home.nix @@ -27,9 +27,10 @@ in { # command line utilities ag fzy + imagemagick jq tldr - imagemagick + unzip # graphical applications alacritty atom @@ -68,9 +69,26 @@ in { matthewess/fish-autovenv ''; ".config/fish/completions/systemctl.fish".source = - ./scripts/systemctl.fish; - ".config/fish/functions/kbl.fish".source = ./scripts/kbl.fish; - ".config/fish/functions/mkdcd.fish".source = ./scripts/mkdcd.fish; + ./assets/systemctl.fish; + ".config/fish/functions/kbl.fish".text = '' + function kbl -a level + set -l initial (cat /sys/class/leds/tpacpi\:\:kbd_backlight/brightness) + test -z "$level"; and set -l level $initial + echo $level > /sys/class/leds/tpacpi\:\:kbd_backlight/brightness + end + ''; + ".config/fish/functions/mkdcd.fish".text = '' + function mkdcd -a target + mkdir $target + cd $target + end + ''; + ".config/fish/functions/unz.fish".text = '' + function unz -a target + string match \*.zip $target; and set target (basename target) + unzip -d $target $target + end + ''; ".config/i3status/config".text = '' # i3status configuration file. # see "man i3status" for documentation. diff --git a/scripts/kbl.fish b/scripts/kbl.fish deleted file mode 100644 index aa968bb..0000000 --- a/scripts/kbl.fish +++ /dev/null @@ -1,4 +0,0 @@ -function kbl -a level - test -z "$level"; and set -l level (cat /sys/class/leds/tpacpi\:\:kbd_backlight/brightness) - echo $level > /sys/class/leds/tpacpi\:\:kbd_backlight/brightness -end diff --git a/scripts/mkdcd.fish b/scripts/mkdcd.fish deleted file mode 100644 index 21ae7f8..0000000 --- a/scripts/mkdcd.fish +++ /dev/null @@ -1,4 +0,0 @@ -function mkdcd -a target - mkdir $target - cd $target -end