home: tridactyl: setup config
This commit is contained in:
parent
d64cb708ff
commit
db024c02d5
|
@ -5,6 +5,7 @@
|
||||||
./bat.nix
|
./bat.nix
|
||||||
./emacs.nix
|
./emacs.nix
|
||||||
./env.nix
|
./env.nix
|
||||||
|
./firefox.nix
|
||||||
./fish
|
./fish
|
||||||
./flameshot.nix
|
./flameshot.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
./themes
|
./themes
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
|
./tridactyl.nix
|
||||||
./x
|
./x
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
20
home/firefox.nix
Normal file
20
home/firefox.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.my.home.firefox;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.home.firefox = with lib; {
|
||||||
|
enable = (mkEnableOption "firefox config") // { default = config.my.home.x.enable; };
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.unstable.firefox.override {
|
||||||
|
cfg = {
|
||||||
|
enableTridactylNative = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
13
home/tridactyl.nix
Normal file
13
home/tridactyl.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.my.home.tridactyl;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.home.tridactyl = with lib; {
|
||||||
|
enable = (mkEnableOption "tridactyl code display tool") // { default = config.my.home.firefox.enable; };
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
xdg.configFile."tridactyl/tridactylrc".source = ./tridactylrc;
|
||||||
|
};
|
||||||
|
}
|
31
home/tridactylrc
Normal file
31
home/tridactylrc
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
" This wipes all existing settings. This means that if a setting in this file is
|
||||||
|
" removed, then it will return to default. In other words, this file serves as
|
||||||
|
" as an enforced single point of truth for Tridactyl's configuration.
|
||||||
|
sanitize tridactyllocal tridactylsync
|
||||||
|
|
||||||
|
" Ctrl-F should use the browser's native 'find' functionality.
|
||||||
|
unbind <C-f>
|
||||||
|
|
||||||
|
" Tridactyl has an incomplete find mode
|
||||||
|
bind / fillcmdline find
|
||||||
|
bind ? fillcmdline find -?
|
||||||
|
bind n findnext 1
|
||||||
|
bind N findnext -1
|
||||||
|
bind ,<Space> nohlsearch
|
||||||
|
|
||||||
|
" case insensitive if lowercase, case sensitive if using some uppercase letters
|
||||||
|
set findcase smart
|
||||||
|
|
||||||
|
" New reddit is bad
|
||||||
|
autocmd DocStart ^http(s?)://www.reddit.com js tri.excmds.urlmodify("-t", "www", "old")
|
||||||
|
|
||||||
|
" Orange site / Reddit / Lobste.rs specific hints to toggle comments
|
||||||
|
bind ;c hint -Jc [class*="expand"],[class="togg"],[class="comment_folder"]
|
||||||
|
|
||||||
|
" Use emacs as editor
|
||||||
|
set editorcmd emacsclient -c
|
||||||
|
|
||||||
|
" copy all the things
|
||||||
|
set yankto both
|
||||||
|
|
||||||
|
blacklistadd netflix.com
|
Loading…
Reference in a new issue