Merge branch 'main' into ags-config

This commit is contained in:
Zhongheng Liu 2024-09-19 10:25:58 +03:00
commit 1f80786864
No known key found for this signature in database
16 changed files with 324 additions and 138 deletions

View file

@ -0,0 +1,23 @@
const hyprland = await Service.import("hyprland")
const dispatch = ws => hyprland.messageAsync(`dispatch workspace ${ws}`);
const Workspaces = () => Widget.EventBox({
onScrollUp: () => dispatch('+1'),
onScrollDown: () => dispatch('-1'),
child: Widget.Box({
children: Array.from({ length: 10 }, (_, i) => i + 1).map(i => Widget.Button({
attribute: i,
label: `${i}`,
onClicked: () => dispatch(i),
class_name: i === hyprland.active.workspace.id ? "focused" : ""
})),
// remove this setup hook if you want fixed number of buttons
setup: self => self.hook(hyprland, () => self.children.forEach(btn => {
btn.visible = hyprland.workspaces.some(ws => ws.id === btn.attribute);
})),
}),
})
export { Workspaces };

View file

@ -0,0 +1,25 @@
const network = await Service.import("network")
const WifiIndicator = () => Widget.Box({
children: [
Widget.Icon({
icon: network.wifi.bind('icon_name'),
}),
Widget.Label({
label: network.wifi.bind('ssid')
.as(ssid => ssid || 'Unknown'),
}),
],
})
const WiredIndicator = () => Widget.Icon({
icon: network.wired.bind('icon_name'),
})
const NetworkIndicator = () => Widget.Stack({
children: {
wifi: WifiIndicator(),
wired: WiredIndicator(),
},
shown: network.bind('primary').as(p => p || 'wifi'),
})
export { NetworkIndicator };

View file

@ -9,7 +9,10 @@
source = ./config;
};
};
home.packages = with pkgs; [ags];
home.packages = with pkgs; [
ags
brightnessctl
];
myAutostartCommands = [
#"${pkgs.ags}/bin/ags --init"
"${pkgs.ags}/bin/ags"

View file

@ -62,6 +62,8 @@
file = {"wallpaper.jpg".source = ./assets/nixos-wallpaper.jpg;};
};
home.packages = with pkgs; [
bottom
libnotify
prismlauncher
protonvpn-gui
devenv
@ -70,6 +72,7 @@
zed-editor
rhythmbox
#clash-verge-rev
vesktop
qq
libreoffice
discord

View file

@ -19,23 +19,34 @@
xwayland = {force_zero_scaling = true;};
monitor = [
#"eDP-1, 1920x1080@165,0x0,1"
",preferred, auto, ${builtins.toString config.displayScale}"
"HDMI-A-1, 1920x1080@75, 2560x0, 1"
"eDP-1,preferred, auto, ${builtins.toString config.displayScale}"
];
general = {
border_size = 1;
gaps_in = 2.5;
gaps_out = 5;
};
decoration = {
rounding = 5;
};
input = {
# xset rate 250 50 replacement on wayland...
# FAST MODE LET'S GOOO
repeat_rate = 50;
repeat_delay = 250;
accel_profile = "flat";
};
exec-once =
config.myAutostartCommands
++ [
"[workspace special silent] ${pkgs.foot}/bin/foot -f 'BlexMono Nerd Font:size=12' -o colors.alpha=0.85 ${config.myShells.defaultShell}"
"[workspace special silent] ${pkgs.foot}/bin/foot -f 'BlexMono Nerd Font:size=16' -o colors.alpha=0.85 ${config.myShells.defaultShell}"
];
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
font_family = "monospace";
focus_on_activate = true; # see if fixes mako daemon not focusing
};
"$mod" = "SUPER";
binde = [
@ -45,15 +56,15 @@
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
];
bind = let
terminalCmd = "${pkgs.foot}/bin/foot -f 'BlexMono Nerd Font:size=12' -o colors.alpha=0.85";
terminalCmd = "${pkgs.foot}/bin/foot -f 'BlexMono Nerd Font:size=16' -o colors.alpha=0.85 ${config.myShells.defaultShell}";
screenshotLocation = "/home/${config.myUserName}/Screenshots/$(date '+%Y-%m-%d-%H-%M-%S').png";
in
[
"$mod SHIFT, L, exec, ${pkgs.hyprlock}/bin/hyprlock --immediate"
"$mod SHIFT, L, exec, ${pkgs.wlogout}/bin/wlogout"
"$mod SHIFT, Print, exec, ${pkgs.grimblast}/bin/grimblast copysave output ${screenshotLocation}"
"$mod, Print, exec, ${pkgs.grimblast}/bin/grimblast copysave area ${screenshotLocation}"
", Print, exec, ${pkgs.grimblast}/bin/grimblast copy area"
", Print, exec, ${pkgs.grimblast}/bin/grimblast copysave area ${screenshotLocation}"
"$mod, Print, exec, ${pkgs.grimblast}/bin/grimblast copy area"
# special workspace keybinds
"$mod, S, togglespecialworkspace"
@ -64,7 +75,7 @@
"$mod, Q, killactive"
"$mod, D, exec, ${pkgs.fuzzel}/bin/fuzzel"
# firefox quickstart
"$mod, F, exec, ${pkgs.firefox}/bin/firefox"
"$mod, F, fullscreen"
"$mod, E, exec, ${pkgs.pcmanfm}/bin/pcmanfm"
# foot terminal
"$mod, Return, exec, ${terminalCmd} ${config.myShells.defaultShell}"

View file

@ -33,13 +33,8 @@
outputs = [
{
criteria = "HDMI-A-1";
position = "0,0";
mode = "1920x1080@60.00Hz";
}
{
criteria = "eDP-1";
position = "0,0";
status = "disable";
position = "2560,0";
mode = "1920x1080@75.00Hz";
}
];
};

View file

@ -1,9 +1,10 @@
{pkgs}: {
cd = "z";
cdi = "zi";
ls = "${pkgs.eza}/bin/exa";
ls = "${pkgs.lsd}/bin/lsd";
cat = "${pkgs.bat}/bin/bat";
ll = "ls -l";
rm = "${pkgs.trash-cli}/bin/trash";
osupdate = "${pkgs.nh}/bin/nh os switch";
homeupdate = "${pkgs.nh}/bin/nh home switch";
batmon = "watch -n0 upower -i /org/freedesktop/UPower/devices/battery_BAT1";

View file

@ -1,13 +1,14 @@
{
pkgs,
lib,
config,
...
}: {
wayland.windowManager.sway = {
enable = true;
config = rec {
modifier = "Mod4";
terminal = "${pkgs.foot}/bin/foot -f 'BlexMono Nerd Font:size=24' zsh";
terminal = "${pkgs.foot}/bin/foot -f '${config.desktopFontFullName}:size=24' zsh";
};
};
}