diff --git a/README.org b/README.org index 244b1a7..9617c97 100644 --- a/README.org +++ b/README.org @@ -23,6 +23,8 @@ - [[#general][General]] - [[#programming][Programming]] - [[#ui][UI]] +- [[#npm][NPM]] + - [[#packages-1][Packages]] - [[#configuration][Configuration]] - [[#installation][Installation]] - [[#find--delete-orphaned-symlinks][Find & delete orphaned symlinks]] @@ -48,6 +50,7 @@ A repository of my personal configuration files. - [[https://github.com/internalfx/mailcap][mailcap]] - [[https://mpv.io/][mpv]] - [[https://github.com/phuhl/notify-send.py][notify-send.py]] +- [[https://www.npmjs.com/get-npm][npm]] - [[https://github.com/cdemoulins/pamixer][pamixer]] - [[https://github.com/dylanaraps/pfetch][pfetch]] - [[https://www.freedesktop.org/wiki/Software/PulseAudio/][Pulseaudio]] @@ -149,6 +152,9 @@ A repository of my personal configuration files. *** UI - [[https://github.com/morhetz/gruvbox][morhetz/gruvbox]] - [[https://github.com/ryanoasis/vim-devicons][ryanoasis/vim-devicons]] +* NPM +** Packages +- [[https://github.com/GoogleChrome/lighthouse][lighthouse]] * Configuration ** Installation diff --git a/install b/install index 862a813..222aaff 100755 --- a/install +++ b/install @@ -9,10 +9,18 @@ end function install_omf_package_if_not_exist if test (omf list | grep -c "$argv") -eq 0 + echo "Installing omf package $argv" omf install "$argv" end end +function install_npm_package_if_not_exist + if ! npm -g list --depth 1 lighthouse >/dev/null 2>&1 + echo "Installing npm package $argv" + sudo npm install -g "$argv" + end +end + # Create directories that need to exist mkdir_if_not_exist ~/.cache/mpd mkdir_if_not_exist ~/.config/alacritty @@ -65,6 +73,9 @@ end # Install Neovim plugins nvim +PlugInstall +qall +# Install npm packages +install_npm_package_if_not_exist lighthouse + # Setup broot if not done already if [ ! -d ~/.local/share/broot ] broot --install diff --git a/lighthouse/.local/bin/audit b/lighthouse/.local/bin/audit new file mode 100755 index 0000000..26890ea --- /dev/null +++ b/lighthouse/.local/bin/audit @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +. $HOME/.cache/wal/colors.sh + +localServices=$(netstat -ltpn 2>/dev/null | grep "node" | awk '{ print "http://"$4 }') +url="$(echo -e "$localServices\nOther" | dmenu -i -nb "$color0" -nf "$color15" -sb "$color1" -sf "$color15" "$@")" + +if [ "$url" == "Other" ]; then + read -r -p "Url: " url +fi + +rm -f "$HOME"/Downloads/lighthouse.html +env CHROME_PATH=/usr/local/bin/brave lighthouse --output-path="$HOME"/Downloads/lighthouse.html "$url" + +if [ -f "$HOME"/Downloads/lighthouse.html ]; then + setsid /usr/local/bin/brave ~/Downloads/lighthouse.html +else + read -r -n 1 -p "Something went wrong. Press any key to exit." +fi diff --git a/sxhkd/.config/sxhkd/sxhkdrc b/sxhkd/.config/sxhkd/sxhkdrc index db1d257..510b363 100644 --- a/sxhkd/.config/sxhkd/sxhkdrc +++ b/sxhkd/.config/sxhkd/sxhkdrc @@ -79,8 +79,8 @@ super + Escape pkill -USR1 -x sxhkd # Misc apps -ctrl + alt + {l, n, r, w, s, p, v, k} - alacritty --class float,float -e {lf, neomutt, /usr/bin/newsboat, ~/.config/polybar/bin/wttr-and-wait, spt, castero, nvim, ~/.local/bin/calendar-and-wait} +ctrl + alt + {l, n, r, w, s, p, v, k, a} + alacritty --class float,float -e {lf, neomutt, /usr/bin/newsboat, ~/.config/polybar/bin/wttr-and-wait, spt, castero, nvim, ~/.local/bin/calendar-and-wait, ~/.local/bin/audit} ctrl + alt + {b, e, S} {brave, emacs, spotify}