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-tree.lua": { "branch": "master", "commit": "18c7a3119839adc4599d838726deae662859c8b2" },
"nvim-treesitter": { "branch": "master", "commit": "93ee00cd9daf8d2e3fbaa2a18b8b9adcb4471b16" },
"nvim-treesitter-context": { "branch": "master", "commit": "a17c31268b56d53624fdc9cb03a225d4a17cabdb" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9e519b6146512c8e2e702faf8ac48420f4f5deec" },
"nvim-web-devicons": { "branch": "master", "commit": "ab899311f8ae00a47eae8e0879506cead8eb1561" },
"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
nmap("<leader>F", format, "[F]ormat")
-- vim.api.nvim_create_autocmd("BufWritePre", {
-- group = vim.api.nvim_create_augroup("LspFormatting", { clear = false }),
-- buffer = bufnr,
-- callback = format,
-- })
vim.api.nvim_create_autocmd("BufWritePre", {
group = vim.api.nvim_create_augroup("LspFormatting", { clear = false }),
buffer = bufnr,
callback = format,
})
end
-- }}}
-- {{{ Go to declaration / references / implementation
@ -178,6 +178,7 @@ local servers = {
jsonls = {},
dhall_lsp_server = {},
typst_lsp = {},
elmls = {},
-- {{{ Inactive
-- pylsp = {},
-- pyright = {},

View file

@ -33,7 +33,7 @@ local M = {
"vim",
"yaml",
"nix",
"lua"
"lua",
},
sync_install = false,
--}}}
@ -91,6 +91,13 @@ local M = {
event = "BufReadPost",
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

View file

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

View file

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

View file

@ -1,29 +1,87 @@
{ config, pkgs, ... }:
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
{ config, ... }:
{
programs.zathura = {
enable = true;
extraConfig = ''
# Generated theme
include ${base16-zathura}
extraConfig = with config.lib.stylix.scheme.withHashtag; ''
# {{{ Some arbitrary settings
# Open document in fit-width mode by default
set adjust-open "best-fit"
# Inject font
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 = {
enable = true;
config = {
# {{{ Plugins
plugins = with inputs.anyrun.packages.${pkgs.system}; [
applications
dictionary
rink
stdin
symbols
websearch
# symbols # Looks ugly atm
# 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;
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
layerrule = blur,gtk-layer-shell
layerrule = blur,wofi
layerrule = ignorezero,wofi
layerrule = blur,anyrun
layerrule = ignorezero,anyrun
input {
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, Q, exec, wlogout # Show logout menu
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, V, exec, wezterm start vimclip # Vim anywhere!

View file

@ -1,6 +1,6 @@
/* Styling guide: https://cloudninja.pw/docs/wofi.html */
window {
background:none;
background: none;
}
#outer-box {
@ -15,7 +15,7 @@ window {
padding: 1rem;
font-size: 2em;
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-color: rgba(256, 256, 256, 0.6);
}
@ -23,7 +23,7 @@ window {
#scroll {
margin: 1rem;
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-color: rgba(256, 256, 256, 0.6);
}
@ -36,19 +36,19 @@ window {
}
#text {
margin: .5rem;
margin: 0.5rem;
font-size: 1.5em;
}
#img {
margin-left: .5rem;
margin-left: 0.5rem;
}
#entry:selected {
outline: none;
color: #4c4f69;
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 {