initial commit x2

This commit is contained in:
sophron
2025-06-23 00:47:36 +05:00
commit f2f225110a
193 changed files with 4737 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

View File

@@ -0,0 +1,8 @@
{ pkgs, ... }: {
programs.eww = {
enable = true;
package = pkgs.eww;
enableZshIntegration = true;
configDir = "/home/$HOME/nix/home-manager/desktop/eww";
};
}

View File

@@ -0,0 +1,68 @@
$bg: #282828;
$fg: #ebdbb2;
$bg2: #373633;
$fg2: #32302f;
* {
font-family: JetBrains Mono NF;
font-size: 14;
font-weight: 700;
}
.bar {
border: 2px solid $fg2;
border-radius: 12px;
}
.ws-number-class {
font-weight: 900;
margin: 0px 5px 0px 10px;
background: $bg2;
padding: 3px 5px 3px 5px;
border-radius: 6px;
}
.ws-title-class {
margin: 0px 5px;
padding: 3px 5px 3px 5px;
border-radius: 6px;
}
.right1 {
margin: 0px 10px;
}
.date-class {
background: $fg;
color: $bg;
padding: 3px 5px;
border-radius: 6px;
}
.volume-class {
background: $bg2;
margin: 0px 8px 0px 0px;
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
}
.language-class {
background: $bg2;
padding: 0px 10px 0px 5px;
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
}
.uptime-class {
margin: 0px 10px;
}
.music {
background: $bg2;
padding: 3px 3px;
border-radius: 6px;
}

View File

@@ -0,0 +1,66 @@
(defpoll WS :interval "0.1s" "/home/fox/.config/eww/workspace-number.sh")
(defpoll WST :interval "0.1s" "/home/fox/.config/eww/workspace-title.sh")
(defpoll DATE :interval "40s" "date +'%H:%M'")
(defpoll VOL :interval "0.1s" "/home/fox/.config/eww/volume.sh")
(defpoll LGN :interval "0.1s" "/home/fox/.config/eww/language.sh")
(defpoll UPT :interval "3600s" "/home/fox/.config/eww/uptime.sh")
(defpoll MS :interval "0.1s" "/home/fox/.config/eww/music.sh")
(defwindow bar
:monitor 0
:geometry (geometry :x "0"
:y "7"
:width "850"
:height "45"
:anchor "bottom center")
:stacking "fg"
:exclusive true
:windowtype "dock"
:wm-ignore false
(box (left)
(center)
(right)))
(defwidget left []
(box :orientation "h"
:valign "center"
:space-evenly "false"
(box :halign "center"
:orientation "v"
(label :class "ws-number-class"
:text WS))
(box :halign "start"
:orientation "v"
(label :class "ws-title-class"
:text WST))))
(defwidget center []
(box :orientation "h"
:halign "center"
:valign "center"
:class "music"
MS))
(defwidget right []
(box :orientation "h"
:halign "end"
:valign "center"
:space-evenly "false"
:vexpand "false"
:hexpand "false"
:class "right1"
(box :orientation "h" :class "upt"
(label :class "uptime-class"
:text UPT))
(box (label :class "language-class"
:text LGN))
(box (label :class "volume-class"
:text VOL))
(box (label :class "date-class"
:text DATE))))

View File

@@ -0,0 +1,7 @@
#!/bin/bash
if hyprctl devices | grep -q "active keymap: Russian"; then
echo "ru"
else
echo "en"
fi

View File

