some stuff
This commit is contained in:
parent
d2fd9fda8a
commit
368fc628c2
26 changed files with 458 additions and 97 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
../../terminal
|
||||
../../terminal/programs/zellij.nix
|
||||
../../terminal/programs/beets.nix
|
||||
../../editors/nvim.nix
|
||||
#../../editors/emacs.nix
|
||||
../../editors/vscode.nix
|
||||
|
@ -19,7 +20,8 @@
|
|||
../../programs/desktop
|
||||
../../programs/desktop/theme.nix
|
||||
../../programs/desktop/awesome
|
||||
../../programs/desktop/hyprland
|
||||
#../../programs/desktop/hyprland
|
||||
../../programs/desktop/sway
|
||||
|
||||
# development
|
||||
../../develop
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
services.kanshi = {
|
||||
enable = true;
|
||||
systemdTarget = "hyprland-session.target";
|
||||
# systemdTarget = "hyprland-session.target"; # default is sway
|
||||
settings = [
|
||||
{
|
||||
profile.name = "default";
|
||||
|
|
24
home/programs/desktop/common/fuzzel.nix
Normal file
24
home/programs/desktop/common/fuzzel.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.fuzzel = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
terminal = "${lib.getExe pkgs.foot}";
|
||||
layer = "overlay";
|
||||
};
|
||||
colors = {
|
||||
background = "#181818ff";
|
||||
text = "#a4c6d9ff";
|
||||
match = "#ae61b5ff";
|
||||
border = "#feafffff";
|
||||
selection = "#242424ff";
|
||||
selection-text = "#ffffffff";
|
||||
selection-match = "#fac1ffff";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
5
home/programs/desktop/common/wl-clipboard.nix
Normal file
5
home/programs/desktop/common/wl-clipboard.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
wl-clipboard
|
||||
];
|
||||
}
|
5
home/programs/desktop/common/wob.nix
Normal file
5
home/programs/desktop/common/wob.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
services.wob = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
|
@ -2,13 +2,14 @@
|
|||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-hyprland
|
||||
xdg-desktop-portal-kde
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
config = {
|
||||
preferred = {
|
||||
default = "hyprland;gtk";
|
||||
"org.freedesktop.impl.portal.FileChooser" = "kde";
|
||||
default = "gtk";
|
||||
"org.freedesktop.impl.portal.Screenshot" = "wlr";
|
||||
"org.freedesktop.impl.portal.Screencast" = "wlr";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
osConfig,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../common/fuzzel.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
wl-clipboard
|
||||
];
|
||||
|
@ -12,6 +16,7 @@
|
|||
services.cliphist = {
|
||||
enable = true;
|
||||
systemdTarget = "hyprland-session.target";
|
||||
extraOptions = ["-max-items" "150"];
|
||||
};
|
||||
#systemd.user.services.cliphist = {
|
||||
# Unit = {
|
||||
|
@ -31,24 +36,6 @@
|
|||
# WantedBy = ["hyprland-session.target"];
|
||||
# };
|
||||
#};
|
||||
programs.fuzzel = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
terminal = "${lib.getExe pkgs.foot}";
|
||||
layer = "overlay";
|
||||
};
|
||||
colors = {
|
||||
background = "#181818ff";
|
||||
text = "#a4c6d9ff";
|
||||
match = "#ae61b5ff";
|
||||
border = "#feafffff";
|
||||
selection = "#242424ff";
|
||||
selection-text = "#ffffffff";
|
||||
selection-match = "#fac1ffff";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
|
@ -183,7 +170,7 @@
|
|||
};
|
||||
"clock" = {
|
||||
"tooltim-format" = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
"format-alt" = "{:%Y-%m-%d}";
|
||||
"format-alt" = "{:%a %Y-%m-%d}";
|
||||
};
|
||||
"pulseaudio" = {
|
||||
"format" = "{volume}%";
|
||||
|
@ -214,7 +201,7 @@
|
|||
settings = {
|
||||
exec-once = [
|
||||
#"${lib.getExe pkgs.xwaylandvideobridge}"
|
||||
"${lib.getExe pkgs.swaybg} -i ${config.xdg.userDirs.pictures}/wallpaper.png"
|
||||
"${lib.getExe pkgs.swaybg} -i ${config.xdg.userDirs.pictures}/wallpaper"
|
||||
];
|
||||
env = [
|
||||
"NIXOS_OZONE_WL,1" # for any ozone-based browser & electron apps to run on wayland
|
||||
|
@ -229,7 +216,7 @@
|
|||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "eu";
|
||||
kb_layout = osConfig.services.xserver.xkb.layout;
|
||||
};
|
||||
|
||||
general = {
|
||||
|
@ -273,6 +260,7 @@
|
|||
"$mainMod, P, exec, ${lib.getExe pkgs.fuzzel}"
|
||||
"$mainMod SHIFT, V, exec, ${lib.getExe pkgs.cliphist} list | ${lib.getExe pkgs.wofi} --dmenu | ${lib.getExe pkgs.cliphist} decode | ${pkgs.wl-clipboard}/bin/wl-copy"
|
||||
"$mainMod SHIFT, S, exec, ${lib.getExe pkgs.grimblast} --freeze copy area"
|
||||
"$mainMod SHIFT, BACKSPACE, exec, systemctl suspend"
|
||||
|
||||
"$mainMod, N, togglesplit"
|
||||
"$mainMod SHIFT, N, swapsplit"
|
||||
|
|
99
home/programs/desktop/sway/default.nix
Normal file
99
home/programs/desktop/sway/default.nix
Normal file
|
@ -0,0 +1,99 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../common/fuzzel.nix
|
||||
../common/wob.nix
|
||||
../common/wl-clipboard.nix
|
||||
];
|
||||
|
||||
services.cliphist = {
|
||||
enable = true;
|
||||
systemdTarget = "sway-session.target";
|
||||
extraOptions = ["-max-items" "150"];
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
checkConfig = false; # doesnt work with custom wallpaper
|
||||
config = {
|
||||
modifier = "Mod4";
|
||||
output = {
|
||||
"*".bg = "${config.xdg.userDirs.pictures}/wallpaper fill";
|
||||
};
|
||||
input = {
|
||||
"*".xkb_layout = osConfig.services.xserver.xkb.layout;
|
||||
};
|
||||
bars = [
|
||||
{
|
||||
workspaceNumbers = false;
|
||||
statusCommand = "${lib.getExe pkgs.i3status}";
|
||||
}
|
||||
];
|
||||
keybindings = let
|
||||
mod = config.wayland.windowManager.sway.config.modifier;
|
||||
wobVolume = "${pkgs.wireplumber}/bin/wpctl get-volume @DEFAULT_SINK@ | awk '{print $2*100}' > $XDG_RUNTIME_DIR/wob.sock";
|
||||
setVolume = limit: amount: "${pkgs.wireplumber}/bin/wpctl set-volume -l ${limit} @DEFAULT_AUDIO_SINK@ ${amount}";
|
||||
perMonitor = workspace: "\"$(${config.wayland.windowManager.sway.package}/bin/swaymsg -t get_outputs | ${lib.getExe pkgs.jq} -r '.[] | select(.focused == true).id')${toString workspace}\"";
|
||||
#perMonitor = workspace: "${lib.getExe (pkgs.writeShellScriptBin "perMonitor" ''
|
||||
# id=$( md5sum <<< ${config.wayland.windowManager.sway.package}/bin/swaymsg -t get_outputs | ${lib.getExe pkgs.jq} -r '.[] | select(.focused == true).id' )
|
||||
# echo $((0x''${id%% *}))
|
||||
#'')} workspace";
|
||||
#perMonitor = pkgs.writeShellScriptBin "perMonitor" ''
|
||||
# args=( "$@" )
|
||||
# id=$( ${config.wayland.windowManager.sway.package}/bin/swaymsg -t get_outputs | ${lib.getExe pkgs.jq} -r '.[] | select(.focused == true).id' )
|
||||
# # args[$#-1]=$(( ''${args[$#-1]} + $id * 10 ))
|
||||
# args[$#-1]="$id:''${args[$#-1]}"
|
||||
# swaymsg ''${args[@]}
|
||||
#'';
|
||||
dir = with config.wayland.windowManager.sway.config; {
|
||||
inherit up down left right;
|
||||
};
|
||||
in
|
||||
lib.mkOptionDefault (
|
||||
{
|
||||
"${mod}+Shift+v" = "exec ${lib.getExe pkgs.cliphist} list | ${lib.getExe pkgs.wofi} --dmenu | ${lib.getExe pkgs.cliphist} decode | ${pkgs.wl-clipboard}/bin/wl-copy";
|
||||
"${mod}+Ctrl+${dir.left}" = "focus output left";
|
||||
"${mod}+Ctrl+${dir.right}" = "focus output right";
|
||||
"${mod}+Ctrl+${dir.up}" = "focus output up";
|
||||
"${mod}+Ctrl+${dir.down}" = "focus output down";
|
||||
|
||||
"${mod}+Ctrl+Shift+${dir.left}" = "move output left";
|
||||
"${mod}+Ctrl+Shift+${dir.right}" = "move output right";
|
||||
"${mod}+Ctrl+Shift+${dir.up}" = "move output up";
|
||||
"${mod}+Ctrl+Shift+${dir.down}" = "move output down";
|
||||
|
||||
"${mod}+d" = "exec ${lib.getExe pkgs.fuzzel}";
|
||||
"${mod}+Shift+Backspace" = "exec systemctl suspend";
|
||||
"${mod}+Shift+s" = "exec ${lib.getExe pkgs.grimblast} copy area";
|
||||
|
||||
"XF86AudioRaiseVolume" = "exec ${setVolume "1.5" "3%+"} && ${wobVolume}";
|
||||
"XF86AudioLowerVolume" = "exec ${setVolume "1.5" "3%-"} && ${wobVolume}";
|
||||
"XF86AudioPlay" = "exec ${lib.getExe pkgs.playerctl} play-pause";
|
||||
"XF86AudioStop" = "exec ${lib.getExe pkgs.playerctl} stop";
|
||||
"XF86AudioNext" = "exec ${lib.getExe pkgs.playerctl} next";
|
||||
"XF86AudioPrev" = "exec ${lib.getExe pkgs.playerctl} previous";
|
||||
}
|
||||
// builtins.listToAttrs (lib.flatten
|
||||
(builtins.map (x: [
|
||||
{
|
||||
name = "${mod}+${toString x}";
|
||||
#value = "exec swaymsg workspace ${toString x}";
|
||||
value = "exec swaymsg workspace number ${perMonitor x} ${toString x}";
|
||||
#value = "exec ${lib.getExe perMonitor} workspace ${toString x}";
|
||||
}
|
||||
{
|
||||
name = "${mod}+Shift+${toString x}";
|
||||
#value = "exec swaymsg move workspace ${toString x}";
|
||||
value = "exec swaymsg move container to workspace number ${perMonitor x} ${toString x}";
|
||||
#value = "exec ${lib.getExe perMonitor} move workspace ${toString x}";
|
||||
}
|
||||
]) (lib.range 0 9)))
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
|
@ -7,6 +7,9 @@
|
|||
size = 16;
|
||||
};
|
||||
|
||||
# Also sets org.freedesktop.appearance color-scheme
|
||||
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
|
@ -21,6 +24,9 @@
|
|||
name = "Sans";
|
||||
size = 11;
|
||||
};
|
||||
gtk2.extraConfig = "gtk-application-prefer-dark-theme=1";
|
||||
gtk3.extraConfig.gtk-application-prefer-dark-theme = 1;
|
||||
gtk4.extraConfig.gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
|
||||
qt = {
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
home.packages = with pkgs; [
|
||||
jellyfin-media-player
|
||||
sonixd
|
||||
feishin
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,17 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
# TODO: remove this once the vesktop screenshare update gets released
|
||||
(vesktop.overrideAttrs (final: prev: {
|
||||
version = "ab9e8579eea046187c5cdb51e2041a0beb6e8601";
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://github.com/Vencord/Vesktop.git";
|
||||
rev = "ab9e8579eea046187c5cdb51e2041a0beb6e8601";
|
||||
hash = "sha256-s3ndHHN8mqbzL40hMDXXDl+VV9pOk4XfnaVCaQvFFsg=";
|
||||
};
|
||||
pnpmDeps = prev.pnpmDeps.overrideAttrs {
|
||||
outputHash = "sha256-6ezEBeYmK5va3gCh00YnJzZ77V/Ql7A3l/+csohkz68=";
|
||||
};
|
||||
}))
|
||||
vesktop
|
||||
(discord.override {
|
||||
withVencord = true;
|
||||
withOpenASAR = true;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# TODO fix polkit, this dosent work
|
||||
{pkgs, ...}: {
|
||||
systemd.user.services.polkit-gnome-authentication-agent-1 = {
|
||||
Unit.Description = "polkit-gnome-authentication-agent-1";
|
||||
|
|
83
home/terminal/programs/beets.nix
Normal file
83
home/terminal/programs/beets.nix
Normal file
|
@ -0,0 +1,83 @@
|
|||
let
|
||||
musicDir = "/home/xun/music/library";
|
||||
in {
|
||||
programs.beets = {
|
||||
enable = true;
|
||||
settings = {
|
||||
directory = "${musicDir}/data";
|
||||
library = "${musicDir}/beets/beets.db";
|
||||
import = {
|
||||
log = "${musicDir}/beets/import.log";
|
||||
incremental = true;
|
||||
};
|
||||
plugins = [
|
||||
"embedart"
|
||||
"fetchart"
|
||||
"discogs"
|
||||
#"advancedrewrite"
|
||||
"lyrics"
|
||||
"spotify"
|
||||
"scrub"
|
||||
"duplicates"
|
||||
"unimported"
|
||||
];
|
||||
|
||||
genres = true;
|
||||
|
||||
spotify.source_weight = 0.7;
|
||||
|
||||
embedart = {
|
||||
auto = true;
|
||||
ifempty = false;
|
||||
remove_art_file = false;
|
||||
};
|
||||
|
||||
fetchart = {
|
||||
auto = true;
|
||||
cautious = true;
|
||||
minwidth = 500;
|
||||
maxwidth = 1200;
|
||||
cover_format = "jpeg";
|
||||
sources = [
|
||||
{"coverart" = "release";}
|
||||
{"coverart" = "releasegroup";}
|
||||
"albumart"
|
||||
"amazon"
|
||||
"google"
|
||||
"itunes"
|
||||
"fanarttv"
|
||||
"lastfm"
|
||||
"wikipedia"
|
||||
];
|
||||
|
||||
lyrics = {
|
||||
fallback = "''";
|
||||
sources = ["musicmatch" "google"];
|
||||
};
|
||||
|
||||
replace = {
|
||||
"[\\\\]" = "'";
|
||||
"[_]" = "-";
|
||||
"[\\]" = "-";
|
||||
"^\\." = "'";
|
||||
"[\\x00-\\x1f]" = "'";
|
||||
"[<>:\"\\?\\*\\|]" = "'";
|
||||
"\\.$" = "'";
|
||||
"\\s+$" = "'";
|
||||
"^\\s+" = "'";
|
||||
"^-" = "'";
|
||||
"’" = "'";
|
||||
"′" = "'";
|
||||
"″" = "'";
|
||||
"‐" = "-";
|
||||
};
|
||||
|
||||
aunique = {
|
||||
keys = ["albumartist" "albumtype" "year" "album"];
|
||||
disambuguators = ["format" "mastering" "media" "label" "albumdisambig" "releasegroupdisambig"];
|
||||
bracket = "[]";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -9,6 +9,8 @@
|
|||
bind '"' split-window -c "#{pane_current_path}"
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
bind c new-window -c "#{pane_current_path}";
|
||||
|
||||
set-option -g status-style bg=default
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -23,6 +23,9 @@
|
|||
# improve ^w behaviour
|
||||
WORDCHARS=
|
||||
|
||||
# pretty completion menu
|
||||
zstyle ':completion:*' menu select
|
||||
|
||||
# shift-tab in completion menu
|
||||
bindkey '^[[Z' reverse-menu-complete
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue