feat: redo firefox... o:

This commit is contained in:
Kat Inskip 2025-03-20 17:32:14 -07:00
parent 34bc9ae04e
commit f113304824
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
8 changed files with 146 additions and 37 deletions

View file

@ -184,7 +184,6 @@ end
-- GPU Display
function conky_gpu_section()
gpus = gpu_csv_query()
-- TODO: Replace NVIDIA-SMI separate calls with all 1 call and a CSV parsing
local text = ""
for idx, gpu in pairs(gpus) do
for i=1,#gpu do

View file

@ -15,6 +15,7 @@ in {
pcmanfm
pavucontrol
xclip
obs-studio
];
services.i3gopher.enable = true;
xsession.windowManager.i3 = let
@ -138,6 +139,11 @@ in {
class = "^Discord$";
}
];
${workspaceNamer 13} = [
{
class = "^mpv$";
}
];
${workspaceNamer 14} = [
{
class = "^Spotify$";

View file

@ -6,8 +6,12 @@
inherit (lib.generators) toJSON;
in {
home.packages = with pkgs; [
discord
betterdiscordctl
(discord-krisp.override {
withOpenASAR = true;
withVencord = true; # can do this here too
})
vesktop
#betterdiscordctl
];
xdg.configFile."discord/settings.json".text = toJSON {} {
"SKIP_HOST_UPDATE" = true;

View file

@ -1,14 +1,46 @@
{nur, ...}: {
{pkgs, nur, ...}: let
defaultFont = "Monaspace Krypton";
in {
home.sessionVariables = {
BROWSER = "firefox";
};
home.packages = [ pkgs.ff2mpv-rust ];
programs.firefox = {
nativeMessagingHosts = [
pkgs.ff2mpv-rust
];
enable = true;
profiles = {
main = {
id = 0;
isDefault = true;
containers = {
main = {
name = "Main";
id = 0;
color = "turquoise";
icon = "pet";
};
gay = {
name = "Gay";
id = 1;
color = "purple";
icon = "pet";
};
work = {
name = "Work";
id = 2;
color = "pink";
icon = "briefcase";
};
banking = {
name = "Banking";
id = 3;
color = "turquoise";
};
};
containersForce = true;
extensions = {
packages = with nur.repos.rycee.firefox-addons; [
sponsorblock
@ -26,6 +58,15 @@
df-youtube
old-reddit-redirect
privacy-badger
tree-style-tab
move-unloaded-tabs-for-tst
tab-unload-for-tree-style-tab
tst-bookmarks-subpanel
tst-active-tab-on-scroll-bar
tst-indent-line
tst-tab-search
tst-wheel-and-double
tst-more-tree-commands
reddit-enhancement-suite
refined-github
stylus
@ -36,12 +77,64 @@
betterttv
violentmonkey
return-youtube-dislikes
iina-open-in-mpv
ff2mpv
];
force = true;
settings = {
"uBlock@raymondhill.net".settings = {
selectedFilterLists = [
"user-filters"
"ublock-filters"
"ublock-badware"
"ublock-privacy"
"ublock-quick-fixes"
"ublock-unbreak"
"easylist"
"adguard-generic"
"adguard-mobile"
"easyprivacy"
"adguard-spyware"
"adguard-spyware-url"
"urlhaus-1"
"plowe-0"
"fanboy-cookiemonster"
"ublock-cookies-easylist"
"adguard-cookies"
"ublock-cookies-adguard"
"fanboy-social"
"adguard-social"
"easylist-chat"
"easylist-newsletters"
"easylist-notifications"
"easylist-annoyances"
"adguard-mobile-app-banners"
"adguard-other-annoyances"
"adguard-popup-overlays"
"adguard-widgets"
"ublock-annoyances"
];
};
"treestyletab@piro.sakura.ne.jp".settings = {
cachedExternalAddons = [
"tst-active-tab-on-scrollbar@piro.sakura.ne.jp"
"tst-indent-line@piro.sakura.ne.jp"
];
faviconizePinnedTabs = false;
lastSelectedSubPanelProviderId = "tst-bookmarks-subpanel@piro.sakura.ne.jp";
showExpertOptions = true;
skipCollapsedTabsForTabSwitchingShortcuts = true;
tabPreviewTooltip = true;
};
};
};
settings = {
# Stylin'
font = {
default = {
x-western = defaultFont;
x-unicode = defaultFont;
};
};
# Derived from https://github.com/arcnmx/home/blob/9eb1cd4dd43883e1a0c6a2a55c00d7c3bede1776/cfg/firefox/default.nix#L7
# and https://git.ztn.sh/zotan/snowleopard/src/branch/dev/assets/prefs.js
"services.sync.engine.prefs" = false;
@ -157,7 +250,19 @@
};
userChrome = ''
#urlbar {
font-family: "Monaspace Krypton", monospace;
font-family: "${defaultFont}", monospace;
}
/* Hide horizontal tabs at the top of the window */
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar {
opacity: 0;
pointer-events: none;
}
#main-window #TabsToolbar {
visibility: collapse !important;
}
/* Hide the "Tree Style Tab" header at the top of the sidebar */
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
display: none;
}
'';
};

View file

@ -19,7 +19,6 @@
(set.filter (var: _: string.hasInfix "base" var) config.base16.defaultScheme));
in {
home.sessionVariables = mkIf config.programs.neovim.enable {EDITOR = "nvim";};
programs.neovim = {
enable = true;
vimAlias = true;
@ -57,6 +56,7 @@ in {
bufferline-nvim
# Language Server
nvim-lspconfig
rustaceanvim
# tree
nui-nvim
neo-tree-nvim
@ -95,5 +95,8 @@ in {
clangStdenv.cc
];
};
xdg.configFile."nvim/init.lua".source = initLua;
xdg.configFile = {
"nvim/init.lua".source = initLua;
"nvim/after/ftplugin/rust.lua".source = ./rust.lua;
};
}

View file

@ -0,0 +1,18 @@
local bufnr = vim.api.nvim_get_current_buf()
vim.keymap.set(
"n",
"<leader>a",
function()
vim.cmd.RustLsp('codeAction') -- supports rust-analyzer's grouping
-- or vim.lsp.buf.codeAction() if you don't want grouping.
end,
{ silent = true, buffer = bufnr }
)
vim.keymap.set(
"n",
"K", -- Override Neovim's built-in hover keymap with rustaceanvim's hover actions
function()
vim.cmd.RustLsp({'hover', 'actions'})
end,
{ silent = true, buffer = bufnr }
)