Add modules/shell/surfraw

This commit is contained in:
Henrik Lissner 2019-11-26 17:07:35 -05:00
parent b58381faf0
commit 282f33605e
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
4 changed files with 41 additions and 0 deletions

28
config/surfraw/elvi/twitter Executable file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env sh
#
# AUTHOR: Henrik Lissner
#
# DATE: Tue Nov 26 2019
#
# DESC: Elvi to search twitter
# elvis: twitter -- Search twitter
. surfraw || exit 1
w3_usage_hook () {
cat <<EOF
Usage: $w3_argv0 [options] [search words]...
Description:
Search twitter (twitter.com)
EOF
w3_global_usage
}
w3_config
w3_parse_args "$@"
if [ -z "$w3_args" ]; then
w3_browse_url "https://twitter.com"
else
args="$(w3_url_of_arg $we_args)"
w3_browse_url "https://twitter.com/search?q=${args}"
fi

View file

@ -24,6 +24,7 @@
./modules/shell/gnupg.nix
./modules/shell/ncmpcpp.nix
./modules/shell/pass.nix
./modules/shell/surfraw.nix
./modules/shell/zsh.nix
# ./modules/video/kdenlive.nix
# ./modules/video/obs.nix

View file

@ -22,6 +22,7 @@ in {
./modules/shell/git.nix
./modules/shell/gnupg.nix
./modules/shell/pass.nix
./modules/shell/surfraw.nix
./modules/shell/zsh.nix
# ./modules/video/obs.nix

11
modules/shell/surfraw.nix Normal file
View file

@ -0,0 +1,11 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
surfraw
];
home-manager.users.hlissner.xdg.configFile = {
"surfraw".source = <config/surfraw>;
};
}