@@ -0,0 +1,15 @@
#!/bin/bash
music=$(playerctl metadata --format "{{title}}" 2>/dev/null)
max_length=15
if [ -z "$music" ]; then
echo ":: No playing ::"
else
if [ ${#music} -gt $max_length ]; then
echo "${music:0:$max_length}..."
else
echo "$music"
fi
fi

View File

@@ -0,0 +1,3 @@
command=$(uptime | awk '{print $3}')
echo "$command"

View File

@@ -0,0 +1,4 @@
#!/bin/bash
vol=$(pamixer --get-volume)
echo "$vol "

View File

@@ -0,0 +1,5 @@
#!/bin/bash
current_ws=$(hyprctl activeworkspace | grep "workspace ID" | awk '{print $3}' | head -n1)
#echo "Workspace $current_ws"
echo "$current_ws"

View File

@@ -0,0 +1,25 @@
#!/bin/bash
current_tl=$(hyprctl activewindow | grep -A1 "title" | tail -n1 | awk '{$1=""; print substr($0, 2)}')
air=""
if [[ $current_tl != $air ]]; then
case $current_tl in
zen)
echo " Browser"
;;
kitty)
echo " Terminal"
;;
org.telegram.desktop)
echo " Telegram"
;;
obsidian)
echo " Obsidian"
;;
*)
echo "$current_tl"
;;
esac
else
echo "󰇄 Desktop"
fi

47
home-manager/desktop/eww/ws.sh Executable file
View File

@@ -0,0 +1,47 @@
#!/bin/bash
#c_ws=$( hyprctl activeworkspace | grep "workspace ID" | awk '{print $3}' | head -1)
#l_ws=""
#while true; do
# if [[ "$c_ws" != "$l_ws" ]]; then
# echo $c_ws
# l_ws=$c_ws
# fi
#done
#prev_value_ws=""
#while true; do
# current_value_ws=$(hyprctl activeworkspace | grep "workspace ID" | awk '{print $3}' | head -1)
# if [[ "$current_value_ws" != "$prev_value_ws" ]]; then
# echo "$current_value_ws"
# prev_value_ws="$current_value_ws"
# fi
#done
#prev_value_tl=""
#while true; do
# current_value_tl=$(hyprctl activewindow | grep title | awk 'NR == 2' | awk '{print $2}')
# if [[ "$current_value_tl" != "$prev_value_tl" ]]; then
# echo "$current_value_tl"
# prev_value_ws="$current_value_tl"
# fi
#done
prev_ws=""
prev_tl=""
output_file="/home/fox/.cache/waybar_output"
while true; do
current_ws=$(hyprctl activeworkspace | grep "workspace ID" | awk '{print $3}' | head -n1)
current_tl=$(hyprctl activewindow | grep -A1 "title" | tail -n1 | awk '{$1=""; print substr($0, 2)}')
if [[ "$current_ws" != "$prev_ws" || "$current_tl" != "$prev_tl" ]]; then
echo "$current_ws"
echo "$current_tl"
prev_ws="$current_ws"
prev_tl="$current_tl"
fi
sleep 0.1
done

View File

@@ -0,0 +1,45 @@
{ pkgs, ... }:
let
theme = "${pkgs.gruvbox-gtk-theme}/share/themes/Gruvbox-Dark";
theme-name = "Gruvbox-Dark";
icon = "Gruvbox-Plus-Dark";
cursor = "cursor";
in {
home.packages = [
pkgs.dconf
pkgs.glib
pkgs.gruvbox-kvantum pkgs.qt6ct #перенести потом в qt.nix
];
gtk = {
enable = true;
font = {
size = 10;
name = "JetBrains Mono Medium";
};
gtk3 = {
extraCss = "${theme}/gtk-3.0/gtk-dark.css";
extraConfig = {
gtk-button-images = 0;
gtk-menu-images = 0;
gtk-application-prefer-dark-theme = 1;
button-layout = "";
};
};
gtk4 = {
extraCss = "${theme}/gtk-4.0/gtk-dark.css";
extraConfig = { buttom-layout = ""; };
};
iconTheme = {
name = "${icon}";
package = pkgs.gruvbox-plus-icons;
};
cursorTheme = {
name = "${cursor}";
package = pkgs.capitaine-cursors-themed;
};
theme = {
name = "${theme-name}";
package = pkgs.gruvbox-gtk-theme;
};
};
}

