1
Fork 0

Configured anyrun

This commit is contained in:
Matei Adriel 2023-08-19 22:13:34 +03:00
parent d0073fbee4
commit c86e6c6d5e
No known key found for this signature in database
9 changed files with 209 additions and 53 deletions

View file

@ -48,6 +48,7 @@
"nvim-lspconfig": { "branch": "master", "commit": "a981d4447b92c54a4d464eb1a76b799bc3f9a771" }, "nvim-lspconfig": { "branch": "master", "commit": "a981d4447b92c54a4d464eb1a76b799bc3f9a771" },
"nvim-tree.lua": { "branch": "master", "commit": "18c7a3119839adc4599d838726deae662859c8b2" }, "nvim-tree.lua": { "branch": "master", "commit": "18c7a3119839adc4599d838726deae662859c8b2" },
"nvim-treesitter": { "branch": "master", "commit": "93ee00cd9daf8d2e3fbaa2a18b8b9adcb4471b16" }, "nvim-treesitter": { "branch": "master", "commit": "93ee00cd9daf8d2e3fbaa2a18b8b9adcb4471b16" },
"nvim-treesitter-context": { "branch": "master", "commit": "a17c31268b56d53624fdc9cb03a225d4a17cabdb" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9e519b6146512c8e2e702faf8ac48420f4f5deec" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "9e519b6146512c8e2e702faf8ac48420f4f5deec" },
"nvim-web-devicons": { "branch": "master", "commit": "ab899311f8ae00a47eae8e0879506cead8eb1561" }, "nvim-web-devicons": { "branch": "master", "commit": "ab899311f8ae00a47eae8e0879506cead8eb1561" },
"nvim_context_vt": { "branch": "master", "commit": "f44f46ecad6e6983fd04dac84c5a5c03815d3427" }, "nvim_context_vt": { "branch": "master", "commit": "f44f46ecad6e6983fd04dac84c5a5c03815d3427" },

View file

@ -44,11 +44,11 @@ function M.on_attach(client, bufnr)
if client.supports_method("textDocument/formatting") then if client.supports_method("textDocument/formatting") then
nmap("<leader>F", format, "[F]ormat") nmap("<leader>F", format, "[F]ormat")
-- vim.api.nvim_create_autocmd("BufWritePre", { vim.api.nvim_create_autocmd("BufWritePre", {
-- group = vim.api.nvim_create_augroup("LspFormatting", { clear = false }), group = vim.api.nvim_create_augroup("LspFormatting", { clear = false }),
-- buffer = bufnr, buffer = bufnr,
-- callback = format, callback = format,
-- }) })
end end
-- }}} -- }}}
-- {{{ Go to declaration / references / implementation -- {{{ Go to declaration / references / implementation
@ -178,6 +178,7 @@ local servers = {
jsonls = {}, jsonls = {},
dhall_lsp_server = {}, dhall_lsp_server = {},
typst_lsp = {}, typst_lsp = {},
elmls = {},
-- {{{ Inactive -- {{{ Inactive
-- pylsp = {}, -- pylsp = {},
-- pyright = {}, -- pyright = {},

View file

@ -33,7 +33,7 @@ local M = {
"vim", "vim",
"yaml", "yaml",
"nix", "nix",
"lua" "lua",
}, },
sync_install = false, sync_install = false,
--}}} --}}}
@ -91,6 +91,13 @@ local M = {
event = "BufReadPost", event = "BufReadPost",
cond = env.vscode.not_active(), cond = env.vscode.not_active(),
}, },
{
-- show context at top of file
"nvim-treesitter/nvim-treesitter-context",
event = "BufReadPost",
cond = env.vscode.not_active(),
opts = { enable = true },
},
} }
return M return M

View file

@ -43,6 +43,27 @@
"type": "github" "type": "github"
} }
}, },
"anyrun-nixos-options": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1691142041,
"narHash": "sha256-ik4CHY1xck8je6IKPB3w8rGq1uO9TYDFczTyMXdbB4k=",
"owner": "n3oney",
"repo": "anyrun-nixos-options",
"rev": "a4ba8f84f6b5c5771bc0f30dc0f4241d39b43208",
"type": "github"
},
"original": {
"owner": "n3oney",
"repo": "anyrun-nixos-options",
"type": "github"
}
},
"base16": { "base16": {
"inputs": { "inputs": {
"fromYaml": "fromYaml" "fromYaml": "fromYaml"
@ -249,6 +270,24 @@
} }
}, },
"flake-parts_2": { "flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1690933134,
"narHash": "sha256-ab989mN63fQZBFrkk4Q8bYxQCktuHmBIBqUG1jl6/FQ=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "59cf3f1447cfc75087e7273b04b31e689a8599fb",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"neovim-nightly-overlay", "neovim-nightly-overlay",
@ -269,9 +308,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_3": { "flake-parts_4": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib_2"
}, },
"locked": { "locked": {
"lastModified": 1685662779, "lastModified": 1685662779,
@ -286,7 +325,7 @@
"type": "indirect" "type": "indirect"
} }
}, },
"flake-parts_4": { "flake-parts_5": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"neovim-nightly-overlay", "neovim-nightly-overlay",
@ -309,9 +348,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_5": { "flake-parts_6": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib_2" "nixpkgs-lib": "nixpkgs-lib_3"
}, },
"locked": { "locked": {
"lastModified": 1685662779, "lastModified": 1685662779,
@ -327,7 +366,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_6": { "flake-parts_7": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nixpkgs-wayland", "nixpkgs-wayland",
@ -472,7 +511,7 @@
}, },
"hercules-ci-agent": { "hercules-ci-agent": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_4", "flake-parts": "flake-parts_5",
"haskell-flake": "haskell-flake", "haskell-flake": "haskell-flake",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
@ -491,7 +530,7 @@
}, },
"hercules-ci-effects": { "hercules-ci-effects": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_3", "flake-parts": "flake-parts_4",
"hercules-ci-agent": "hercules-ci-agent", "hercules-ci-agent": "hercules-ci-agent",
"nixpkgs": [ "nixpkgs": [
"neovim-nightly-overlay", "neovim-nightly-overlay",
@ -661,7 +700,7 @@
"lib-aggregate": { "lib-aggregate": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"nixpkgs-lib": "nixpkgs-lib_3" "nixpkgs-lib": "nixpkgs-lib_4"
}, },
"locked": { "locked": {
"lastModified": 1686485342, "lastModified": 1686485342,
@ -704,7 +743,7 @@
"neovim-nightly-overlay": { "neovim-nightly-overlay": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_3",
"hercules-ci-effects": "hercules-ci-effects", "hercules-ci-effects": "hercules-ci-effects",
"neovim-flake": "neovim-flake", "neovim-flake": "neovim-flake",
"nixpkgs": [ "nixpkgs": [
@ -727,7 +766,7 @@
}, },
"nix-eval-jobs": { "nix-eval-jobs": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_6", "flake-parts": "flake-parts_7",
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
@ -746,7 +785,7 @@
}, },
"nixd": { "nixd": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_5", "flake-parts": "flake-parts_6",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
@ -818,11 +857,11 @@
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"dir": "lib", "dir": "lib",
"lastModified": 1685564631, "lastModified": 1690881714,
"narHash": "sha256-8ywr3AkblY4++3lIVxmrWZFzac7+f32ZEhH/A8pNscI=", "narHash": "sha256-h/nXluEqdiQHs1oSgkOOWF+j8gcJMWhwnZ9PFabN6q0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4f53efe34b3a8877ac923b9350c874e3dcd5dc0a", "rev": "9e1960bc196baf6881340d53dccb203a951745a2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -852,6 +891,24 @@
} }
}, },
"nixpkgs-lib_3": { "nixpkgs-lib_3": {
"locked": {
"dir": "lib",
"lastModified": 1685564631,
"narHash": "sha256-8ywr3AkblY4++3lIVxmrWZFzac7+f32ZEhH/A8pNscI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4f53efe34b3a8877ac923b9350c874e3dcd5dc0a",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib_4": {
"locked": { "locked": {
"lastModified": 1686445117, "lastModified": 1686445117,
"narHash": "sha256-QfbAtKFmh92rv0j1e9d7EDgPLDERn1EY6FGXwKG09SM=", "narHash": "sha256-QfbAtKFmh92rv0j1e9d7EDgPLDERn1EY6FGXwKG09SM=",
@ -972,6 +1029,7 @@
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"anyrun": "anyrun", "anyrun": "anyrun",
"anyrun-nixos-options": "anyrun-nixos-options",
"catppuccin-base16": "catppuccin-base16", "catppuccin-base16": "catppuccin-base16",
"deploy-rs": "deploy-rs", "deploy-rs": "deploy-rs",
"disko": "disko", "disko": "disko",

View file

@ -93,6 +93,10 @@
anyrun.url = "github:Kirottu/anyrun"; anyrun.url = "github:Kirottu/anyrun";
anyrun.inputs.nixpkgs.follows = "nixpkgs"; anyrun.inputs.nixpkgs.follows = "nixpkgs";
# Anyrun nixos options
anyrun-nixos-options.url = "github:n3oney/anyrun-nixos-options";
anyrun-nixos-options.inputs.nixpkgs.follows = "nixpkgs";
# Nixos hardware # Nixos hardware
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";
}; };
@ -151,7 +155,7 @@
# Available through 'nixos-rebuild --flake .#... # Available through 'nixos-rebuild --flake .#...
nixosConfigurations = nixosConfigurations =
let nixos = { system, hostname, user }: nixpkgs.lib.nixosSystem { let nixos = { system, hostname, user }: nixpkgs.lib.nixosSystem {
system = system; inherit system;
specialArgs = specialArgs system; specialArgs = specialArgs system;
modules = [ modules = [
@ -160,8 +164,10 @@
home-manager.users.${user} = import ./home/${hostname}.nix; home-manager.users.${user} = import ./home/${hostname}.nix;
home-manager.extraSpecialArgs = specialArgs system; home-manager.extraSpecialArgs = specialArgs system;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
stylix.homeManagerIntegration.followSystem = false; stylix.homeManagerIntegration.followSystem = false;
stylix.homeManagerIntegration.autoImport = false; stylix.homeManagerIntegration.autoImport = false;
_module.args.nixinate = { _module.args.nixinate = {
host = hostname; host = hostname;
sshUser = "adrielus"; sshUser = "adrielus";
@ -204,6 +210,7 @@
let let
mkHomeConfig = { system, hostname }: mkHomeConfig = { system, hostname }:
home-manager.lib.homeManagerConfiguration { home-manager.lib.homeManagerConfiguration {
inherit system;
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
extraSpecialArgs = specialArgs system; extraSpecialArgs = specialArgs system;
modules = [ modules = [

View file

@ -1,29 +1,87 @@
{ config, pkgs, ... }: { config, ... }:
let base16-zathura = config.lib.stylix.colors {
templateRepo = pkgs.fetchFromGitHub {
owner = "doenerkebap";
repo = "base16-zathura";
sha256 = "1zcrzll13d4lmyzibwdqkkdssyhr3c9s4yxhqigg3azsizk8adb4";
rev = "2caef8fff6a5412e05950c6105c5020a6f16ead2";
};
# REASON: fails otherwise :/
# See [the troubleshooting section](https://github.com/SenchoPens/base16.nix/tree/main#%EF%B8%8F-troubleshooting).
check-parsed-config-yaml = false;
};
in
{ {
programs.zathura = { programs.zathura = {
enable = true; enable = true;
extraConfig = '' extraConfig = with config.lib.stylix.scheme.withHashtag; ''
# Generated theme # {{{ Some arbitrary settings
include ${base16-zathura}
# Open document in fit-width mode by default # Open document in fit-width mode by default
set adjust-open "best-fit" set adjust-open "best-fit"
# Inject font # Inject font
set font "${config.stylix.fonts.sansSerif.name}" set font "${config.stylix.fonts.sansSerif.name}"
# }}}
# {{{ Default foreground/background color
set default-bg rgba(${config.satellite.theming.colors.rgba "base00"})
set default-fg ${base05}
# }}}
# {{{ Recolor
set recolor 'true' # Allow recolor
set recolor-keephue 'false' # Don't allow original hue when recoloring
set recolor-reverse-video 'true' # Keep original image colors while recoloring
# Represent light/dark colors in recoloring mode
set recolor-lightcolor rgba(0,0,0,0)
set recolor-darkcolor '${base05}'
# }}}
# {{{ Completion
# Command line completion entries
set completion-fg '${base05}'
set completion-bg '${base00}'
# Command line completion group elements
set completion-group-fg '${base02}'
set completion-group-bg '${base00}'
# Current command line completion element
set completion-highlight-fg '${base00}'
set completion-highlight-bg '${base05}'
# }}}
# {{{ Input bar
set inputbar-fg '${base05}'
set inputbar-bg '${base00}'
# }}}
# {{{ Notifications
set notification-fg '${base05}'
set notification-bg '${base00}'
# Error notification
set notification-error-fg '${base08}'
set notification-error-bg '${base01}'
# Warning notification
set notification-warning-fg '${base0A}'
set notification-warning-bg '${base01}'
# }}}
# {{{ TODO: tabs
# Tab
# set tabbar-fg
# set tabbar-bg
# Focused tab
# set tabbar-focus-fg
# set tabbar-focus-bg
# }}}
# {{{ Status bar
set statusbar-fg '${base05}'
set statusbar-bg '${base00}'
# }}}
# {{{ Highlighting parts of the document (e.g. show search results)
# TODO: make sure these look fine on other schemes
set highlight-color '${base03}'
set highlight-active-color '${base06}'
# }}}
# {{{ 'Loading...' text
set render-loading-fg '${base05}'
set render-loading-bg '${base00}'
# }}}
# {{{ Index mode
set index-fg '${base05}'
set index-bg 'rgba(0,0,0.0)'
# Selected element in index mode
set index-active-fg '${base07}'
set index-active-bg '${base03}'
# }}}
''; '';
}; };
} }

View file

@ -2,17 +2,41 @@
programs.anyrun = { programs.anyrun = {
enable = true; enable = true;
config = { config = {
# {{{ Plugins
plugins = with inputs.anyrun.packages.${pkgs.system}; [ plugins = with inputs.anyrun.packages.${pkgs.system}; [
applications applications
dictionary dictionary
rink rink
stdin stdin
symbols # symbols # Looks ugly atm
websearch # websearch
# inputs.anyrun-nixos-options.packages.${pkgs.system}.default # Idk how to set this up :(
]; ];
# }}}
# {{{ Geometry
x.fraction = 0.5;
y.fraction = 0.25;
width.fraction = 0.5; width.fraction = 0.5;
height.fraction = 0.6; # }}}
hidePluginInfo = true;
closeOnClick = true;
showResultsImmediately = true;
maxEntries = 7;
}; };
extraCss = null;
}; };
# # See [the readme](https://github.com/n3oney/anyrun-nixos-options) for anyrun-nixos-options.
# programs.anyrun.extraConfigFiles."nixos-options.ron".text = ''
# Config(
# options_path: "${config.system.build.manual.optionsJSON}/share/doc/nixos/options.json"
# )
# '';
# home.packages =
# let anyrunScript = name: plugin: pkgs.writeShellScriptBin "anyrun-${plugin}";
# in
# [ (anyrunScript "launch" "applications") ];
} }

View file

@ -27,8 +27,8 @@ decoration {
# Blur extra surfaces # Blur extra surfaces
layerrule = blur,gtk-layer-shell layerrule = blur,gtk-layer-shell
layerrule = blur,wofi layerrule = blur,anyrun
layerrule = ignorezero,wofi layerrule = ignorezero,anyrun
input { input {
kb_layout = us kb_layout = us
@ -84,7 +84,7 @@ bind = $mod, T, exec, wl-ocr # Use ocr script
bind = $mod SHIFT, T, exec, hyprpicker | wl-copy && libnotify "Copied color $(wp-paste)" # Color picker bind = $mod SHIFT, T, exec, hyprpicker | wl-copy && libnotify "Copied color $(wp-paste)" # Color picker
bind = $mod, Q, exec, wlogout # Show logout menu bind = $mod, Q, exec, wlogout # Show logout menu
bind = $mod, L, exec, loginctl lock-session # Lock screen bind = $mod, L, exec, loginctl lock-session # Lock screen
bind = $mod, P, exec, wofi --show drun # Launch app bind = $mod, P, exec, anyrun
bind = $mod, B, exec, wlsunset-toggle # Toggle blue light filter thingy bind = $mod, B, exec, wlsunset-toggle # Toggle blue light filter thingy
bind = $mod, V, exec, wezterm start vimclip # Vim anywhere! bind = $mod, V, exec, wezterm start vimclip # Vim anywhere!

View file

@ -15,7 +15,7 @@ window {
padding: 1rem; padding: 1rem;
font-size: 2em; font-size: 2em;
border-radius: 8px; border-radius: 8px;
box-shadow: .5px .5px 1.5px 1.5px rgba(0, 0, 0, .5); box-shadow: 0.5px 0.5px 1.5px 1.5px rgba(0, 0, 0, 0.5);
/* background: none; */ /* background: none; */
background-color: rgba(256, 256, 256, 0.6); background-color: rgba(256, 256, 256, 0.6);
} }
@ -23,7 +23,7 @@ window {
#scroll { #scroll {
margin: 1rem; margin: 1rem;
border-radius: 8px; border-radius: 8px;
box-shadow: .5px .5px 1.5px 1.5px rgba(0, 0, 0, .5); box-shadow: 0.5px 0.5px 1.5px 1.5px rgba(0, 0, 0, 0.5);
/* background: none; */ /* background: none; */
background-color: rgba(256, 256, 256, 0.6); background-color: rgba(256, 256, 256, 0.6);
} }
@ -36,19 +36,19 @@ window {
} }
#text { #text {
margin: .5rem; margin: 0.5rem;
font-size: 1.5em; font-size: 1.5em;
} }
#img { #img {
margin-left: .5rem; margin-left: 0.5rem;
} }
#entry:selected { #entry:selected {
outline: none; outline: none;
color: #4c4f69; color: #4c4f69;
background: rgba(188, 192, 204, 0.2); background: rgba(188, 192, 204, 0.2);
box-shadow: .5px .5px 1.5px 1.5px rgba(0, 0, 0, .5); box-shadow: 0.5px 0.5px 1.5px 1.5px rgba(0, 0, 0, 0.5);
} }
#text:selected { #text:selected {