File tree Expand file tree Collapse file tree 4 files changed +84
-29
lines changed Expand file tree Collapse file tree 4 files changed +84
-29
lines changed Original file line number Diff line number Diff line change @@ -836,37 +836,13 @@ in {
836
836
import ./tabby-admin.nix { sock = "./tabby.sock" ; }
837
837
} /bin/tabby-admin" ;
838
838
}
839
- // fj . mkFirejailCustom {
839
+ // fj . mkFirejailOffline {
840
840
pkg = "vi" ;
841
841
exe = "${ vi } /bin/vi" ;
842
- profile = pkgs . writeText "vi.local" ''
843
- no3d
844
- nosound
845
- apparmor
846
- caps.drop all
847
- machine-id
848
- net none
849
- netfilter
850
- nodvd
851
- nogroups
852
- noinput
853
- nonewprivs
854
- noprinters
855
- noroot
856
- notv
857
- nou2f
858
- novideo
859
- shell none
860
-
861
- disable-mnt
862
- seccomp
863
- x11 none
864
-
865
- dbus-system none
866
- dbus-user none
867
-
868
- restrict-namespaces
869
- '' ;
842
+ }
843
+ // fj . mkFirejailOffline {
844
+ pkg = "hoogle-w3m" ;
845
+ exe = "${ import ./hoogle-w3m.nix } /bin/hoogle-w3m" ;
870
846
} ;
871
847
#
872
848
# Home
Original file line number Diff line number Diff line change @@ -22,6 +22,41 @@ in rec {
22
22
inherit profile ;
23
23
} ;
24
24
} ;
25
+ mkFirejailOffline = {
26
+ pkg ,
27
+ exe ,
28
+ } :
29
+ mkFirejailCustom {
30
+ inherit pkg exe ;
31
+ profile = pkgs . writeText "${ pkg } .local" ''
32
+ no3d
33
+ nosound
34
+ apparmor
35
+ caps.drop all
36
+ machine-id
37
+ net none
38
+ netfilter
39
+ nodvd
40
+ nogroups
41
+ noinput
42
+ nonewprivs
43
+ noprinters
44
+ noroot
45
+ notv
46
+ nou2f
47
+ novideo
48
+ shell none
49
+
50
+ disable-mnt
51
+ seccomp
52
+ x11 none
53
+
54
+ dbus-system none
55
+ dbus-user none
56
+
57
+ restrict-namespaces
58
+ '' ;
59
+ } ;
25
60
mkFirejailProfile = {
26
61
pkg ,
27
62
dir ,
Original file line number Diff line number Diff line change
1
+ let
2
+ pkgs = import ./nixpkgs.nix ;
3
+ in
4
+ pkgs . writeShellApplication {
5
+ name = "hoogle-w3m" ;
6
+ text = ''
7
+ hoogle serve --port=8081 &
8
+
9
+ HOOGLE_PID="$!"
10
+
11
+ cleanup() {
12
+ kill "$HOOGLE_PID" 2>/dev/null
13
+ exit 0
14
+ }
15
+
16
+ trap cleanup SIGINT SIGTERM EXIT
17
+
18
+ ${ pkgs . w3m } /bin/w3m -o confirm_qq=0 "http://localhost:8081/?hoogle=$*"
19
+
20
+ cleanup
21
+ '' ;
22
+ }
Original file line number Diff line number Diff line change @@ -783,3 +783,25 @@ let g:neoformat_toml_prettier = {
783
783
let g: tabby_agent_start_command = [" tabby-agent" , " --stdio" ]
784
784
let g: tabby_inline_completion_trigger = " manual"
785
785
let g: tabby_inline_completion_keybinding_accept = ' <M-\>'
786
+
787
+ "
788
+ " => Hoogle
789
+ "
790
+
791
+ function ! HoogleW3m (str)
792
+ tabnew
793
+ execute " terminal hoogle-w3m '" . a: str . " '"
794
+ endfunction
795
+
796
+ function ! HoogleW3mVisual () range
797
+ let l: saved_reg = @"
798
+ execute " normal! vgvy"
799
+ let l: pattern = @"
800
+ call CmdLine (" H " . l: pattern )
801
+ let @/ = l: pattern
802
+ let @" = l: saved_reg
803
+ endfunction
804
+
805
+ command ! -nargs =* H call HoogleW3m (<q-args> )
806
+ nnoremap <silent> H :call HoogleW3m(expand("<cword> "))<CR>
807
+ vnoremap <silent> H :call HoogleW3mVisual()<CR>
You can’t perform that action at this time.
0 commit comments