View File

@@ -0,0 +1,155 @@
{ pkgs, ... }: {
wayland.windowManager.hyprland = {
enable = true;
package = pkgs.hyprland;
portalPackage = pkgs.xdg-desktop-portal-hyprland;
xwayland.enable = true;
settings = {
autogenerated = 0;
monitor = "HDMI-A-2, 1920x1080@100, 0x0, 1";
exec-once = [ "hyprpaper" "eww open bar" ];
env = [
"XCURSOR_SIZE,24"
"HYPRCURSOR_SIZE,24"
"QT_QPA_PLATFORMTHEME,qt6ct"
"XDG_CURRENT_DESKTOP='Hyprland'"
"XDG_SESSION_TYPE='wayland'"
"XDG_SESSION_DESKTOP='Hyprland'"
"QT_AUTO_SCREEN_SCALE_FACTOR='1'"
"QT_QPA_PLATFORM='wayland'"
"QT_QPA_PLATFORMTHEME='gtk3'"
];
general = {
gaps_in = 15;
gaps_out = 30;
border_size = 2;
col = {
active_border = "rgb(32302f)";
inactive_border = "rgb(1d2021)";
};
resize_on_border = true;
allow_tearing = true;
layout = "dwindle";
};
decoration = {
rounding = 10;
rounding_power = 2;
active_opacity = 1.0;
inactive_opacity = 1.0;
shadow = {
enabled = true;
range = 5;
render_power = 5;
color = "rgb(1d2021)";
};
blur = {
enabled = true;
size = 3;
passes = 1;
vibrancy = 0.1696;
};
};
animations {
enabled = "yes, please :)";
bezier = [
"easeOutQuint,0.23,1,0.32,1"
"easeInOutCubic,0.65,0.05,0.36,1"
"linear,0,0,1,1"
"almostLinear,0.5,0.5,0.75,1.0"
"quick,0.15,0,0.1,1"
];
animation = [
"global, 1, 10, default"
"border, 1, 5.39, easeOutQuint"
"windows, 1, 4.79, easeOutQuint"
"windowsIn, 1, 4.1, easeOutQuint, popin 87%"
"windowsOut, 1, 1.49, linear, popin 87%"
"fadeIn, 1, 1.73, almostLinear"
"fadeOut, 1, 1.46, almostLinear"
"fade, 1, 3.03, quick"
"layers, 1, 3.81, easeOutQuint"
"layersIn, 1, 4, easeOutQuint, fade"
"layersOut, 1, 1.5, linear, fade"
"fadeLayersIn, 1, 1.79, almostLinear"
"fadeLayersOut, 1, 1.39, almostLinear"
"workspaces, 1, 1.94, almostLinear, fade"
"workspacesIn, 1, 1.21, almostLinear, fade"
"workspacesOut, 1, 1.94, almostLinear, fade"
];
};
dwindle = {
pseudotile = true;
preserve_split = true;
};
misc = {
force_default_wallpaper = 0;
disable_hyprland_logo = true;
};
input = {
kb_layout = "us,ru";
kb_options = "grp:alt_shift_toggle";
follow_mouse = 1;
sensitivity = 1.3;
};
gestures.workspace_swipe = false;
"$mod" = "SUPER";
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, redizewindow"
];
bind = [
"alt, l, exec, eww open lock-dialog"
"alt, g, exec, eww close bar"
"alt, m, exec, eww open bar"
"$mod shift, q, exit"
"$mod ctrl, r, exec, eww open reboot-dialog"
"$mod ctrl, q, exec, eww open off-dialog"
"alt, l, exec, eww open lock-dialog-zopa"
"$mod, c, killactive,"
"$mod, s, togglefloating,"
"$mod, t, pseudo,"
"$mod, g, togglesplit"
"alt, space, exec, rofi -show drun -config ~/.config/rofi/rofi.rasi"
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
"$mod SHIFT, 1, movetoworkspace, 1"
"$mod SHIFT, 2, movetoworkspace, 2"
"$mod SHIFT, 3, movetoworkspace, 3"
"$mod SHIFT, 4, movetoworkspace, 4"
"$mod SHIFT, 5, movetoworkspace, 5"
"$mod SHIFT, 6, movetoworkspace, 6"
"$mod, mouse_down, workspace, e+1"
"$mod, mouse_up, workspace, e-1"
];
};
};
}

View File

@@ -0,0 +1,16 @@
{ pkgs, ... }: {
services.hyprpaper = {
enable = true;
package = pkgs.hyprpaper;
settings = let
wallp = "$HOME/nix/home-manager/desktop/wallp.jpg";
in {
preload = [
"${wallp}"
];
wallpaper = [
"HDMI-A-2, ${wallp}"
];
};
};
}

View File

@@ -0,0 +1,8 @@
{ pkgs, config, ... }: {
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland-unwrapped;
#package = pkgs.rofi;
# Я НЕНАВИЖУ ТОГО КТО ДЛЯ РОФИ ПИСАЛ ЭТОТ ПРИНИМАЮЩИЙ КОНФИГ
};
}

View File

@@ -0,0 +1,94 @@
* {
bg: #282828;
fg: #ebdbb2;
}
configuration {
modes: "drun";
font: "JetBrainsMono Regular 10";
location: 0;
xoffset: 0;
yoffset: 0;
}
window {
background-color: @bg;
width: 400;
border: 2px solid;
border-radius: 12px;
border-color: #32302f;
}
mainbox {
background-color: @bg;
padding: 6px;
margin: 8px;
border-radius: 12px;
}
inputbar {
background-color: @fg;
border: 2px solid;
border-color: @fg;
padding: 6px;
border-radius: 5px;
}
prompt {
enabled: false;
}
textbox-prompt-colon {
expand: false;
str: " ";
background-color: @fg;
text-color: @bg;
}
entry {
background-color: @fg;
text-color: @bg;
cursor: text;
placeholder: "Search...";
placeholder-color: @bg;
}
listview {
columns: 1;
lines: 16;
dynamic: true;
scrollbar: false;
fixed-height: true;
fixed-columns: true;
background-color: @bg;
text-color: @fg;
margin: 5px 0px 0px 0px;
}
element {
background-color: @bg;
text-color: @fg;
padding: 8px 3px;
}
element normal.normal,
element alternate.normal,
message,
error-message {
background-color: @bg;
text-color: @fg;
}
element selected.normal {
background-color: @fg;
text-color: @bg;
border-radius: 5px;
padding: 8px 4px;
}
error-message,
textbox {
padding: 3px;
background-color: @bg;
text-color: @fg;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@@ -0,0 +1,40 @@
{ config, pkgs, ... }: {
xdg = {
enable = true;
portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
config = {
common.default = "gtk";
};
};
cacheHome = builtins.toPath "${config.home.homeDirectory}/.cache";
configHome = builtins.toPath "${config.home.homeDirectory}/.config";
dataHome = builtins.toPath "${config.home.homeDirectory}/.local/share";
stateHome = builtins.toPath "${config.home.homeDirectory}/.local/state";
systemDirs = {
config = [ "/etc/xdg" ];
data = [ "/usr/share" "/usr/local/share" ];
};
userDirs = {
enable = true;
createDirectories = true;
desktop = builtins.toPath "${config.home.homeDirectory}/Desktop";
documents = builtins.toPath "${config.home.homeDirectory}/Documents";
download = builtins.toPath "${config.home.homeDirectory}/Downloads";
pictures = builtins.toPath "${config.home.homeDirectory}/Pictures";
videos = null;
music = null;
publicShare = null;
templates = null;
extraConfig = {
XDG_GIT_DIR = "${config.home.homeDirectory}/Repositories";
};
};
};
}