update: nvim waybar yazi windowrule
This commit is contained in:
parent
3a07c0da83
commit
529c9e5fa7
35 changed files with 520 additions and 13028 deletions
|
|
@ -24,10 +24,6 @@ in
|
|||
recursive = true;
|
||||
source = "${configDir}/fcitx5";
|
||||
};
|
||||
".config/ghostty" = {
|
||||
recursive = true;
|
||||
source = "${configDir}/ghostty";
|
||||
};
|
||||
".face".source = "${configDir}/.face";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
{ lib, settings }:
|
||||
let
|
||||
inherit (lib) optionalString;
|
||||
in
|
||||
{
|
||||
windowrule = [
|
||||
"pseudo, class:fcitx"
|
||||
|
|
@ -34,11 +38,50 @@
|
|||
"pin, class:^(vesktop)$,title:^(Discord Popout)$"
|
||||
"float, class:^(steam)$,title:^(Friends List)$"
|
||||
|
||||
# Media Control
|
||||
"float, class: ^(org.pulseaudio.pavucontrol)$"
|
||||
"pin, class: ^(org.pulseaudio.pavucontrol)$"
|
||||
"animation slide top 20%, class: ^(org.pulseaudio.pavucontrol)$"
|
||||
(optionalString (
|
||||
settings.personal.hostname == "dn-pre7780"
|
||||
) "move 1680 59, class: ^(org.pulseaudio.pavucontrol)$")
|
||||
(optionalString (
|
||||
settings.personal.hostname == "dn-pre7780"
|
||||
) "size 868 561, class: ^(org.pulseaudio.pavucontrol)$")
|
||||
|
||||
# Local Send (File Sharing)
|
||||
"float, class: ^(localsend_app)$"
|
||||
"pin, class: ^(localsend_app)$"
|
||||
"animation slide right 20%, class: ^(localsend_app)$"
|
||||
(optionalString (
|
||||
settings.personal.hostname == "dn-pre7780"
|
||||
) "size 523 1372, class: ^(localsend_app)$")
|
||||
(optionalString (
|
||||
settings.personal.hostname == "dn-pre7780"
|
||||
) "move 2024 56, class: ^(localsend_app)$")
|
||||
|
||||
# Airplay
|
||||
"pseudo, class: ^(GStreamer)$"
|
||||
"opacity 1.0, class: ^(GStreamer)$"
|
||||
(optionalString (settings.personal.hostname == "dn-pre7780") "size 487 1055, class: ^(GStreamer)$")
|
||||
|
||||
# Bluetooth
|
||||
"float, class: ^(blueberry.py)$"
|
||||
"pin, class: ^(blueberry.py)$"
|
||||
(optionalString (
|
||||
settings.personal.hostname == "dn-pre7780"
|
||||
) "move 1943 59, class: ^(blueberry.py)$")
|
||||
(optionalString (
|
||||
settings.personal.hostname == "dn-pre7780"
|
||||
) "size 605 763, class: ^(blueberry.py)$")
|
||||
"animation slide top 20%, class: ^(blueberry.py)$"
|
||||
|
||||
# Steam
|
||||
"workspace: 7 silent, class: ^(steam)$"
|
||||
"workspace: unset, class: ^(steam)$, floating: 1"
|
||||
|
||||
# steam game
|
||||
"workspace: 7 silent, initialClass: steam_app_*"
|
||||
"workspace: 7 silent, class: ^(steam_app_)(.*)"
|
||||
|
||||
# Line
|
||||
"workspace: 2, initialTitle: ^(LINE)$"
|
||||
|
|
@ -48,7 +91,7 @@
|
|||
"workspace: 3, initialClass: ^(vlc), floating: 0"
|
||||
|
||||
# vesktop
|
||||
"workspace: 2 silent, initialClass: ^(vesktop), floating: 0"
|
||||
"workspace: 4 silent, initialClass: ^(vesktop), floating: 0"
|
||||
];
|
||||
|
||||
layerrule = [
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ let
|
|||
};
|
||||
mainMod = "SUPER";
|
||||
window = import ./hypr/window.nix;
|
||||
windowrule = import ./hypr/windowrule.nix;
|
||||
windowrule = import ./hypr/windowrule.nix { inherit lib settings; };
|
||||
input = import ./hypr/input.nix;
|
||||
plugins = import ./hypr/plugin.nix;
|
||||
cursorName = "catppuccin-macchiato-lavender-cursors";
|
||||
|
|
@ -31,19 +31,19 @@ let
|
|||
|
||||
wallpapers = [
|
||||
(pkgs.fetchurl {
|
||||
url = "http://files.net.dn/dennis-yu-fVadSuPPE8M-unsplash.jpg";
|
||||
url = "https://files.net.dn/dennis-yu-fVadSuPPE8M-unsplash.jpg";
|
||||
hash = "sha256-YCusefLnTntOZAh2fIoWuJbm1+iE+RNeWTbn22UDjSU=";
|
||||
})
|
||||
(pkgs.fetchurl {
|
||||
url = "http://files.net.dn/karsten-winegeart-LZRZJam4Avg-unsplash.jpg";
|
||||
url = "https://files.net.dn/karsten-winegeart-LZRZJam4Avg-unsplash.jpg";
|
||||
hash = "sha256-NpJhRJRiFCFmdDP/8FDmzIBellSdJ1Y6Pz63QJzkPMk=";
|
||||
})
|
||||
(pkgs.fetchurl {
|
||||
url = "http://files.net.dn/nick-design-q3s4a7FZgjY-unsplash.jpg";
|
||||
url = "https://files.net.dn/nick-design-q3s4a7FZgjY-unsplash.jpg";
|
||||
hash = "sha256-kJajqRuf+ZMTaORKKK4A+8MNzGd2SHjMcRYnq9T8LmA=";
|
||||
})
|
||||
(pkgs.fetchurl {
|
||||
url = "http://files.net.dn/oleg-demakov-zEIApnww3fU-unsplash.jpg";
|
||||
url = "https://files.net.dn/oleg-demakov-zEIApnww3fU-unsplash.jpg";
|
||||
hash = "sha256-79JRnxJdCZOh2u8+5LcUDGjzwE1mMM2ZHrKLn36wd40=";
|
||||
})
|
||||
"$HOME/.config/wallpapers/wall.png"
|
||||
|
|
@ -77,6 +77,7 @@ in
|
|||
home.packages = with pkgs; [
|
||||
mpvpaper # Video Wallpaper
|
||||
hyprcursor
|
||||
libnotify
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
|
|
@ -148,18 +149,7 @@ in
|
|||
# === hyprlock === #
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
package = (
|
||||
pkgs.hyprlock.overrideAttrs (
|
||||
final: prev: {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "hyprwm";
|
||||
repo = "hyprlock";
|
||||
rev = "da1d076d849fc0f298c1d287bddd04802bf7d0f9";
|
||||
hash = "sha256-IypoV7crmhQ4llD0n4qqO4XTRNAAbHfA+2oiTiq2qpk=";
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
package = inputs.hyprlock.packages.${system}.default;
|
||||
importantPrefixes = [
|
||||
"$"
|
||||
"monitor"
|
||||
|
|
@ -363,7 +353,15 @@ in
|
|||
programs.waybar = {
|
||||
enable = true;
|
||||
style = ../../home/config/waybar/style.css;
|
||||
settings = import ../../home/config/waybar/config.nix { inherit terminal osConfig wallRand; };
|
||||
settings = import ../../home/config/waybar/config.nix {
|
||||
inherit
|
||||
terminal
|
||||
osConfig
|
||||
wallRand
|
||||
pkgs
|
||||
lib
|
||||
;
|
||||
};
|
||||
systemd = {
|
||||
enable = true;
|
||||
target = "graphical-session.target";
|
||||
|
|
@ -523,7 +521,7 @@ in
|
|||
|
||||
.widget-title>button:hover {
|
||||
background: @borderc;
|
||||
color: #282828;
|
||||
color: @textc;
|
||||
}
|
||||
|
||||
.widget-label {
|
||||
|
|
@ -532,7 +530,7 @@ in
|
|||
|
||||
.widget-label>label {
|
||||
font-size: 1rem;
|
||||
color: @textc;
|
||||
color: @borderc;
|
||||
}
|
||||
|
||||
.widget-mpris {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) optional;
|
||||
in
|
||||
{
|
||||
programs.poetry = {
|
||||
enable = true;
|
||||
|
|
@ -15,11 +18,38 @@
|
|||
};
|
||||
};
|
||||
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
installBatSyntax = true;
|
||||
enableFishIntegration = true;
|
||||
package = inputs.ghostty.packages.${system}.default;
|
||||
settings = {
|
||||
font-family = "CaskaydiaCove Nerd Font Mono";
|
||||
font-size = 15;
|
||||
theme = "Espresso";
|
||||
unfocused-split-opacity = 0.85;
|
||||
desktop-notifications = false;
|
||||
|
||||
wait-after-command = false;
|
||||
shell-integration = "detect";
|
||||
window-theme = "dark";
|
||||
|
||||
confirm-close-surface = false;
|
||||
window-decoration = false;
|
||||
|
||||
mouse-hide-while-typing = true;
|
||||
|
||||
keybind = [ "ctrl+shift+zero=toggle_tab_overview" ];
|
||||
|
||||
clipboard-read = "allow";
|
||||
clipboard-write = "allow";
|
||||
};
|
||||
};
|
||||
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[
|
||||
# Terminal
|
||||
inputs.ghostty.packages.${system}.default
|
||||
obsidian
|
||||
|
||||
# Discord
|
||||
vesktop
|
||||
|
|
@ -66,9 +96,7 @@
|
|||
protonup
|
||||
]
|
||||
else
|
||||
[
|
||||
|
||||
]
|
||||
[ ]
|
||||
);
|
||||
|
||||
home.sessionVariables = lib.mkIf osConfig.programs.steam.enable {
|
||||
|
|
|
|||
|
|
@ -5,31 +5,12 @@ in
|
|||
{
|
||||
home.packages = with pkgs; [
|
||||
# Shell
|
||||
fishPlugins.done
|
||||
fishPlugins.fzf-fish
|
||||
fishPlugins.forgit
|
||||
fishPlugins.hydro
|
||||
fishPlugins.grc
|
||||
grc # Colorize
|
||||
zoxide # Dir jumper
|
||||
starship # Shell theme
|
||||
carapace # Autocomplete
|
||||
grc
|
||||
];
|
||||
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
shellInit = ''
|
||||
# Yazi
|
||||
function y
|
||||
set tmp (mktemp -t "yazi-cwd.XXXXXX")
|
||||
yazi $argv --cwd-file="$tmp"
|
||||
if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||
builtin cd -- "$cwd"
|
||||
end
|
||||
rm -f -- "$tmp"
|
||||
end
|
||||
'';
|
||||
interactiveShellInit = ''
|
||||
set fish_greeting # Disable greeting
|
||||
'';
|
||||
|
|
@ -38,6 +19,18 @@ in
|
|||
name = "grc";
|
||||
src = pkgs.fishPlugins.grc.src;
|
||||
}
|
||||
{
|
||||
name = "fzf-fish";
|
||||
src = pkgs.fishPlugins.fzf-fish.src;
|
||||
}
|
||||
{
|
||||
name = "forgit";
|
||||
src = pkgs.fishPlugins.forgit.src;
|
||||
}
|
||||
{
|
||||
name = "hydro";
|
||||
src = pkgs.fishPlugins.hydro.src;
|
||||
}
|
||||
];
|
||||
shellAliases = shellAlias;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
ls = "exa --icons";
|
||||
lp = "exa"; # Pure output
|
||||
cat = "bat";
|
||||
y = "yazi";
|
||||
g = "git";
|
||||
t = "tmux";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,27 +1,166 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
system,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
yaziPlugins = pkgs.fetchFromGitHub {
|
||||
owner = "yazi-rs";
|
||||
repo = "plugins";
|
||||
rev = "86d28e4fb4f25f36cc501b8cb0badb37a6b14263";
|
||||
hash = "sha256-m/gJTDm0cVkIdcQ1ZJliPqBhNKoCW1FciLkuq7D1mxo=";
|
||||
};
|
||||
in
|
||||
{
|
||||
programs = {
|
||||
yazi = {
|
||||
enable = true;
|
||||
package = inputs.yazi.packages.${system}.default;
|
||||
shellWrapperName = "y";
|
||||
enableFishIntegration = false;
|
||||
|
||||
plugins = {
|
||||
toggle-panel = ''${yaziPlugins}/toggle-panel.yazi'';
|
||||
};
|
||||
|
||||
flavors = {
|
||||
gruvbox-dark = pkgs.fetchFromGitHub {
|
||||
owner = "bennyyip";
|
||||
repo = "gruvbox-dark.yazi";
|
||||
rev = "91fdfa70f6d593934e62aba1e449f4ec3d3ccc90";
|
||||
hash = "sha256-RWqyAdETD/EkDVGcnBPiMcw1mSd78Aayky9yoxSsry4=";
|
||||
};
|
||||
};
|
||||
|
||||
theme = {
|
||||
flavors = {
|
||||
dark = "gruvbox-dark";
|
||||
light = "gruvbox-dark";
|
||||
};
|
||||
};
|
||||
|
||||
keymap = {
|
||||
mgr = {
|
||||
prepend_keymap = [
|
||||
# Toggle Maximize Preview
|
||||
{
|
||||
on = "T";
|
||||
run = "plugin toggle-pane max-preview";
|
||||
desc = "Show or hide the preview pane";
|
||||
}
|
||||
# Copy selected files to the system clipboard while yanking
|
||||
{
|
||||
on = "y";
|
||||
run = [
|
||||
''shell -- for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list''
|
||||
"yank"
|
||||
];
|
||||
}
|
||||
# cd back to the root of the current Git repository
|
||||
{
|
||||
on = [
|
||||
"g"
|
||||
"r"
|
||||
];
|
||||
run = ''shell -- ya emit cd "$(git rev-parse --show-toplevel)"'';
|
||||
}
|
||||
# Drag and Drop
|
||||
{
|
||||
on = [
|
||||
"c"
|
||||
"D"
|
||||
];
|
||||
run = ''
|
||||
shell '${pkgs.ripdrag.out}/bin/ripdrag "$@" -x 2>/dev/null &' --confirm
|
||||
'';
|
||||
desc = "Drag the file";
|
||||
}
|
||||
# Start terminal
|
||||
{
|
||||
on = [ "!" ];
|
||||
for = "unix";
|
||||
run = ''shell "$SHELL" --block'';
|
||||
desc = "Open $SHELL here";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
initLua =
|
||||
# lua
|
||||
''
|
||||
-- Show symlink in status bar
|
||||
Status:children_add(function(self)
|
||||
local h = self._current.hovered
|
||||
if h and h.link_to then
|
||||
return " -> " .. toString(h.link_to)
|
||||
else
|
||||
return ""
|
||||
end
|
||||
end, 3300, Status.LEFT)
|
||||
|
||||
-- Show user/group of files in status bar
|
||||
Status:children_add(function()
|
||||
local h = cx.active.current.hovered
|
||||
if not h or ya.target_family() ~= "unix" then
|
||||
return ""
|
||||
end
|
||||
|
||||
return ui.Line {
|
||||
ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
|
||||
":",
|
||||
ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
|
||||
" ",
|
||||
}
|
||||
end, 500, Status.RIGHT)
|
||||
|
||||
-- Show username and hostname in header
|
||||
Header:children_add(function()
|
||||
if ya.target_family() ~= "unix" then
|
||||
return ""
|
||||
end
|
||||
return ui.Span(ya.user_name() .. "@" .. ya.host_name() .. ":"):fg("blue")
|
||||
end, 500, Header.LEFT)
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# Drag from yazi
|
||||
ripdrag
|
||||
ueberzugpp
|
||||
];
|
||||
|
||||
home.file = {
|
||||
".config/yazi" = {
|
||||
recursive = true;
|
||||
source = ../config/yazi;
|
||||
};
|
||||
};
|
||||
# xdg.portal = {
|
||||
# enable = lib.mkForce true;
|
||||
# extraPortals = [ pkgs.xdg-desktop-portal-termfilechooser ];
|
||||
# config = {
|
||||
# common.default = [
|
||||
# "hyprland"
|
||||
# "gtk"
|
||||
# ];
|
||||
# common = {
|
||||
# "org.freedesktop.impl.portal.FileChooser" = "termfilechooser";
|
||||
# };
|
||||
# hyprland.default = [
|
||||
# "hyprland"
|
||||
# "gtk"
|
||||
# ];
|
||||
# hyprland."org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" ];
|
||||
# };
|
||||
# };
|
||||
|
||||
# xdg.configFile."xdg-desktop-portal-termfilechooser/config" = {
|
||||
# force = true;
|
||||
# text = ''
|
||||
# [filechooser]
|
||||
# cmd=TERMCMD='${config.programs.ghostty.package}/bin/ghostty --title=file_chooser -e "bash -c ${pkgs.xdg-desktop-portal-termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh"'
|
||||
# default_dir=$HOME
|
||||
# open_mode = suggested
|
||||
# save_mode = last
|
||||
# '';
|
||||
# };
|
||||
|
||||
# home.sessionVariables.TERMCMD = "${config.programs.ghostty.package}/bin/ghostty --title=file_chooser";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue