mirror of
https://github.com/elwrcl/copnix.git
synced 2026-10-31 14:28:02 +03:00
big great refactor
This commit is contained in:
1 parent
596bcb4a94
commit
5a7501eec0
73 files changed
+537
-644
No files matched your search
BIN
Binary file not shown.
Executable
+28
@@ -0,0 +1,28 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
base = ''
|
||||
[user]
|
||||
name = elwrcl
|
||||
email = elwerici@proton.me
|
||||
signingkey = AAC15D93AFCAB283
|
||||
[commit]
|
||||
gpgsign = true
|
||||
[tag]
|
||||
gpgsign = true
|
||||
'';
|
||||
|
||||
darwinExtra = ''
|
||||
[credential]
|
||||
helper = osxkeychain
|
||||
'';
|
||||
|
||||
gitconfig = pkgs.writeText "gitconfig" (base + lib.optionalString pkgs.stdenv.isDarwin darwinExtra);
|
||||
in
|
||||
{
|
||||
environment.variables.GIT_CONFIG_SYSTEM = "${gitconfig}";
|
||||
}
|
||||
Executable
+139
@@ -0,0 +1,139 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ./hyprland.nix ];
|
||||
|
||||
home.username = "elars";
|
||||
home.homeDirectory = "/home/elars";
|
||||
home.stateVersion = "25.05";
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
home.sessionVariables = {
|
||||
BROWSER = "zen-beta.desktop";
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
initContent = ''
|
||||
export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border'
|
||||
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
|
||||
|
||||
alias ls='eza --icons --group-directories-first'
|
||||
alias ll='eza -lah --icons --group-directories-first'
|
||||
alias la='eza -a --icons --group-directories-first'
|
||||
alias lt='eza --tree --level=2 --icons'
|
||||
|
||||
alias cd='z'
|
||||
alias cat='bat'
|
||||
alias grep='grep --color=auto'
|
||||
alias df='df -h'
|
||||
alias du='du -h'
|
||||
alias free='free -h'
|
||||
|
||||
alias cp='cp -i'
|
||||
alias mv='mv -i'
|
||||
alias rm='trash-put'
|
||||
|
||||
alias sysinfo='fastfetch'
|
||||
alias monitor='sudo btop'
|
||||
alias ports='sudo ss -tulpn'
|
||||
alias myip='curl ifconfig.me'
|
||||
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias ....='cd ../../..'
|
||||
alias ~='cd ~'
|
||||
alias -- -='cd -'
|
||||
|
||||
alias gs='git status'
|
||||
alias ga='git add'
|
||||
alias gc='git commit -m'
|
||||
alias gp='git push'
|
||||
alias gl='git log --oneline --graph --decorate'
|
||||
|
||||
alias rebuild='git -C ~/copland add -A && git -C ~/copland commit -m "update" && nh os switch'
|
||||
alias rebuild-dry='nh os switch --dry'
|
||||
alias rebuild-cop='nix flake update --flake ~/copland && git -C ~/copland add -A && git -C ~/copland commit -m "flake update $(date +%Y-%m-%d)" && nh os switch'
|
||||
|
||||
extract() {
|
||||
if [ -f "$1" ]; then
|
||||
case "$1" in
|
||||
*.tar.bz2) tar xjf "$1" ;; *.tar.gz) tar xzf "$1" ;;
|
||||
*.bz2) bunzip2 "$1" ;; *.rar) unrar e "$1" ;;
|
||||
*.gz) gunzip "$1" ;; *.tar) tar xf "$1" ;;
|
||||
*.zip) unzip "$1" ;; *.7z) 7z x "$1" ;;
|
||||
*) echo "'$1' can't be extracted" ;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
HISTFILE=~/.zsh_history
|
||||
setopt HIST_IGNORE_DUPS HIST_IGNORE_SPACE SHARE_HISTORY AUTO_CD
|
||||
zstyle ':completion:*' menu select
|
||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||
|
||||
export MESA_GL_VERSION_OVERRIDE=4.6
|
||||
export MESA_GLSL_VERSION_OVERRIDE=460
|
||||
export MESA_SHADER_CACHE_MAX_SIZE=2G
|
||||
export MESA_SHADER_CACHE_DIR=/tmp/mesa_shader_cache
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
|
||||
copetch --ascii
|
||||
'';
|
||||
};
|
||||
|
||||
programs.starship.enable = true;
|
||||
programs.fzf.enable = true;
|
||||
programs.zoxide.enable = true;
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme.name = "Adwaita-dark";
|
||||
theme.package = pkgs.gnome-themes-extra;
|
||||
gtk4.theme.name = "Adwaita-dark";
|
||||
gtk4.theme.package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "gtk3";
|
||||
style.name = "adwaita-dark";
|
||||
style.package = pkgs.adwaita-qt;
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Bibata-Modern-Classic";
|
||||
package = pkgs.bibata-cursors;
|
||||
size = 24;
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
};
|
||||
|
||||
dconf.settings."org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
gtk-application-prefer-dark-theme = true;
|
||||
gtk-theme = "Adwaita-dark";
|
||||
};
|
||||
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"inode/directory" = [ "thunar.desktop" ];
|
||||
"x-scheme-handler/http" = [ "zen-beta.desktop" ];
|
||||
"x-scheme-handler/https" = [ "zen-beta.desktop" ];
|
||||
"x-scheme-handler/about" = [ "zen-beta.desktop" ];
|
||||
"x-scheme-handler/unknown" = [ "zen-beta.desktop" ];
|
||||
};
|
||||
};
|
||||
services.easyeffects.enable = true;
|
||||
}
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hyprland/env.nix
|
||||
./hyprland/execs.nix
|
||||
./hyprland/general.nix
|
||||
./hyprland/rules.nix
|
||||
./hyprland/keybinds.nix
|
||||
];
|
||||
}
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
env = [
|
||||
"XCURSOR_SIZE,24"
|
||||
"XCURSOR_THEME,Bibata-Modern-Classic"
|
||||
"QT_STYLE_OVERRIDE,adwaita-dark"
|
||||
"GDK_BACKEND,wayland,x11"
|
||||
"QT_QPA_PLATFORM,wayland;xcb"
|
||||
"QT_QPA_PLATFORMTHEME,gtk3"
|
||||
"ELECTRON_OZONE_PLATFORM_HINT,auto"
|
||||
"TERMINAL,ghostty"
|
||||
"MESA_GL_VERSION_OVERRIDE,4.6"
|
||||
"MESA_GLSL_VERSION_OVERRIDE,460"
|
||||
];
|
||||
};
|
||||
}
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [
|
||||
"noctalia-shell"
|
||||
"hyprctl setcursor Bibata-Modern-Classic 24"
|
||||
"wl-paste --type text --watch cliphist store"
|
||||
"wl-paste --type image --watch cliphist store"
|
||||
];
|
||||
};
|
||||
}
|
||||
Executable
+108
@@ -0,0 +1,108 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = ",preferred,auto,1";
|
||||
|
||||
general = {
|
||||
gaps_in = 4;
|
||||
gaps_out = 5;
|
||||
border_size = 2;
|
||||
"col.active_border" = "rgba(ffffffff)";
|
||||
"col.inactive_border" = "rgba(ffffff66)";
|
||||
resize_on_border = true;
|
||||
allow_tearing = true;
|
||||
layout = "scrolling";
|
||||
};
|
||||
|
||||
scrolling = {
|
||||
column_width = 0.45;
|
||||
fullscreen_on_one_column = true;
|
||||
focus_fit_method = 1;
|
||||
follow_focus = true;
|
||||
direction = "right";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 0;
|
||||
rounding_power = 2;
|
||||
active_opacity = 1.0;
|
||||
inactive_opacity = 1.0;
|
||||
dim_inactive = true;
|
||||
dim_strength = 0.05;
|
||||
blur = {
|
||||
enabled = false;
|
||||
};
|
||||
shadow = {
|
||||
enabled = false;
|
||||
};
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "tr";
|
||||
numlock_by_default = true;
|
||||
repeat_delay = 250;
|
||||
repeat_rate = 35;
|
||||
sensitivity = -5;
|
||||
accel_profile = "adaptive";
|
||||
follow_mouse = 1;
|
||||
#force_no_accel = true;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
disable_while_typing = true;
|
||||
clickfinger_behavior = true;
|
||||
scroll_factor = 0.5;
|
||||
};
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe_distance = 700;
|
||||
workspace_swipe_cancel_ratio = 0.2;
|
||||
workspace_swipe_min_speed_to_force = 5;
|
||||
workspace_swipe_direction_lock = true;
|
||||
workspace_swipe_create_new = true;
|
||||
};
|
||||
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
mouse_move_enables_dpms = true;
|
||||
key_press_enables_dpms = true;
|
||||
animate_manual_resizes = false;
|
||||
focus_on_activate = false;
|
||||
};
|
||||
|
||||
bezier = [
|
||||
"omniDecel, 0.05, 0.9, 0.1, 1"
|
||||
"omniAccel, 0.3, 0, 0.8, 0.15"
|
||||
"omniSmooth, 0.25, 0.1, 0.25, 1"
|
||||
"omniOvershoot, 0.16, 1, 0.3, 1"
|
||||
"menu_decel, 0.1, 1, 0, 1"
|
||||
"menu_accel, 0.52, 0.03, 0.72, 0.08"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"windowsIn, 1, 6, omniOvershoot, popin 86%"
|
||||
"windowsOut, 1, 5, omniAccel, popin 92%"
|
||||
"windowsMove, 1, 6, omniDecel, slide"
|
||||
"fadeIn, 1, 5, omniDecel"
|
||||
"fadeOut, 1, 4, omniAccel"
|
||||
"border, 1, 10, omniSmooth"
|
||||
"layersIn, 1, 5, omniDecel, popin 92%"
|
||||
"layersOut, 1, 4, omniAccel, popin 94%"
|
||||
"fadeLayersIn, 1, 3, omniDecel"
|
||||
"fadeLayersOut, 1, 3, omniAccel"
|
||||
"workspaces, 1, 8, omniDecel, slide"
|
||||
"specialWorkspaceIn, 1, 5, omniDecel, slidevert"
|
||||
"specialWorkspaceOut, 1, 4, omniAccel, slidevert"
|
||||
];
|
||||
|
||||
device = [
|
||||
{
|
||||
name = "hp--inc-hyperx-cloud-alpha-s-consumer-control";
|
||||
enabled = false;
|
||||
}
|
||||
];
|
||||
|
||||
};
|
||||
}
|
||||
Executable
+126
@@ -0,0 +1,126 @@
|
||||
{ ... }:
|
||||
|
||||
let
|
||||
ipc = "noctalia-shell ipc call";
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$mainMod" = "SUPER";
|
||||
|
||||
bindr = [
|
||||
"$mainMod, SUPER_L, exec, ${ipc} launcher toggle"
|
||||
];
|
||||
|
||||
bind = [
|
||||
# workspace
|
||||
"CTRL $mainMod, right, layoutmsg, focus r"
|
||||
"CTRL $mainMod, left, layoutmsg, focus l"
|
||||
"CTRL $mainMod, down, workspace, r+1"
|
||||
"CTRL $mainMod, up, workspace, r-1"
|
||||
"CTRL $mainMod SHIFT, right, layoutmsg, movewindowto r"
|
||||
"CTRL $mainMod SHIFT, left, layoutmsg, movewindowto l"
|
||||
"CTRL $mainMod SHIFT, down, movetoworkspace, r+1"
|
||||
"CTRL $mainMod SHIFT, up, movetoworkspace, r-1"
|
||||
"$mainMod, R, layoutmsg, colresize +conf"
|
||||
"$mainMod, C, layoutmsg, center"
|
||||
"$mainMod SHIFT, R, layoutmsg, colresize 0.7"
|
||||
|
||||
# interface
|
||||
"$mainMod, P, exec, ${ipc} bar toggle"
|
||||
"CTRL ALT, Delete, exec, ${ipc} sessionMenu toggle"
|
||||
# plugins
|
||||
"$mainMod SHIFT, S, exec, ${ipc} plugin:screen-shot-and-record screenshot"
|
||||
"$mainMod SHIFT, Z, exec, ${ipc} plugin:screen-shot-and-record search"
|
||||
"$mainMod SHIFT, X, exec, ${ipc} plugin:screen-shot-and-record ocr"
|
||||
"$mainMod SHIFT, C, exec, ${ipc} plugin:music panel"
|
||||
# launchers
|
||||
"$mainMod, Return, exec, ghostty"
|
||||
"$mainMod, W, exec, zen-beta"
|
||||
"$mainMod, E, exec, thunar"
|
||||
"$mainMod, Z, exec, zeditor"
|
||||
"$mainMod ALT, V, exec, pavucontrol"
|
||||
"$mainMod SHIFT, V, exec, ${ipc} launcher clipboard"
|
||||
"$mainMod SHIFT, L, exec, ${ipc} lockScreen lock"
|
||||
"CTRL SHIFT, Escape, exec, ghostty -e sudo btop"
|
||||
|
||||
# window management
|
||||
"$mainMod, Q, killactive"
|
||||
"$mainMod ALT, SPACE, togglefloating"
|
||||
"$mainMod, F, fullscreen, 0"
|
||||
"$mainMod, D, fullscreen, 1"
|
||||
"$mainMod ALT, P, pin"
|
||||
|
||||
# focus windows
|
||||
"$mainMod, left, layoutmsg, move -col"
|
||||
"$mainMod, right, layoutmsg, move +col"
|
||||
"$mainMod, up, movefocus, u"
|
||||
"$mainMod, down, movefocus, d"
|
||||
|
||||
"$mainMod SHIFT, left, layoutmsg, movewindowto l"
|
||||
"$mainMod SHIFT, right, layoutmsg, movewindowto r"
|
||||
"$mainMod SHIFT, up, movewindow, u"
|
||||
"$mainMod SHIFT, down, movewindow, d"
|
||||
|
||||
# workspace navigation
|
||||
"$mainMod, 1, workspace, 1"
|
||||
"$mainMod, 2, workspace, 2"
|
||||
"$mainMod, 3, workspace, 3"
|
||||
"$mainMod, 4, workspace, 4"
|
||||
"$mainMod, 5, workspace, 5"
|
||||
"$mainMod, 6, workspace, 6"
|
||||
"$mainMod, 7, workspace, 7"
|
||||
"$mainMod, 8, workspace, 8"
|
||||
"$mainMod, 9, workspace, 9"
|
||||
"$mainMod, 0, workspace, 10"
|
||||
|
||||
# move windows to workspace
|
||||
"$mainMod SHIFT, 1, movetoworkspace, 1"
|
||||
"$mainMod SHIFT, 2, movetoworkspace, 2"
|
||||
"$mainMod SHIFT, 3, movetoworkspace, 3"
|
||||
"$mainMod SHIFT, 4, movetoworkspace, 4"
|
||||
"$mainMod SHIFT, 5, movetoworkspace, 5"
|
||||
"$mainMod SHIFT, 6, movetoworkspace, 6"
|
||||
"$mainMod SHIFT, 7, movetoworkspace, 7"
|
||||
"$mainMod SHIFT, 8, movetoworkspace, 8"
|
||||
"$mainMod SHIFT, 9, movetoworkspace, 9"
|
||||
"$mainMod SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
# special workspaces
|
||||
"$mainMod, S, togglespecialworkspace"
|
||||
"$mainMod ALT, S, movetoworkspacesilent, special"
|
||||
|
||||
# mouse workspace navigation
|
||||
"$mainMod, mouse_up, workspace, +1"
|
||||
"$mainMod, mouse_down, workspace, -1"
|
||||
|
||||
# media keys
|
||||
"$mainMod SHIFT, N, exec, playerctl next"
|
||||
"$mainMod SHIFT, B, exec, playerctl previous"
|
||||
"$mainMod SHIFT, P, exec, playerctl play-pause"
|
||||
];
|
||||
|
||||
# mouse binds
|
||||
bindm = [
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
# volume and brightness binds
|
||||
bindel = [
|
||||
", XF86AudioRaiseVolume, exec, ${ipc} volume increase"
|
||||
", XF86AudioLowerVolume, exec, ${ipc} volume decrease"
|
||||
", XF86MonBrightnessUp, exec, ${ipc} brightness increase"
|
||||
", XF86MonBrightnessDown, exec, ${ipc} brightness decrease"
|
||||
];
|
||||
|
||||
# volume and media keys
|
||||
bindl = [
|
||||
", XF86AudioMute, exec, ${ipc} volume muteOutput"
|
||||
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle"
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
", XF86AudioPause, exec, playerctl play-pause"
|
||||
];
|
||||
};
|
||||
}
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
windowrule = [
|
||||
"float on, match:title ^(Open File)(.*)$"
|
||||
"center on, match:title ^(Open File)(.*)$"
|
||||
"float on, match:title ^(Save As)(.*)$"
|
||||
"center on, match:title ^(Save As)(.*)$"
|
||||
"float on, match:title ^(File Upload)(.*)$"
|
||||
"center on, match:title ^(File Upload)(.*)$"
|
||||
"float on, match:class ^(pavucontrol)$"
|
||||
"center on, match:class ^(pavucontrol)$"
|
||||
"size 45% 45%, match:class ^(pavucontrol)$"
|
||||
"float on, match:title ^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$"
|
||||
"pin on, match:title ^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$"
|
||||
"keep_aspect_ratio on, match:title ^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$"
|
||||
"immediate on, match:class ^(steam_app).*"
|
||||
"float on, match:class ^(steam)$"
|
||||
"float off, match:class ^(steam)$, match:title ^(Steam)$"
|
||||
];
|
||||
};
|
||||
}
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ./hypr/default.nix ];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||
configType = "hyprlang";
|
||||
xwayland.enable = true;
|
||||
systemd.enable = false;
|
||||
systemd.variables = [ "-all" ];
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user