aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDeposite Pirate2025-01-26 06:28:39 +0100
committerDeposite Pirate2025-01-26 06:28:39 +0100
commit7eccc43affd86423c649c7ffd66ab0b21d429f8a (patch)
tree964bd300c27289aba6f911e1886dec04739bfb19 /functions
parent8195e6ade375717aec62a9d4e32b8e8bc3e01125 (diff)
Move browser functions to separate files.
modified: conf.d/05browser.fish new file: functions/www.fish new file: functions/wwwsearch.fish
Diffstat (limited to 'functions')
-rw-r--r--functions/www.fish8
-rw-r--r--functions/wwwsearch.fish8
2 files changed, 16 insertions, 0 deletions
diff --git a/functions/www.fish b/functions/www.fish
new file mode 100644
index 0000000..0ae1e86
--- /dev/null
+++ b/functions/www.fish
@@ -0,0 +1,8 @@
+function www --description "Browse the WWW"
+ if test -z $argv
+ webbrowser &>/dev/null
+ return
+ end
+
+ webbrowser $argv &>/dev/null
+end
diff --git a/functions/wwwsearch.fish b/functions/wwwsearch.fish
new file mode 100644
index 0000000..f07bbcc
--- /dev/null
+++ b/functions/wwwsearch.fish
@@ -0,0 +1,8 @@
+function wwwsearch --description "Search on the WWW"
+ if test -z $argv
+ webbrowser $WEBSEARCH &>/dev/null
+ return
+ end
+
+ webbrowser "$WEBSEARCH/$argv" &>/dev/null
+end