Switch to Hyprland
This commit is contained in:
parent
009a965200
commit
8e42dc2420
9 changed files with 352 additions and 39 deletions
|
@ -5,12 +5,13 @@ import {
|
|||
graphics_card_usage,
|
||||
volume_widget,
|
||||
} from "./widgets/bar/system-stats.js";
|
||||
import { extended_bar } from "./widgets/bar-extended/extended-bar.js";
|
||||
// import { extended_bar } from "./widgets/bar-extended/extended-bar.js";
|
||||
import { launcher } from "./widgets/launcher/launcher.js";
|
||||
import { popup_clock } from "./widgets/popup-clock/popup-clock.js";
|
||||
import { date } from "./state.js";
|
||||
const mpris = await Service.import("mpris");
|
||||
const sway = await Service.import("sway");
|
||||
// const sway = await Service.import("sway");
|
||||
const hyprland = await Service.import("hyprland");
|
||||
const players = mpris.bind("players");
|
||||
|
||||
App.addIcons(`${App.configDir}/assets`);
|
||||
|
@ -23,20 +24,8 @@ function Workspaces() {
|
|||
class_name: "workspace-button",
|
||||
label: i.toString(),
|
||||
setup: (btn) => {
|
||||
btn.hook(
|
||||
sway,
|
||||
(btn) => {
|
||||
const ws = sway.getWorkspace(`${i}`);
|
||||
btn.toggleClassName(
|
||||
"occupied",
|
||||
ws?.nodes.length + ws?.floating_nodes.length > 0,
|
||||
);
|
||||
},
|
||||
"notify::workspaces",
|
||||
);
|
||||
|
||||
btn.hook(sway.active.workspace, (btn) => {
|
||||
btn.toggleClassName("active", sway.active.workspace.name == i);
|
||||
btn.bind("prop", hyprland.active.workspace, "id", (id) => {
|
||||
btn.toggleClassName("active", id == i);
|
||||
});
|
||||
},
|
||||
});
|
||||
|
@ -161,5 +150,5 @@ Utils.monitorFile(
|
|||
|
||||
App.config({
|
||||
style: "./style.css",
|
||||
windows: [bar, extended_bar, launcher, popup_clock],
|
||||
windows: [bar, launcher, popup_clock],
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@define-color bg-bar rgba(0, 0, 0, 0.1);
|
||||
@define-color bg-bar rgba(0, 0, 0, 0.3);
|
||||
@define-color bg rgba(0, 0, 0, 0.0);
|
||||
@define-color normal rgba(0, 0, 0, 0.6);
|
||||
@define-color hover rgba(0, 0, 0, 0.4);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
./dunst.nix
|
||||
./firefox.nix
|
||||
./gtk.nix
|
||||
./hypr
|
||||
./kitty.nix
|
||||
./sway.nix
|
||||
./qt.nix
|
||||
|
@ -38,6 +39,10 @@
|
|||
qdiskinfo
|
||||
mangohud
|
||||
heroic
|
||||
ungoogled-chromium
|
||||
mediainfo-gui
|
||||
android-tools
|
||||
mitmproxy
|
||||
];
|
||||
};
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
|
1
hosts/totsugeki/home-manager/desktop/hypr/default.nix
Normal file
1
hosts/totsugeki/home-manager/desktop/hypr/default.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{ ... }: { imports = [ ./hyprland.nix ./hyprlock.nix ]; }
|
171
hosts/totsugeki/home-manager/desktop/hypr/hyprland.nix
Normal file
171
hosts/totsugeki/home-manager/desktop/hypr/hyprland.nix
Normal file
|
@ -0,0 +1,171 @@
|
|||
{ ... }: {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings = {
|
||||
monitor = "DP-1, 2560x1440@165, 0x0, 1";
|
||||
input = {
|
||||
# Keyboard
|
||||
kb_layout = "es";
|
||||
kb_variant = "dvorak";
|
||||
kb_options = "lv5:caps_switch";
|
||||
# Mouse
|
||||
sensitivity = -0.4;
|
||||
accel_profile = "flat";
|
||||
};
|
||||
|
||||
exec-once =
|
||||
[ "hyprlock" "ags" "swww-daemon" "[workspace 10 silent] qbittorrent" ];
|
||||
|
||||
env = [
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
];
|
||||
|
||||
general = {
|
||||
border_size = 0;
|
||||
gaps_in = 4;
|
||||
gaps_out = 4;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 8;
|
||||
dim_inactive = true;
|
||||
dim_strength = 0.4;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 4;
|
||||
passes = 3;
|
||||
};
|
||||
shadow.enabled = false;
|
||||
};
|
||||
|
||||
animations = {
|
||||
animation = [
|
||||
"windows, 1, 4, wind, slide"
|
||||
"windowsIn, 1, 4, winIn, slide"
|
||||
"windowsOut, 1, 3, winOut, slide"
|
||||
"windowsMove, 1, 3, wind, slide"
|
||||
"workspaces, 1, 2, default, slidevert"
|
||||
];
|
||||
bezier = [
|
||||
"wind, 0.05, 0.92, 0.1, 1"
|
||||
"winIn, 0.1, 1.1, 0.1, 1"
|
||||
"winOut, 0.3, -0.3, 0, 1"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
force_split = 2;
|
||||
use_active_for_splits = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
bind = [
|
||||
"SUPER SHIFT CTRL ALT, Q, exit,"
|
||||
# Window management
|
||||
"SUPER, W, killactive"
|
||||
"SUPER, F, togglefloating, "
|
||||
"SUPER, C, centerwindow"
|
||||
"SUPER, F11, fullscreen, 0"
|
||||
# Spawns
|
||||
"CTRL ALT, T, exec, kitty"
|
||||
"SUPER, Space, exec, ags -t launcher"
|
||||
"SUPER, C, exec, ags -t bar_extended"
|
||||
"SUPER, E, exec, pcmanfm-qt"
|
||||
# Session locking
|
||||
", code:191, exec, hyprlock"
|
||||
"MOD3, L, exec, hyprlock"
|
||||
# Window navigation
|
||||
"SUPER, k, movefocus, u"
|
||||
"SUPER, j, movefocus, d"
|
||||
"SUPER, h, movefocus, l"
|
||||
"SUPER, l, movefocus, r"
|
||||
# Workspace navigation
|
||||
"SUPER, 1, workspace, 1"
|
||||
"SUPER, 2, workspace, 2"
|
||||
"SUPER, 3, workspace, 3"
|
||||
"SUPER, 4, workspace, 4"
|
||||
"SUPER, 5, workspace, 5"
|
||||
"SUPER, 6, workspace, 6"
|
||||
"SUPER, 7, workspace, 7"
|
||||
"SUPER, 8, workspace, 8"
|
||||
"SUPER, 9, workspace, 9"
|
||||
"SUPER, 0, workspace, 10"
|
||||
# Send window to workspace
|
||||
"SUPER SHIFT, 1, movetoworkspace, 1"
|
||||
"SUPER SHIFT, 2, movetoworkspace, 2"
|
||||
"SUPER SHIFT, 3, movetoworkspace, 3"
|
||||
"SUPER SHIFT, 4, movetoworkspace, 4"
|
||||
"SUPER SHIFT, 5, movetoworkspace, 5"
|
||||
"SUPER SHIFT, 6, movetoworkspace, 6"
|
||||
"SUPER SHIFT, 7, movetoworkspace, 7"
|
||||
"SUPER SHIFT, 8, movetoworkspace, 8"
|
||||
"SUPER SHIFT, 9, movetoworkspace, 9"
|
||||
"SUPER SHIFT, 0, movetoworkspace, 10"
|
||||
# Screenshots
|
||||
", Print, exec, screenshot full"
|
||||
"SHIFT, Print, exec, screenshot section"
|
||||
"SUPER, S, exec, screenshot full"
|
||||
"SUPER + SHIFT, S, exec, screenshot section"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
# Submaps
|
||||
"MOD3, m, submap, Música"
|
||||
"MOD3, w, submap, Fondo de pantalla"
|
||||
# Volume mute
|
||||
", XF86AudioMute, exec, volumectl output toggle-mute"
|
||||
"SHIFT, XF86AudioMute, exec, volumectl input toggle-mute"
|
||||
];
|
||||
|
||||
bindle = [
|
||||
# Volume control
|
||||
", XF86AudioRaiseVolume, exec, volumectl output +5"
|
||||
", XF86AudioLowerVolume, exec, volumectl output -5"
|
||||
"SHIFT, XF86AudioRaiseVolume, exec, volumectl input +5"
|
||||
"SHIFT, XF86AudioLowerVolume, exec, volumectl input -5"
|
||||
];
|
||||
|
||||
bindm =
|
||||
[ "SUPER, mouse:272, movewindow" "SUPER, mouse:273, resizewindow" ];
|
||||
|
||||
layerrule = [
|
||||
"blur, bar"
|
||||
"ignorezero, bar"
|
||||
"blur, launcher"
|
||||
"ignorezero, launcher"
|
||||
"blur, extended_bar"
|
||||
"ignorezero, extended_bar"
|
||||
];
|
||||
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
vrr = 2;
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
submap = Fondo de pantalla
|
||||
|
||||
bind = , H, exec, change-wallpaper previous
|
||||
bind = , L, exec, change-wallpaper next
|
||||
bindl = , escape, submap, reset
|
||||
bindl = MOD3, w, submap, reset
|
||||
|
||||
submap = reset
|
||||
|
||||
submap = Música
|
||||
|
||||
bindl = , p, exec, playerctl play-pause
|
||||
bindl = , h, exec, playerctl previous
|
||||
bindl = , l, exec, playerctl next
|
||||
bindl = , escape, submap, reset
|
||||
bindl = MOD3, m, submap, reset
|
||||
|
||||
submap = reset
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
65
hosts/totsugeki/home-manager/desktop/hypr/hyprlock.nix
Normal file
65
hosts/totsugeki/home-manager/desktop/hypr/hyprlock.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{ ... }: {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = {
|
||||
path = "$HOME/.local/share/wallpapers/.current_image";
|
||||
blur_size = 4;
|
||||
blur_passes = 3;
|
||||
};
|
||||
label = [
|
||||
{
|
||||
text = "$TIME";
|
||||
color = "rgba(255, 255, 255, 1.0)";
|
||||
font_size = 96;
|
||||
position = "0, -90";
|
||||
font_family = "Inter Medium";
|
||||
halign = "center";
|
||||
valign = "top";
|
||||
}
|
||||
{
|
||||
text = ''cmd[update:1000] date "+%A, %-e de %B del %Y"'';
|
||||
font_family = "Inter";
|
||||
font_size = 20;
|
||||
position = "0, -235";
|
||||
halign = "center";
|
||||
valign = "top";
|
||||
}
|
||||
{
|
||||
text = "$DESC";
|
||||
font_family = "Inter";
|
||||
position = "0, -35";
|
||||
font_size = 18;
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
image = {
|
||||
size = "150, 150";
|
||||
position = "0, 65";
|
||||
path = "$HOME/.face.icon";
|
||||
rounding = -1;
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
input-field = {
|
||||
size = "300, 50";
|
||||
outline_thickness = 0;
|
||||
dots_size = 0.2;
|
||||
dots_spacing = 0.15;
|
||||
dots_center = true;
|
||||
dots_rounding = -1;
|
||||
fade_on_empty = false;
|
||||
placeholder_text =
|
||||
''<span color="##ffffffb7">Introduce la contraseña</span>'';
|
||||
outer_color = "rgba(255, 255, 255, 0.5)";
|
||||
inner_color = "rgba(255, 255, 255, 0.0)";
|
||||
font_color = "rgba(255, 255, 255, 1.0)";
|
||||
rounding = -1;
|
||||
position = "0, -80";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -17,7 +17,7 @@
|
|||
"ctrl+alt+9" = "goto_tab 9";
|
||||
};
|
||||
settings = {
|
||||
"background_opacity" = "0.8";
|
||||
"background_opacity" = "0.85";
|
||||
"dynamic_background_opacity" = true;
|
||||
"force_ltr" = "yes";
|
||||
"disable_ligatures" = "never";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue