Home-manager to module
This commit is contained in:
1 parent
3a2ea724c0
commit
1d45ec9cab
52 files changed
+372
-347
No files matched your search
@@ -0,0 +1,26 @@
|
||||
{ config, inputs, pkgs, ... }: {
|
||||
imports = [ inputs.ags.homeManagerModules.default ];
|
||||
|
||||
programs.ags = {
|
||||
enable = true;
|
||||
|
||||
configDir = null;
|
||||
|
||||
extraPackages = with inputs.ags.packages.${pkgs.system}; [
|
||||
battery
|
||||
mpris
|
||||
hyprland
|
||||
network
|
||||
tray
|
||||
wireplumber
|
||||
];
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
pulsemixer
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = [ "ags run" ];
|
||||
|
||||
xdg.configFile."ags".source = (pkgs.callPackage ./ags/ags.nix { colors = config.lib.stylix.colors; });
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{ stdenv, lib, config, colors, ... }:
|
||||
stdenv.mkDerivation {
|
||||
name = "AGS theme";
|
||||
|
||||
src = ./ags;
|
||||
dontUnpack = true;
|
||||
|
||||
patchPhase = ''
|
||||
echo \$bg: \#${colors.base00}\; > colors.scss
|
||||
echo \$surface0: \#${colors.base02}\; >> colors.scss
|
||||
echo \$fg: \#${colors.base05}\; >> colors.scss
|
||||
echo \$accent: \#${colors.base0B}\; >> colors.scss
|
||||
|
||||
echo \#${colors.base0B} > accent.css
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ls
|
||||
mkdir $out
|
||||
cp $src/* $out -r
|
||||
mv colors.scss $out
|
||||
mv accent.css $out
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# Simple Bar Example
|
||||
|
||||

|
||||
|
||||
A simple bar for Hyprland using
|
||||
|
||||
- [Battery library](https://aylur.github.io/astal/guide/libraries/battery).
|
||||
- [Hyprland library](https://aylur.github.io/astal/guide/libraries/hyprland).
|
||||
- [Mpris library](https://aylur.github.io/astal/guide/libraries/mpris).
|
||||
- [Network library](https://aylur.github.io/astal/guide/libraries/network).
|
||||
- [Tray library](https://aylur.github.io/astal/guide/libraries/tray).
|
||||
- [WirePlumber library](https://aylur.github.io/astal/guide/libraries/wireplumber).
|
||||
@@ -0,0 +1,13 @@
|
||||
import { App } from "astal/gtk3"
|
||||
import style from "./style.scss"
|
||||
import Bar from "./widget/Bar"
|
||||
|
||||
App.start({
|
||||
css: style,
|
||||
instanceName: "ags",
|
||||
requestHandler(request, res) {
|
||||
print(request)
|
||||
res("ok")
|
||||
},
|
||||
main: () => App.get_monitors().map(Bar),
|
||||
})
|
||||
@@ -0,0 +1,97 @@
|
||||
@use "sass:color";
|
||||
@use "colors.scss" as *;
|
||||
|
||||
$radius: 10px;
|
||||
|
||||
%item {
|
||||
all: unset;
|
||||
background: $bg;
|
||||
border-radius: $radius;
|
||||
padding: 4px;
|
||||
|
||||
& + &, .item + & { margin-left: 4px; }
|
||||
|
||||
label { margin: 0 8px; }
|
||||
}
|
||||
|
||||
window.Bar {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
color: $fg;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
|
||||
.Container {
|
||||
margin: 10px 10px 0;
|
||||
}
|
||||
|
||||
.Workspaces {
|
||||
button {
|
||||
all: unset;
|
||||
|
||||
&:hover label {
|
||||
background: $surface0;
|
||||
color: $accent;
|
||||
}
|
||||
|
||||
&:active label {
|
||||
background: $surface0;
|
||||
color: $accent;
|
||||
}
|
||||
}
|
||||
|
||||
label {
|
||||
transition: 200ms;
|
||||
padding: 0 6px;
|
||||
margin: 2px;
|
||||
border-radius: $radius;
|
||||
border: 1pt solid transparent;
|
||||
}
|
||||
|
||||
.focused label {
|
||||
background: $accent;
|
||||
color: $bg;
|
||||
border-color: $accent;
|
||||
}
|
||||
}
|
||||
|
||||
.Layout.en { color: $accent; }
|
||||
|
||||
.SysTray button {
|
||||
all: unset;
|
||||
padding: 8px;
|
||||
border-radius: inherit;
|
||||
|
||||
&:hover {
|
||||
background: $surface0;
|
||||
}
|
||||
}
|
||||
|
||||
.Media {
|
||||
&.playing {
|
||||
border: 2pt solid $accent;
|
||||
}
|
||||
|
||||
.Cover {
|
||||
min-height: 1.2em;
|
||||
min-width: 1.2em;
|
||||
border-radius: $radius;
|
||||
background-position: center;
|
||||
background-size: contain;
|
||||
}
|
||||
}
|
||||
|
||||
.Battery label {
|
||||
padding-left: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.Time { padding: 0 8px; }
|
||||
|
||||
.AudioSlider icon { margin-left: 8px; }
|
||||
|
||||
.Workspaces, .Wifi, .Layout, .Media, .SysTray, .AudioSlider, .Battery, .Time {
|
||||
@extend %item;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
import { App } from "astal/gtk3"
|
||||
import { Astal, Gtk, Gdk } from "astal/gtk3"
|
||||
|
||||
import Time from "./elements/Time"
|
||||
import Wifi from "./elements/Wifi"
|
||||
import Audio from "./elements/Audio"
|
||||
import Media from "./elements/Media"
|
||||
import Layout from "./elements/Keyboard"
|
||||
import SysTray from "./elements/SysTray"
|
||||
import Workspaces from "./elements/Workspaces"
|
||||
import BatteryLevel from "./elements/Battery"
|
||||
|
||||
|
||||
export default function Bar(monitor: Gdk.Monitor) {
|
||||
const { TOP, LEFT, RIGHT } = Astal.WindowAnchor
|
||||
|
||||
return <window
|
||||
className="Bar"
|
||||
gdkmonitor={monitor}
|
||||
exclusivity={Astal.Exclusivity.EXCLUSIVE}
|
||||
anchor={TOP | LEFT | RIGHT}>
|
||||
<centerbox className="Container">
|
||||
<box hexpand halign={Gtk.Align.START}>
|
||||
<Workspaces />
|
||||
<Layout />
|
||||
</box>
|
||||
<box>
|
||||
<Media />
|
||||
</box>
|
||||
<box hexpand halign={Gtk.Align.END} >
|
||||
<Wifi />
|
||||
<Audio />
|
||||
<BatteryLevel />
|
||||
<Time />
|
||||
<SysTray />
|
||||
</box>
|
||||
</centerbox>
|
||||
</window>
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { bind } from "astal"
|
||||
import { execAsync } from "astal/process"
|
||||
import Wp from "gi://AstalWp"
|
||||
|
||||
export default function Audio() {
|
||||
const speaker = Wp.get_default()?.audio.defaultSpeaker!
|
||||
|
||||
return <button
|
||||
className="AudioSlider"
|
||||
onClicked={() => { execAsync("ghostty --title=pulsemixer -e pulsemixer") }}>
|
||||
<box>
|
||||
<icon icon={bind(speaker, "volumeIcon")} />
|
||||
<label label={bind(speaker, "volume").as(v => `${Math.floor(v*100)}%`)} />
|
||||
</box>
|
||||
</button>
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import { bind } from "astal";
|
||||
import Battery from "gi://AstalBattery";
|
||||
import accent from "../../accent.css";
|
||||
|
||||
export default function BatteryLevel() {
|
||||
const bat = Battery.get_default();
|
||||
const percent = bind(bat, "percentage").as(p => Math.floor(p * 100));
|
||||
|
||||
return (
|
||||
<box
|
||||
className="Battery"
|
||||
visible={bind(bat, "isPresent")}
|
||||
css={percent.as(p => `
|
||||
background-image: linear-gradient(
|
||||
to right,
|
||||
${accent} 0%,
|
||||
${accent} ${p}%,
|
||||
transparent ${p}%,
|
||||
transparent 100%
|
||||
);
|
||||
background-size: 100% 3px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom;
|
||||
`)}
|
||||
>
|
||||
<icon icon={bind(bat, "batteryIconName")} />
|
||||
<label label={percent.as(p => `${p}%`)} />
|
||||
</box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Variable, bind } from "astal"
|
||||
import Hyprland from "gi://AstalHyprland"
|
||||
|
||||
export default function Layout() {
|
||||
const hl = Hyprland.get_default();
|
||||
let layout = Variable("en");
|
||||
hl.connect("keyboard-layout", (_, __, l) => { layout.set(`${l}`.slice(0, 2).toLowerCase()) })
|
||||
|
||||
return <box className={bind(layout).as((l) => `Layout ${l}`)}>
|
||||
<label label={bind(layout)}/>
|
||||
</box>
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import { Variable, bind } from "astal"
|
||||
import { Gtk } from "astal/gtk3"
|
||||
import Mpris from "gi://AstalMpris"
|
||||
|
||||
export default function Media() {
|
||||
const mpris = Mpris.get_default()
|
||||
// console.log(bind(mpris, "players").as(ps => ps[0] ? `${ps[0].title} ${ps[0].artist} ${ps[0].get_playback_status()}` : "-"));
|
||||
|
||||
return <box>
|
||||
{bind(mpris, "players").as(ps => ps[0] ? (
|
||||
<button
|
||||
className={bind(ps[0], "playback-status").as(s => s == 0 ? "Media playing" : "Media")}
|
||||
onClicked={() => ps[0].play_pause()}>
|
||||
<box>
|
||||
<box
|
||||
className="Cover"
|
||||
valign={Gtk.Align.CENTER}
|
||||
css={bind(ps[0], "coverArt").as(cover =>
|
||||
`background-image: url('${cover}');`
|
||||
)}
|
||||
/>
|
||||
<label
|
||||
label={bind(ps[0], "title").as(() =>ps[0].title.length < 80 ? ps[0].title : `${ps[0].title.slice(0, 77)}...`)}
|
||||
/>
|
||||
</box>
|
||||
</button>
|
||||
) : ("") )}
|
||||
</box>
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { bind } from "astal"
|
||||
import Tray from "gi://AstalTray"
|
||||
|
||||
export default function SysTray() {
|
||||
const tray = Tray.get_default()
|
||||
|
||||
return <box className="item">
|
||||
{bind(tray, "items").as(i => (i.length > 0) ? (
|
||||
<box className="SysTray">
|
||||
{bind(tray, "items").as(items => items.map(item => (
|
||||
<menubutton
|
||||
tooltipMarkup={bind(item, "tooltipMarkup")}
|
||||
usePopover={false}
|
||||
actionGroup={bind(item, "action-group").as(ag => ["dbusmenu", ag])}
|
||||
menuModel={bind(item, "menu-model")}>
|
||||
<icon gicon={bind(item, "gicon")} />
|
||||
</menubutton>
|
||||
)))}
|
||||
</box>
|
||||
) : ("") )}
|
||||
</box>
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Variable, GLib } from "astal"
|
||||
|
||||
export default function Time({ format = "%e %b - %H:%M %a" }) {
|
||||
const time = Variable<string>("").poll(1000, () =>
|
||||
GLib.DateTime.new_now_local().format(format)!)
|
||||
|
||||
return <label
|
||||
className="Time"
|
||||
onDestroy={() => time.drop()}
|
||||
label={time()}
|
||||
/>
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { bind } from "astal"
|
||||
import Network from "gi://AstalNetwork"
|
||||
import { execAsync } from "astal/process"
|
||||
|
||||
export default function Wifi() {
|
||||
const network = Network.get_default()
|
||||
const wifi = bind(network, "wifi")
|
||||
|
||||
return <box visible={wifi.as(Boolean)}>
|
||||
{wifi.as(wifi => wifi && (
|
||||
<button
|
||||
className="Wifi"
|
||||
onClicked={() => {execAsync("ghostty --title=nmtui -e nmtui")}}>
|
||||
<box>
|
||||
<icon
|
||||
tooltipText={bind(wifi, "ssid").as(String)}
|
||||
icon={bind(wifi, "iconName")}
|
||||
/>
|
||||
<label
|
||||
label={bind(wifi, "ssid").as(String)}
|
||||
/>
|
||||
</box>
|
||||
</button>
|
||||
))}
|
||||
</box>
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { bind } from "astal"
|
||||
import Hyprland from "gi://AstalHyprland"
|
||||
|
||||
export default function Workspaces() {
|
||||
const hypr = Hyprland.get_default()
|
||||
|
||||
return <box className="Workspaces">
|
||||
{bind(hypr, "workspaces").as(wss => wss
|
||||
.filter(ws => !(ws.id >= -99 && ws.id <= -2)) // filter out special workspaces
|
||||
.sort((a, b) => a.id - b.id)
|
||||
.map(ws => (
|
||||
<button
|
||||
className={bind(hypr, "focusedWorkspace").as(fw =>
|
||||
ws === fw ? "focused" : "")}
|
||||
onClicked={() => ws.focus()}>
|
||||
{ws.id}
|
||||
</button>
|
||||
))
|
||||
)}
|
||||
</box>
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
package = pkgs.btop.override { cudaSupport = true; };
|
||||
settings = {
|
||||
shown_boxes = "proc cpu gpu0 mem net";
|
||||
# color_theme = "TTY";
|
||||
update_ms = 1000;
|
||||
cpu_single_graph = true;
|
||||
only_physical = false;
|
||||
net_auto = false;
|
||||
net_iface = "eno1";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
confirm-close-surface = false;
|
||||
copy-on-select = false;
|
||||
title-report = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ pkgs, inputs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
inputs.ayugram-desktop.packages.${pkgs.system}.ayugram-desktop
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
{ pkgs, lib, config, folder, swww_flags, inputs }: {
|
||||
home.packages = with pkgs; [
|
||||
ghostty
|
||||
pamixer
|
||||
wofi
|
||||
clipse
|
||||
wl-clipboard
|
||||
wl-clip-persist
|
||||
xclip
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland =
|
||||
let
|
||||
colors = config.lib.stylix.colors;
|
||||
|
||||
wallpaper_changer = pkgs.writers.writePython3Bin "wallpaper_changer" {
|
||||
libraries = [ pkgs.python3Packages.requests ];
|
||||
flakeIgnore = [ "E501" "E111" "E701" "E241" "E731" ];
|
||||
} /*py*/ ''
|
||||
from random import choice
|
||||
from os import system, listdir
|
||||
|
||||
filename = choice(listdir(folder))
|
||||
system(f"${lib.getExe pkgs.swww} img {folder}/{filename} ${swww_flags}")
|
||||
'';
|
||||
in {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
|
||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
plugins = with inputs.hyprland-plugins.packages.${pkgs.system}; [
|
||||
hyprbars
|
||||
];
|
||||
|
||||
settings = {
|
||||
"$mainMod" = "SUPER";
|
||||
|
||||
env = [
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
"GBM_BACKEND,nvidia"
|
||||
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
|
||||
"WLR_NO_HARDWARE_CURSORS,1"
|
||||
"XCURSOR_SIZE,36"
|
||||
|
||||
"XDG_SCREENSHOTS_DIR,~/screens"
|
||||
];
|
||||
|
||||
cursor.no_hardware_cursors = true;
|
||||
|
||||
debug = {
|
||||
disable_logs = false;
|
||||
enable_stdout_logs = true;
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "us,ru";
|
||||
kb_variant = "lang";
|
||||
kb_options = "grp:caps_toggle";
|
||||
|
||||
follow_mouse = 1;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = false;
|
||||
};
|
||||
|
||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||
};
|
||||
|
||||
windowrule = [
|
||||
"float, ^(imv)$"
|
||||
"float, ^(feh)$"
|
||||
"float, ^(mpv)$"
|
||||
"float, ^(nmtui)$"
|
||||
"float, title:^(Список друзей)"
|
||||
"move onscreen cursor -50% -50%, ^(xdragon)$"
|
||||
];
|
||||
|
||||
windowrulev2 = [
|
||||
"float, class:(clipse)"
|
||||
"size 622 652, class:(clipse)"
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
"systemctl --user start plasma-polkit-agent"
|
||||
"${lib.getExe' pkgs.swww "swww-daemon"}"
|
||||
"${lib.getExe wallpaper_changer}"
|
||||
"wl-clip-persist --clipboard both"
|
||||
"clipse -listen"
|
||||
"${lib.getExe' pkgs.udiskie "udiskie"}"
|
||||
];
|
||||
|
||||
bind = [
|
||||
"$mainMod, V, exec, kitty --class clipse -e clipse"
|
||||
|
||||
"$mainMod, Return, exec, kitty"
|
||||
"$mainMod, Q, killactive,"
|
||||
"$mainMod, M, exit,"
|
||||
"$mainMod, E, exec, kitty -e sh -c yazi"
|
||||
"$mainMod, F, togglefloating,"
|
||||
"$mainMod, D, exec, wofi --show drun"
|
||||
"$mainMod, P, pseudo, # dwindle"
|
||||
"$mainMod, J, togglesplit, # dwindle"
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"$mainMod, left, movefocus, l"
|
||||
"$mainMod, right, movefocus, r"
|
||||
"$mainMod, up, movefocus, u"
|
||||
"$mainMod, down, movefocus, d"
|
||||
|
||||
# Moving windows
|
||||
"$mainMod SHIFT, left, swapwindow, l"
|
||||
"$mainMod SHIFT, right, swapwindow, r"
|
||||
"$mainMod SHIFT, up, swapwindow, u"
|
||||
"$mainMod SHIFT, down, swapwindow, d"
|
||||
|
||||
# Window resizing X Y
|
||||
"$mainMod CTRL, left, resizeactive, -60 0"
|
||||
"$mainMod CTRL, right, resizeactive, 60 0"
|
||||
"$mainMod CTRL, up, resizeactive, 0 -60"
|
||||
"$mainMod CTRL, down, resizeactive, 0 60"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"$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 active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"$mainMod SHIFT, 1, movetoworkspacesilent, 1"
|
||||
"$mainMod SHIFT, 2, movetoworkspacesilent, 2"
|
||||
"$mainMod SHIFT, 3, movetoworkspacesilent, 3"
|
||||
"$mainMod SHIFT, 4, movetoworkspacesilent, 4"
|
||||
"$mainMod SHIFT, 5, movetoworkspacesilent, 5"
|
||||
"$mainMod SHIFT, 6, movetoworkspacesilent, 6"
|
||||
"$mainMod SHIFT, 7, movetoworkspacesilent, 7"
|
||||
"$mainMod SHIFT, 8, movetoworkspacesilent, 8"
|
||||
"$mainMod SHIFT, 9, movetoworkspacesilent, 9"
|
||||
"$mainMod SHIFT, 0, movetoworkspacesilent, 10"
|
||||
|
||||
"$mainMod SHIFT, F, fullscreen"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"$mainMod, mouse_down, workspace, e+1"
|
||||
"$mainMod, mouse_up, workspace, e-1"
|
||||
|
||||
# Keyboard backlight
|
||||
"$mainMod, F3, exec, brightnessctl -d *::kbd_backlight set +33%"
|
||||
"$mainMod, F2, exec, brightnessctl -d *::kbd_backlight set 33%-"
|
||||
|
||||
# Volume and Media Control
|
||||
", XF86AudioRaiseVolume, exec, pamixer -i 5 "
|
||||
", XF86AudioLowerVolume, exec, pamixer -d 5 "
|
||||
", XF86AudioMute, exec, pamixer -t"
|
||||
", XF86AudioMicMute, exec, pamixer --default-source -m"
|
||||
|
||||
# Brightness control
|
||||
", XF86MonBrightnessDown, exec, brightnessctl set 5%- "
|
||||
", XF86MonBrightnessUp, exec, brightnessctl set +5% "
|
||||
|
||||
# Waybar
|
||||
"$mainMod, B, exec, pkill -SIGUSR1 waybar"
|
||||
#"$mainMod, W, exec, pkill -SIGUSR2 waybar"
|
||||
|
||||
"$mainMod, W, exec, ${lib.getExe wallpaper_changer}"
|
||||
];
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = [
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
colors = config.lib.stylix.colors;
|
||||
in {
|
||||
home.packages = [ pkgs.mako ];
|
||||
xdg.configFile."mako/config".text = ''
|
||||
background-color=#${colors.base00}
|
||||
text-color=#${colors.base05}
|
||||
border-color=#${colors.base0B}
|
||||
border-radius=10
|
||||
margin=16
|
||||
progress-color=over #${colors.base0A}
|
||||
default-timeout=5000
|
||||
|
||||
[urgency=high]
|
||||
border-color=#${colors.base09}
|
||||
|
||||
[urgency=low]
|
||||
border-color=#${colors.base04}
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
{ pkgs, lib, ... }: {
|
||||
wayland.windowManager.hyprland.settings.exec-once = [ "hyprlock" ];
|
||||
|
||||
programs.hyprlock = let
|
||||
image = pkgs.fetchurl {
|
||||
name = "lock_background.png";
|
||||
url = "https://pibig.info/uploads/posts/2022-11/thumbs/1668799231_10-pibig-info-p-nyaya-oboi-11.png";
|
||||
hash = "sha256-cPq9Ef7bg+26k9IZ27RAm7UAEuGM+gxSX29hF46HapU=";
|
||||
};
|
||||
in {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
background = {
|
||||
path = lib.mkForce "${image}";
|
||||
blur_passes = 0;
|
||||
blur_size = 7;
|
||||
noise = 0.0117;
|
||||
contrast = 0.8916;
|
||||
brightness = 0.8172;
|
||||
vibrancy = 0.1696;
|
||||
vibrancy_darkness = 0.0;
|
||||
};
|
||||
|
||||
shape = {
|
||||
size = "360, 60";
|
||||
color = "rgba(17, 17, 17, 1.0)";
|
||||
rounding = -1;
|
||||
border_size = 3;
|
||||
border_color = "rgba(0, 207, 230, 1.0)";
|
||||
rotate = 0;
|
||||
xray = false;
|
||||
|
||||
position = "750, -300";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
|
||||
label = {
|
||||
text = "Hi there, $USER";
|
||||
text_align = "center";
|
||||
color = "rgba(200, 200, 200, 1.0)";
|
||||
font_size = 25;
|
||||
font_family = "Noto Sans";
|
||||
rotate = 0;
|
||||
|
||||
position = "750, -300";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
|
||||
DTlabel = {
|
||||
text = "$(date +'%Y-%m-%d %H:%M:%S')";
|
||||
text_align = "center";
|
||||
color = "rgba(200, 200, 200, 1.0)";
|
||||
font_size = 20;
|
||||
font_family = "Noto Sans";
|
||||
rotate = 0;
|
||||
|
||||
position = "750, -200";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
|
||||
input-field = {
|
||||
size = "200, 50";
|
||||
outline_thickness = 3;
|
||||
dots_size = 0.33;
|
||||
dots_spacing = 0.15;
|
||||
dots_center = false;
|
||||
dots_rounding = -1;
|
||||
dots_fade_time = 200;
|
||||
# outer_color = "rgb(151515)";
|
||||
# inner_color = "rgb(200, 200, 200)";
|
||||
# font_color = "rgb(10, 10, 10)";
|
||||
font_family = "Noto Sans";
|
||||
fade_on_empty = true;
|
||||
fade_timeout = 1000;
|
||||
placeholder_text = "<i>Input Password...</i>";
|
||||
hide_input = false;
|
||||
rounding = -1;
|
||||
# check_color = "rgb(204, 136, 34)";
|
||||
# fail_color = "rgb(204, 34, 34)";
|
||||
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
|
||||
fail_timeout = 2000;
|
||||
fail_transition = 300;
|
||||
capslock_color = -1;
|
||||
numlock_color = -1;
|
||||
bothlock_color = -1;
|
||||
invert_numlock = false;
|
||||
swap_font_color = false;
|
||||
|
||||
position = "750, -400";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
texstudio
|
||||
(texlive.combine {
|
||||
inherit (texlive)
|
||||
babel-russian
|
||||
cm-super
|
||||
cyrillic
|
||||
titlesec
|
||||
hyperref
|
||||
geometry
|
||||
caption
|
||||
float
|
||||
xcolor
|
||||
listings
|
||||
scheme-full;
|
||||
})
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }: {
|
||||
xdg.configFile."wofi/style.css".source = pkgs.fetchurl {
|
||||
name = "style.css";
|
||||
url = "https://github.com/joao-vitor-sr/wofi-themes-collection/raw/main/themes/nord.css";
|
||||
sha256 = "sha256-rMDtE7Q0hmqd9LD+Ur/QR6cMan9ev6e9IyzpwY367c0=";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
{ pkgs, lib, ... }: let
|
||||
yazi-plugins = pkgs.fetchFromGitHub {
|
||||
owner = "yazi-rs";
|
||||
repo = "plugins";
|
||||
rev = "864a0210d9ba1e8eb925160c2e2a25342031d8d3";
|
||||
hash = "sha256-m3709h7/AHJAtoJ3ebDA40c77D+5dCycpecprjVqj/k=";
|
||||
};
|
||||
starship = pkgs.fetchFromGitHub {
|
||||
owner = "Rolv-Apneseth";
|
||||
repo = "starship.yazi";
|
||||
rev = "6fde3b2d9dc9a12c14588eb85cf4964e619842e6";
|
||||
sha256 = "sha256-+CSdghcIl50z0MXmFwbJ0koIkWIksm3XxYvTAwoRlDY=";
|
||||
};
|
||||
in {
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
shellWrapperName = "y";
|
||||
|
||||
settings = {
|
||||
mgr = {
|
||||
show_hidden = true;
|
||||
};
|
||||
preview = {
|
||||
max_width = 1000;
|
||||
max_height = 1000;
|
||||
};
|
||||
};
|
||||
|
||||
plugins = {
|
||||
chmod = "${yazi-plugins}/chmod.yazi";
|
||||
full-border = "${yazi-plugins}/full-border.yazi";
|
||||
# max-preview = "${yazi-plugins}/max-preview.yazi";
|
||||
starship = starship;
|
||||
};
|
||||
|
||||
initLua = ''
|
||||
require("full-border"):setup()
|
||||
require("starship"):setup()
|
||||
'';
|
||||
|
||||
keymap = {
|
||||
mgr.prepend_keymap = [
|
||||
{
|
||||
on = "T";
|
||||
run = "plugin --sync max-preview";
|
||||
desc = "Maximize or restore the preview pane";
|
||||
}
|
||||
{
|
||||
on = ["c" "m"];
|
||||
run = "plugin chmod";
|
||||
desc = "Chmod on selected files";
|
||||
}
|
||||
{
|
||||
on = [ "<C-n>" ];
|
||||
run = ''shell '${lib.getExe pkgs.dragon-drop} -x -i -T "$@"' --confirm'';
|
||||
}
|
||||
{
|
||||
on = [ "g" "<S-d>" ];
|
||||
run = ''cd /mnt/D'';
|
||||
desc = "Goto D drive";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
programs.zed-editor = {
|
||||
enable = true;
|
||||
|
||||
userSettings = {
|
||||
lsp.clangd = {
|
||||
binary.path = "${pkgs.clang-tools}/bin/clangd";
|
||||
settings = {
|
||||
arguments = [
|
||||
"--background-index"
|
||||
"--header-insertion=never"
|
||||
# Отключаем диагностику ошибок
|
||||
"--enable-config" # Требуется для кастомных настроек
|
||||
];
|
||||
# Конфиг clangd (переопределяет аргументы)
|
||||
config = {
|
||||
Diagnostics = {
|
||||
Enable = false; # Полное отключение диагностики
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [ clang-tools ];
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
{ config, ... }: {
|
||||
programs = {
|
||||
zoxide.enable = true;
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
|
||||
settings = {
|
||||
add_newline = true;
|
||||
format = ''
|
||||
$os$directory$git_branch$git_status
|
||||
$nix_shell$status$character
|
||||
'';
|
||||
right_format = "$all";
|
||||
|
||||
cmake.disabled = true;
|
||||
cmd_duration = {
|
||||
format = "";
|
||||
show_notifications = true;
|
||||
notification_timeout = 10000;
|
||||
};
|
||||
git_branch.format = "on [$branch(:$remote_branch)]($style) ";
|
||||
git_metrics.disabled = false;
|
||||
git_status = {
|
||||
conflicted = "!";
|
||||
up_to_date = "ok";
|
||||
stashed = "S";
|
||||
modified = "M";
|
||||
};
|
||||
directory = {
|
||||
truncation_length = 3;
|
||||
fish_style_pwd_dir_length = 1;
|
||||
read_only = " RO";
|
||||
};
|
||||
nix_shell.format = "[nix-shell]($style) ";
|
||||
os.disabled = false;
|
||||
python = {
|
||||
symbol = "py ";
|
||||
python_binary = ["python3" "python"];
|
||||
};
|
||||
status.disabled = false;
|
||||
};
|
||||
};
|
||||
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
# enableAutosuggestions = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
shellAliases =
|
||||
let
|
||||
flakeDir = "~/nix";
|
||||
in {
|
||||
rb = "sudo nixos-rebuild switch --flake ${flakeDir}";
|
||||
upd = "nix flake update ${flakeDir}";
|
||||
upg = "sudo nixos-rebuild switch --upgrade --flake ${flakeDir}";
|
||||
|
||||
hms = "home-manager switch --flake ${flakeDir}";
|
||||
|
||||
conf = "$EDITOR ${flakeDir}/nixos/hosts/$(hostname)/configuration.nix";
|
||||
pkgs = "$EDITOR ${flakeDir}/nixos/packages.nix";
|
||||
|
||||
ll = "ls -l";
|
||||
se = "sudoedit";
|
||||
ff = "fastfetch";
|
||||
cat = "bat";
|
||||
cd = "z";
|
||||
|
||||
rebuild = "sudo nixos-rebuild switch --flake ~/.config/f#WhiteRaven";
|
||||
deleteGenerations = "sudo nix-collect-garbage -d";
|
||||
openHome = "vim .config/f/home-manager/home.nix";
|
||||
rebuildHome = "home-manager switch --flake ~/.config/f";
|
||||
rebuildHomeSudo = "sudo home-manager switch --flake ~/.config/f";
|
||||
openConfiguration = "sudo nano ~/.config/f/nixos/hosts/usconfig/configuration.nix";
|
||||
openHyprland = "vim .config/f/home-manager/data/hyprland.nix";
|
||||
openZSH = "vim .config/f/home-manager/zsh.nix";
|
||||
openWayBar = "vim .config/f/home-manager/data/waybar.nix";
|
||||
rebuildFlake = "sudo nixos-rebuild switch --flake /home/kirill/.config/f --impure";
|
||||
openFlake = "vim /home/kirill/.config/f/flake.nix";
|
||||
swichWalls = "python3 /nix/store/6czqsnf0gbvvm472lipndyg34qhnfpis-wallpaper_changer/bin/wallpaper_changer";
|
||||
screenshot_f="grimblast save screen ~/screenshot_$(date +\%Y-\%m-\%d_\%H-\%M-\%S).png";
|
||||
screenshot="grimblast save area ~/screenshot_$(date +\%Y-\%m-\%d_\%H-\%M-\%S).png";
|
||||
screenshot_c = "grimblast copy area";
|
||||
loginPostgresql = "sudo -u postgres psql";
|
||||
startShell = "nix-shell . --run zsh";
|
||||
VPN = "sudo openvpn --config /home/kirill/VPN/184.22.37.202_udp_1727.ovpn";
|
||||
play2Go = "ssh -i ~/.ssh/id_rsa_play2go.pub root@93.123.84.45";
|
||||
|
||||
};
|
||||
|
||||
initExtra = ''
|
||||
if [ -z "''${WAYLAND_DISPLAY}" ] && [ "''${XDG_VTNR}" -eq 1 ]; then
|
||||
dbus-run-session Hyprland
|
||||
fi
|
||||
eval "$(zoxide init zsh)"
|
||||
'';
|
||||
|
||||
history.size = 10000;
|
||||
history.path = "${config.xdg.dataHome}/zsh/history";
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [ "git" "sudo" ];
|
||||
theme = "agnoster"; # blinks is also really nice
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user