updated ryuuko

This commit is contained in:
emily 2024-05-29 21:10:12 +02:00
parent 01ccbeba55
commit df6b96bb6f
Signed by: snaki
GPG key ID: F6F4C66207FCF995
14 changed files with 570 additions and 206 deletions

View file

@ -26,6 +26,7 @@
] ++ lib.optionals config.kyouma.machine-type.graphical [ ] ++ lib.optionals config.kyouma.machine-type.graphical [
linux-manual linux-manual
colmena colmena
clinfo
thunderbird thunderbird
obsidian obsidian
krita krita

View file

@ -1,4 +1,4 @@
{ config, inputs, lib, pkgs, ... }: { { inputs, lib, pkgs, ... }: {
imports = [ imports = [
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x1-extreme-gen4 inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x1-extreme-gen4
../../common ../../common
@ -10,7 +10,8 @@
boot.extraModprobeConfig = '' boot.extraModprobeConfig = ''
options i915 enable_guc=3 options i915 enable_guc=3
''; '';
boot.initrd.kernelModules = [ "i915" ]; boot.initrd.kernelModules = [ "i915" "amdgpu" ];
boot.initrd.supportedFilesystems = [ "btrfs" ];
boot.kernelParams = [ boot.kernelParams = [
"intel_iommu=on" "intel_iommu=on"
"i915.enable_guc=3" "i915.enable_guc=3"
@ -32,7 +33,11 @@
hardware.opengl = { hardware.opengl = {
driSupport32Bit = true; driSupport32Bit = true;
extraPackages = [ pkgs.intel-media-driver pkgs.libvdpau-va-gl ]; extraPackages = with pkgs; [
intel-media-driver
libvdpau-va-gl
rocmPackages.clr.icd
];
}; };
hardware.sane = { hardware.sane = {
enable = true; enable = true;

View file

@ -3,7 +3,6 @@
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
inputs.stylix.nixosModules.stylix inputs.stylix.nixosModules.stylix
./nixvim.nix ./nixvim.nix
./scripts.nix
]; ];
kyouma.machine-type.graphical = true; kyouma.machine-type.graphical = true;
@ -12,7 +11,7 @@
boot.plymouth.enable = true; boot.plymouth.enable = true;
security.pam.services.swaylock = {}; security.pam.services.hyprlock = {};
services.dbus.packages = [ pkgs.gcr ]; services.dbus.packages = [ pkgs.gcr ];
services.geoclue2.enable = true; services.geoclue2.enable = true;
@ -32,6 +31,7 @@
GDK_BACKEND = "wayland,x11"; GDK_BACKEND = "wayland,x11";
MOZ_ENABLE_WAYLAND = "1"; MOZ_ENABLE_WAYLAND = "1";
CLUTTER_BACKEND = "wayland"; CLUTTER_BACKEND = "wayland";
LIBVA_DRIVER_NAME = "iHD";
}; };
xdg.icons.enable = true; xdg.icons.enable = true;
xdg.portal = { xdg.portal = {
@ -106,6 +106,42 @@
fi fi
''; '';
}; };
home.file."./local/bin/hypr/colorpicker.sh" = {
enable = true;
executable = true;
source = pkgs.writeShellApplication {
name = "colorpicker";
text = builtins.readFile ./files/scripts/colorpicker.sh;
runtimeInputs = with pkgs; [ coreutils grim slurp imagemagick_light wl-clipboard libnotify ];
};
};
home.file."./local/bin/hypr/rofi_powermenu.sh" = {
enable = true;
executable = true;
source = pkgs.writeShellApplication {
name = "rofi-powermenu";
text = builtins.readFile ./files/scripts/rofi_powermenu.sh;
runtimeInputs = with pkgs; [ rofi coreutils-full toybox xdg-user-dirs ];
};
};
home.file."./local/bin/hypr/rofi_screenshot.sh" = {
enable = true;
executable = true;
source = pkgs.writeShellApplication {
name = "rofi-screenshot";
text = builtins.readFile ./files/scripts/rofi_screenshot.sh;
runtimeInputs = with pkgs; [ coreutils grim hyprland imv slurp wl-clipboard libnotify pulseaudio toybox rofi xdg-user-dirs ];
};
};
home.file."./local/bin/hypr/screenshot.sh" = {
enable = true;
executable = true;
source = pkgs.writeShellApplication {
name = "screenshot";
text = builtins.readFile ./files/scripts/screenshot.sh;
runtimeInputs = with pkgs; [ coreutils grim imv slurp wl-clipboard libnotify pulseaudio ];
};
};
home.file."Pictures/wallpapers/sylviaritter/wallpaper.png" = { home.file."Pictures/wallpapers/sylviaritter/wallpaper.png" = {
enable = true; enable = true;
source = config.stylix.image; source = config.stylix.image;
@ -114,12 +150,6 @@
enable = true; enable = true;
source = config.stylix.image; source = config.stylix.image;
}; };
home.file.".local/bin/hypr" = {
enable = true;
executable = true;
recursive = true;
source = ./files/scripts;
};
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
settings = let settings = let
@ -127,7 +157,6 @@
pactl = "${pkgs.pulseaudio}/bin/pactl"; pactl = "${pkgs.pulseaudio}/bin/pactl";
playerctl = "${pkgs.playerctl}/bin/playerctl"; playerctl = "${pkgs.playerctl}/bin/playerctl";
notifysend = "${pkgs.libnotify}/bin/notify-send"; notifysend = "${pkgs.libnotify}/bin/notify-send";
swaylock = "${pkgs.swaylock}/bin/swaylock";
dolphin = "${pkgs.libsForQt5.dolphin}/bin/dolphin"; dolphin = "${pkgs.libsForQt5.dolphin}/bin/dolphin";
firefox = "${pkgs.firefox}/bin/firefox"; firefox = "${pkgs.firefox}/bin/firefox";
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl"; brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
@ -239,17 +268,21 @@
"eDP-1, 3840x2400@60, 0x0, 1, bitdepth, 10" "eDP-1, 3840x2400@60, 0x0, 1, bitdepth, 10"
#"eDP-1, 2560x1600@60, 0x0, 1, bitdepth, 10" #"eDP-1, 2560x1600@60, 0x0, 1, bitdepth, 10"
#"eDP-1, 1920x1200@60, 0x0, 1, bitdepth, 10" #"eDP-1, 1920x1200@60, 0x0, 1, bitdepth, 10"
"desc:ASUSTek COMPUTER INC ASUS VA24E M7LMTF021529, 1920x1080@60, -320x-1080, 1" "desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS AD27QD 19320B000455, 2560x1440@143.972,3840x0, 1,bitdepth,10"
"desc:ASUSTek COMPUTER INC ASUS VA24E M7LMTF021525, 1920x1080@60, 1600x-1080, 1" "desc:Samsung Electric Company S27E500 0x3043394D, 1920x1080@70,6400x180, 1"
",preferred,auto,1" ",preferred,auto,1"
]; ];
workspace = [ workspace = [
"1, monitor:eDP-1, default:true" "1, monitor:desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS AD27QD 19320B000455, default:true"
"2, monitor:eDP-1" "2, monitor:desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS AD27QD 19320B000455"
"3, monitor:eDP-1" "3, monitor:desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS AD27QD 19320B000455"
"8, monitor:DP-2" "4, monitor:desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS AD27QD 19320B000455"
"9, monitor:DP-3" "5, monitor:desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS AD27QD 19320B000455"
"10, monitor:eDP-1" "6, monitor:desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS AD27QD 19320B000455"
"7, monitor:desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS AD27QD 19320B000455"
"8, monitor:desc:Samsung Electric Company S27E500 0x3043394D"
"9, monitor:desc:Samsung Electric Company S27E500 0x3043394D"
"10,monitor:desc:GIGA-BYTE TECHNOLOGY CO. LTD. AORUS AD27QD 19320B000455"
]; ];
windowrule = [ windowrule = [
"float, foot-float" "float, foot-float"
@ -276,10 +309,11 @@
"$mod, D, exec, ${rofi} -show drun -theme ~/.config/rofi/launcher.rasi" "$mod, D, exec, ${rofi} -show drun -theme ~/.config/rofi/launcher.rasi"
"$mod, R, exec, ${rofi} -show run -theme ~/.config/rofi/runner.rasi" "$mod, R, exec, ${rofi} -show run -theme ~/.config/rofi/runner.rasi"
"$mod, A, exec, ~/.local/bin/hypr/rofi_screenshot.sh" "$mod, A, exec, ~/.local/bin/hypr/rofi_screenshot.sh"
"$mod, X, exec, ~/.local/bin/hypr/rofi_powermenu.sh"
# Misc # Misc
"$mod, C, exec, ~/.local/bin/hypr/colorpicker.sh" "$mod, C, exec, ~/.local/bin/hypr/colorpicker.sh"
"CTRL_ALT, L, exec, ${swaylock} -f -i $XDG_PICTURES_DIR/wallpapers/lockscreen.png" "CTRL_ALT, L, exec, ${pkgs.hyprlock}/bin/hyprlock"
# Function keys # Function keys
", XF86AudioMute, exec, ${pactl} set-sink-mute @DEFAULT_SINK@ toggle" ", XF86AudioMute, exec, ${pactl} set-sink-mute @DEFAULT_SINK@ toggle"
@ -401,6 +435,10 @@
"$mod ALT, down, moveactive, 0 80" "$mod ALT, down, moveactive, 0 80"
"$mod ALT, J, moveactive, 0 80" "$mod ALT, J, moveactive, 0 80"
]; ];
bindl = [
",switch:on:Lid Switch,exec, lsusb -d 17ef:30b4 && hyprctl keyword monitor 'eDP-1, disable'"
",switch:off:Lid Switch,exec, hyprctl keyword monitor 'eDP-1, 3840x2400@60, 0x0, 1, bitdepth,10'"
];
bindm = [ bindm = [
"$mod, mouse:272, movewindow" "$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow" "$mod, mouse:273, resizewindow"
@ -411,10 +449,51 @@
}; };
}; };
programs.hyprlock = {
enable = true;
settings = {
general = {
grace = 1;
hide_cursor = true;
disable_loading_bar = true;
};
background = [{
path = "screenshot";
#path = "$HOME/Pictures/wallpapers/lockscreen.png";
blur_passes = 3;
contrast = 1.25;
}];
input-field = [{
size = "250, 60";
outline_thickness = 2;
dots_size = 0.2;
dots_spacing = 0.2;
dots_center = true;
outer_color = "rgba(0, 0, 0, 0)";
inner_color = "rgba(0, 0, 0, 0.5)";
font_color = "rgb(200, 200, 200)";
fade_on_empty = true;
fade_timeout = 5000;
font_family = "JetBrains Mono Nerd Font Mono";
fail_text = "<i>$FAIL <b>$ATTEMPTS</b></i>";
position = "0, 200";
halign = "center";
valign = "bottom";
}];
label = [{
text = "cmd[update:250] date +%X";
color = "rgba(255, 255, 255, 0.6)";
font_size = "100";
font_family = "JetBrains Mono Nerd Font Mono ExtraBold";
position = "0, -300";
halign = "center";
valign = "top";
}];
};
};
programs.imv.enable = true; programs.imv.enable = true;
programs.swaylock.enable = true;
programs.wpaperd = { programs.wpaperd = {
enable = true; enable = true;
settings.default = { settings.default = {
@ -647,13 +726,13 @@
services.swayidle = services.swayidle =
let let
swaylock = "${pkgs.swaylock}/bin/swaylock"; hyprlock = "${pkgs.hyprlock}/bin/hyprlock";
in { in {
enable = true; enable = true;
systemdTarget = "hyprland-session.target"; systemdTarget = "hyprland-session.target";
events = [ events = [
{ event = "before-sleep"; command = "${swaylock} -f -i $XDG_PICTURES_DIR/wallpapers/lockscreen.png"; } { event = "before-sleep"; command = hyprlock; }
{ event = "lock"; command = "${swaylock} -f -i $XDG_PICTURES_DIR/wallpapers/lockscreen.png"; } { event = "lock"; command = hyprlock; }
]; ];
}; };

View file

@ -0,0 +1,122 @@
@import "shared/colors.rasi"
configuration {
show-icons: false;
}
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 300px;
x-offset: 0px;
y-offset: 0px;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 15px;
border-color: @border;
cursor: "default";
background-color: @background;
}
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
background-color: transparent;
children: [ "inputbar", "message", "listview" ];
}
inputbar {
enabled: true;
spacing: 10px;
padding: 0px;
border: 0px;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
children: [ "textbox-prompt-colon", "prompt"];
}
textbox-prompt-colon {
enabled: true;
expand: false;
str: "";
padding: 10px 14px;
border-radius: 0px;
background-color: var(urgent);
text-color: @background;
}
prompt {
enabled: true;
padding: 10px;
border-radius: 0px;
background-color: var(active);
text-color: @background;
}
message {
enabled: true;
margin: 0px;
padding: 10px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: @background-alt;
text-color: @foreground;
}
textbox {
background-color: inherit;
text-color: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
listview {
enabled: true;
columns: 6;
lines: 1;
cycle: true;
scrollbar: false;
layout: vertical;
spacing: 10px;
background-color: transparent;
cursor: "default";
}
element {
enabled: true;
padding: 2px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
cursor: pointer;
}
element-text {
font: "feather 20";
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
element normal.normal,
element alternate.normal {
background-color: var(background-alt);
text-color: var(foreground);
}
element normal.urgent,
element alternate.urgent,
element selected.active {
background-color: var(urgent);
text-color: var(background);
}
element normal.active,
element alternate.active,
element selected.urgent {
background-color: var(active);
text-color: var(background);
}
element selected.normal {
background-color: var(selected);
text-color: var(background);
}

View file

@ -1,8 +1,4 @@
/** @import "shared/colors.rasi"
* Copyright (C) 2020-2023 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Configuration -----*****/
configuration { configuration {
modi: "drun,run,filebrowser"; modi: "drun,run,filebrowser";
show-icons: true; show-icons: true;
@ -11,11 +7,6 @@ configuration {
display-filebrowser: ""; display-filebrowser: "";
drun-display-format: "{name}"; drun-display-format: "{name}";
} }
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
/*****----- Main Window -----*****/
window { window {
/* properties for window widget */ /* properties for window widget */
transparency: "real"; transparency: "real";
@ -36,8 +27,6 @@ window {
cursor: "default"; cursor: "default";
background-color: @background; background-color: @background;
} }
/*****----- Main Box -----*****/
mainbox { mainbox {
enabled: true; enabled: true;
spacing: 10px; spacing: 10px;
@ -46,8 +35,6 @@ mainbox {
background-color: transparent; background-color: transparent;
children: [ "inputbar", "message", "listview", "mode-switcher" ]; children: [ "inputbar", "message", "listview", "mode-switcher" ];
} }
/*****----- Inputbar -----*****/
inputbar { inputbar {
enabled: true; enabled: true;
spacing: 10px; spacing: 10px;
@ -58,7 +45,6 @@ inputbar {
text-color: @foreground; text-color: @foreground;
children: [ "textbox-prompt-colon", "entry" ]; children: [ "textbox-prompt-colon", "entry" ];
} }
prompt { prompt {
enabled: true; enabled: true;
background-color: inherit; background-color: inherit;
@ -81,8 +67,6 @@ entry {
placeholder: "Search..."; placeholder: "Search...";
placeholder-color: inherit; placeholder-color: inherit;
} }
/*****----- Listview -----*****/
listview { listview {
enabled: true; enabled: true;
columns: 2; columns: 2;
@ -106,8 +90,6 @@ scrollbar {
border-radius: 10px; border-radius: 10px;
background-color: @background-alt; background-color: @background-alt;
} }
/*****----- Elements -----*****/
element { element {
enabled: true; enabled: true;
spacing: 10px; spacing: 10px;
@ -153,8 +135,6 @@ element-text {
vertical-align: 0.5; vertical-align: 0.5;
horizontal-align: 0.0; horizontal-align: 0.0;
} }
/*****----- Mode Switcher -----*****/
mode-switcher{ mode-switcher{
enabled: true; enabled: true;
spacing: 10px; spacing: 10px;
@ -174,8 +154,6 @@ button selected {
background-color: var(urgent); background-color: var(urgent);
text-color: var(background); text-color: var(background);
} }
/*****----- Message -----*****/
message { message {
enabled: true; enabled: true;
margin: 0px; margin: 0px;

View file

@ -0,0 +1,122 @@
@import "shared/colors.rasi"
configuration {
show-icons: false;
}
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 510px;
x-offset: 0px;
y-offset: 0px;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 15px;
border-color: @border;
cursor: "default";
background-color: @background;
}
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
background-color: transparent;
children: [ "inputbar", "message", "listview" ];
}
inputbar {
enabled: true;
spacing: 10px;
padding: 0px;
border: 0px;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
children: [ "textbox-prompt-colon", "prompt"];
}
textbox-prompt-colon {
enabled: true;
expand: false;
str: "";
padding: 10px 14px;
border-radius: 0px;
background-color: var(urgent);
text-color: @background;
}
prompt {
enabled: true;
padding: 10px;
border-radius: 0px;
background-color: var(active);
text-color: @background;
}
message {
enabled: true;
margin: 0px;
padding: 10px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: @background-alt;
text-color: @foreground;
}
textbox {
background-color: inherit;
text-color: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
listview {
enabled: true;
columns: 6;
lines: 1;
cycle: true;
scrollbar: false;
layout: vertical;
spacing: 10px;
background-color: transparent;
cursor: "default";
}
element {
enabled: true;
padding: 15px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
text-color: @foreground;
cursor: pointer;
}
element-text {
font: "feather 20";
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
element normal.normal,
element alternate.normal {
background-color: var(background-alt);
text-color: var(foreground);
}
element normal.urgent,
element alternate.urgent,
element selected.active {
background-color: var(urgent);
text-color: var(background);
}
element normal.active,
element alternate.active,
element selected.urgent {
background-color: var(active);
text-color: var(background);
}
element selected.normal {
background-color: var(selected);
text-color: var(background);
}

View file

@ -1,8 +1,4 @@
/** @import "shared/colors.rasi"
* Copyright (C) 2020-2023 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Configuration -----*****/
configuration { configuration {
modi: "run"; modi: "run";
show-icons: true; show-icons: true;
@ -11,11 +7,6 @@ configuration {
display-filebrowser: ""; display-filebrowser: "";
drun-display-format: "{name}"; drun-display-format: "{name}";
} }
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
/*****----- Main Window -----*****/
window { window {
/* properties for window widget */ /* properties for window widget */
transparency: "real"; transparency: "real";
@ -36,8 +27,6 @@ window {
cursor: "default"; cursor: "default";
background-color: @background; background-color: @background;
} }
/*****----- Main Box -----*****/
mainbox { mainbox {
enabled: true; enabled: true;
spacing: 10px; spacing: 10px;
@ -46,8 +35,6 @@ mainbox {
background-color: transparent; background-color: transparent;
children: [ "inputbar", "listview" ]; children: [ "inputbar", "listview" ];
} }
/*****----- Inputbar -----*****/
inputbar { inputbar {
enabled: true; enabled: true;
spacing: 10px; spacing: 10px;
@ -58,7 +45,6 @@ inputbar {
text-color: @foreground; text-color: @foreground;
children: [ "textbox-prompt-colon", "entry" ]; children: [ "textbox-prompt-colon", "entry" ];
} }
prompt { prompt {
enabled: true; enabled: true;
background-color: inherit; background-color: inherit;
@ -81,8 +67,6 @@ entry {
placeholder: "Run..."; placeholder: "Run...";
placeholder-color: inherit; placeholder-color: inherit;
} }
/*****----- Listview -----*****/
listview { listview {
enabled: true; enabled: true;
columns: 2; columns: 2;
@ -106,8 +90,6 @@ scrollbar {
border-radius: 10px; border-radius: 10px;
background-color: @background-alt; background-color: @background-alt;
} }
/*****----- Elements -----*****/
element { element {
enabled: true; enabled: true;
spacing: 10px; spacing: 10px;
@ -153,8 +135,6 @@ element-text {
vertical-align: 0.5; vertical-align: 0.5;
horizontal-align: 0.0; horizontal-align: 0.0;
} }
/*****----- Mode Switcher -----*****/
mode-switcher{ mode-switcher{
enabled: true; enabled: true;
spacing: 10px; spacing: 10px;
@ -174,8 +154,6 @@ button selected {
background-color: var(urgent); background-color: var(urgent);
text-color: var(background); text-color: var(background);
} }
/*****----- Message -----*****/
message { message {
enabled: true; enabled: true;
margin: 0px; margin: 0px;

View file

@ -1,20 +1,7 @@
/** @import "shared/colors.rasi"
* Copyright (C) 2020-2023 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Configuration -----*****/
configuration { configuration {
show-icons: false; show-icons: false;
} }
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
/*
USE_ICON=YES
*/
/*****----- Main Window -----*****/
window { window {
transparency: "real"; transparency: "real";
location: center; location: center;
@ -31,8 +18,6 @@ window {
cursor: "default"; cursor: "default";
background-color: @background; background-color: @background;
} }
/*****----- Main Box -----*****/
mainbox { mainbox {
enabled: true; enabled: true;
spacing: 10px; spacing: 10px;
@ -41,8 +26,6 @@ mainbox {
background-color: transparent; background-color: transparent;
children: [ "inputbar", "message", "listview" ]; children: [ "inputbar", "message", "listview" ];
} }
/*****----- Inputbar -----*****/
inputbar { inputbar {
enabled: true; enabled: true;
spacing: 10px; spacing: 10px;
@ -54,7 +37,6 @@ inputbar {
text-color: @foreground; text-color: @foreground;
children: [ "textbox-prompt-colon", "prompt"]; children: [ "textbox-prompt-colon", "prompt"];
} }
textbox-prompt-colon { textbox-prompt-colon {
enabled: true; enabled: true;
expand: false; expand: false;
@ -71,8 +53,6 @@ prompt {
background-color: var(active); background-color: var(active);
text-color: @background; text-color: @background;
} }
/*****----- Message -----*****/
message { message {
enabled: true; enabled: true;
margin: 0px; margin: 0px;
@ -89,8 +69,6 @@ textbox {
vertical-align: 0.5; vertical-align: 0.5;
horizontal-align: 0.0; horizontal-align: 0.0;
} }
/*****----- Listview -----*****/
listview { listview {
enabled: true; enabled: true;
columns: 6; columns: 6;
@ -103,8 +81,6 @@ listview {
background-color: transparent; background-color: transparent;
cursor: "default"; cursor: "default";
} }
/*****----- Elements -----*****/
element { element {
enabled: true; enabled: true;
padding: 15px; padding: 15px;
@ -123,7 +99,6 @@ element-text {
vertical-align: 0.5; vertical-align: 0.5;
horizontal-align: 0.5; horizontal-align: 0.5;
} }
element normal.normal, element normal.normal,
element alternate.normal { element alternate.normal {
background-color: var(background-alt); background-color: var(background-alt);

View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
color=$(grim -g "$(slurp -b 20262C00 -p)" -t ppm - | convert - -format '%[pixel:p{0,0}]' txt:- | tail -n1 | cut -d' ' -f4)
image=/tmp/${color}.png
main() {
if [[ "$color" ]]; then
# copy color code to clipboard
echo "$color" | tr -d "\n" | wl-copy
# generate preview
convert -size 48x48 xc:"$color" "${image}"
# notify about it
notify-send -h string:x-canonical-private-synchronous:sys-notify-picker -u low -i "${image}" "$color, copied to clipboard."
fi
}
main

View file

@ -0,0 +1,97 @@
#!/usr/bin/env bash
# Import Current Theme
DIR="$HOME/.config/hypr"
RASI="$DIR/rofi/powermenu.rasi"
CNFR="$DIR/rofi/confirm.rasi"
# Theme Elements
prompt="$(hostname) ($XDG_CURRENT_DESKTOP)"
mesg="Uptime : $(uptime -p | sed -E -e 's/up //g' -e 's/week|weeks/w/g' -e 's/day|days/d/g' -e 's/hour|hours/h/g' -e 's/minute|minutes/m/g')"
# Options
option_1=""
option_2="☀"
option_3=""
option_4=""
option_5="↺"
option_6=""
yes=''
no=''
# Rofi CMD
rofi_cmd() {
rofi -dmenu \
-p "$prompt" \
-mesg "$mesg" \
-markup-rows \
-theme "${RASI}"
}
# Pass variables to rofi dmenu
run_rofi() {
echo -e "$option_1\n$option_2\n$option_3\n$option_4\n$option_5\n$option_6" | rofi_cmd
}
# Confirmation CMD
confirm_cmd() {
rofi -dmenu \
-p 'Confirmation' \
-mesg 'Are you Sure?' \
-theme "${CNFR}"
}
# Ask for confirmation
confirm_exit() {
echo -e "$yes\n$no" | confirm_cmd
}
# Confirm and execute
confirm_run () {
selected="$(confirm_exit)"
if [[ "$selected" == "$yes" ]]; then
${1} && ${2} && ${3} && ${4}
else
exit
fi
}
# Execute Command
run_cmd() {
if [[ "$1" == '--opt1' ]]; then
hyprlock
elif [[ "$1" == '--opt2' ]]; then
confirm_run 'hyprctl dispatch exit 0'
elif [[ "$1" == '--opt3' ]]; then
confirm_run 'pulsemixer --mute' 'hyprlock' 'systemctl suspend' #"$DIR/scripts/lockscreen"
elif [[ "$1" == '--opt4' ]]; then
confirm_run 'systemctl hibernate'
elif [[ "$1" == '--opt5' ]]; then
confirm_run 'systemctl reboot'
elif [[ "$1" == '--opt6' ]]; then
confirm_run 'systemctl poweroff'
fi
}
# Actions
chosen="$(run_rofi)"
case ${chosen} in
"$option_1")
run_cmd --opt1
;;
"$option_2")
run_cmd --opt2
;;
"$option_3")
run_cmd --opt3
;;
"$option_4")
run_cmd --opt4
;;
"$option_5")
run_cmd --opt5
;;
"$option_6")
run_cmd --opt6
;;
esac

View file

@ -6,10 +6,10 @@ RASI="$DIR/screenshot.rasi"
# Theme Elements # Theme Elements
prompt='Screenshot' prompt='Screenshot'
mesg="Directory :: `xdg-user-dir PICTURES`/screenshots" mesg="Directory :: $(xdg-user-dir PICTURES)/screenshots"
# Options # Options
layout=`cat ${RASI} | grep 'USE_ICON' | cut -d'=' -f2` layout=$(< "${RASI}" grep 'USE_ICON' | cut -d'=' -f2)
if [[ "$layout" == 'NO' ]]; then if [[ "$layout" == 'NO' ]]; then
option_1=" Capture Desktop" option_1=" Capture Desktop"
option_2=" Capture Area" option_2=" Capture Area"
@ -30,7 +30,7 @@ rofi_cmd() {
-p "$prompt" \ -p "$prompt" \
-mesg "$mesg" \ -mesg "$mesg" \
-markup-rows \ -markup-rows \
-theme ${RASI} -theme "${RASI}"
} }
# Pass variables to rofi dmenu # Pass variables to rofi dmenu
@ -39,9 +39,9 @@ run_rofi() {
} }
# Screenshot # Screenshot
time=`date +%Y-%m-%d-%H-%M-%S` time=$(date +%Y-%m-%d-%H-%M-%S)
dir="`xdg-user-dir PICTURES`/screenshots" dir="$(xdg-user-dir PICTURES)/screenshots"
file="${time}_${geometry}.png" file="${time}.png"
# Directory # Directory
if [[ ! -d "$dir" ]]; then if [[ ! -d "$dir" ]]; then
@ -49,7 +49,7 @@ if [[ ! -d "$dir" ]]; then
fi fi
# notify and view screenshot # notify and view screenshot
iDIR="$HOME/.config/hypr/mako/icons" iDIR="$HOME/.config/hypr/mako-icons"
notify_view() { notify_view() {
notify_cmd_shot="notify-send -h string:x-canonical-private-synchronous:sys-notify-shot -u low -i ${iDIR}/picture.png" notify_cmd_shot="notify-send -h string:x-canonical-private-synchronous:sys-notify-shot -u low -i ${iDIR}/picture.png"
${notify_cmd_shot} "Copied to clipboard." ${notify_cmd_shot} "Copied to clipboard."
@ -64,7 +64,7 @@ notify_view() {
# countdown # countdown
countdown () { countdown () {
for sec in `seq $1 -1 1`; do for sec in $(seq "$1" -1 1); do
notify-send -h string:x-canonical-private-synchronous:sys-notify-count -t 1000 -i "$iDIR"/timer.png "Taking shot in : $sec" notify-send -h string:x-canonical-private-synchronous:sys-notify-count -t 1000 -i "$iDIR"/timer.png "Taking shot in : $sec"
sleep 1 sleep 1
done done
@ -72,31 +72,31 @@ countdown () {
# take shots # take shots
shotnow () { shotnow () {
cd ${dir} && sleep 0.5 && grim - | tee "$file" | wl-copy cd "${dir}" && sleep 0.5 && grim - | tee "$file" | wl-copy
notify_view notify_view
} }
shot5 () { shot5 () {
countdown '5' countdown '5'
sleep 1 && cd ${dir} && grim - | tee "$file" | wl-copy sleep 1 && cd "${dir}" && grim - | tee "$file" | wl-copy
notify_view notify_view
} }
shot10 () { shot10 () {
countdown '10' countdown '10'
sleep 1 && cd ${dir} && grim - | tee "$file" | wl-copy sleep 1 && cd "${dir}" && grim - | tee "$file" | wl-copy
notify_view notify_view
} }
shotwin () { shotwin () {
w_pos=`hyprctl activewindow | grep 'at:' | cut -d':' -f2 | tr -d ' ' | tail -n1` w_pos=$(hyprctl activewindow | grep 'at:' | cut -d':' -f2 | tr -d ' ' | tail -n1)
w_size=`hyprctl activewindow | grep 'size:' | cut -d':' -f2 | tr -d ' ' | tail -n1 | sed s/,/x/g` w_size=$(hyprctl activewindow | grep 'size:' | cut -d':' -f2 | tr -d ' ' | tail -n1 | sed s/,/x/g)
cd ${dir} && sleep 0.3 && grim -g "$w_pos $w_size" - | tee "$file" | wl-copy cd "${dir}" && sleep 0.3 && grim -g "$w_pos $w_size" - | tee "$file" | wl-copy
notify_view notify_view
} }
shotarea () { shotarea () {
cd ${dir} && grim -g "$(slurp -b 20262CCC -c B4A1DBff -s B4A1DB0D -w 2 && sleep 0.3)" - | tee "$file" | wl-copy cd "${dir}" && grim -g "$(slurp -b 20262CCC -c B4A1DBff -s B4A1DB0D -w 2 && sleep 0.3)" - | tee "$file" | wl-copy
notify_view notify_view
} }
@ -118,19 +118,19 @@ run_cmd() {
# Actions # Actions
chosen="$(run_rofi)" chosen="$(run_rofi)"
case ${chosen} in case ${chosen} in
$option_1) "$option_1")
run_cmd --opt1 run_cmd --opt1
;; ;;
$option_2) "$option_2")
run_cmd --opt2 run_cmd --opt2
;; ;;
$option_3) "$option_3")
run_cmd --opt3 run_cmd --opt3
;; ;;
$option_4) "$option_4")
run_cmd --opt4 run_cmd --opt4
;; ;;
$option_5) "$option_5")
run_cmd --opt5 run_cmd --opt5
;; ;;
esac esac

View file

@ -0,0 +1,78 @@
#!/usr/bin/env bash
iDIR="$HOME/.config/hypr/mako-icons"
time=$(date +%Y-%m-%d-%H-%M-%S)
dir="$(xdg-user-dir PICTURES)/screenshots"
file="${time}.png"
# notify and view screenshot
notify_cmd_shot="notify-send -h string:x-canonical-private-synchronous:sys-notify-shot -u low -i ${iDIR}/picture.png"
notify_view () {
${notify_cmd_shot} "Copied to clipboard."
paplay /usr/share/sounds/freedesktop/stereo/screen-capture.oga &>/dev/null &
imv "${dir}/$file"
if [[ -e "$dir/$file" ]]; then
${notify_cmd_shot} "Screenshot Saved."
else
${notify_cmd_shot} "Screenshot Deleted."
fi
}
# countdown
countdown () {
for sec in $(seq "$1" -1 1); do
notify-send -h string:x-canonical-private-synchronous:sys-notify-count -t 1000 -i "$iDIR"/timer.png "Taking shot in : $sec"
sleep 1
done
}
# take shots
shotnow () {
cd "${dir}" && sleep 0.5 && grim - | tee "$file" | wl-copy
notify_view
}
shot5 () {
countdown '5'
sleep 1 && cd "${dir}" && grim - | tee "$file" | wl-copy
notify_view
}
shot10 () {
countdown '10'
sleep 1 && cd "${dir}" && grim - | tee "$file" | wl-copy
notify_view
}
shotwin () {
w_pos=$(hyprctl activewindow | grep 'at:' | cut -d':' -f2 | tr -d ' ' | tail -n1)
w_size=$(hyprctl activewindow | grep 'size:' | cut -d':' -f2 | tr -d ' ' | tail -n1 | sed s/,/x/g)
cd "${dir}" && grim -g "$w_pos $w_size" - | tee "$file" | wl-copy
notify_view
}
shotarea () {
cd "${dir}" && grim -g "$(slurp -b 20262CCC -c B4A1DBff -s B4A1DB0D -w 2 && sleep 0.3)" - | tee "$file" | wl-copy
notify_view
}
if [[ ! -d "$dir" ]]; then
mkdir -p "$dir"
fi
if [[ "$1" == "--now" ]]; then
shotnow
elif [[ "$1" == "--in5" ]]; then
shot5
elif [[ "$1" == "--in10" ]]; then
shot10
elif [[ "$1" == "--win" ]]; then
shotwin
elif [[ "$1" == "--area" ]]; then
shotarea
else
echo -e "Available Options : --now --in5 --in10 --win --area"
fi
exit 0

View file

@ -1,87 +0,0 @@
{ pkgs, inputs, ... }: {
imports = [
inputs.home-manager.nixosModules.home-manager
];
home-manager.users.emily.home.file.".local/bin/hypr/colorpicker.sh" = {
enable = true;
executable = true;
text = ''
#!/${pkgs.bash}/bin/bash
color=$(${pkgs.grim}/bin/grim -g "`${pkgs.slurp}/bin/slurp -b 20262C00 -p`" -t ppm - | \
${pkgs.imagemagick_light}/bin/convert - -format '%[pixel:p{0,0}]' txt:- | \
${pkgs.coreutils}/bin/tail -n1 | ${pkgs.coreutils}/bin/cut -d' ' -f4)
image=/tmp/''${color}.png
main() {
if [[ "$color" ]]; then
${pkgs.coreutils}/bin/echo $color | ${pkgs.coreutils}/bin/tr -d "\n" | ${pkgs.wl-clipboard}/bin/wl-copy
${pkgs.imagemagick_light}/bin/convert -size 48x48 xc:"$color" ''${image}
${pkgs.libnotify}/bin/notify-send -h string:x-canonical-private-synchronous:sys-notify-picker -u low -i ''${image} "$color, copied to clipboard."
fi
}
main
'';
};
home-manager.users.emily.home.file.".local/bin/hypr/screenshot.sh" = let
cu = "${pkgs.coreutils}/bin";
grim = "${pkgs.grim}/bin/grim";
notify-send = "${pkgs.libnotify}/bin/notify-send";
paplay = "${pkgs.pulseaudio}/bin/paplay";
slurp = "${pkgs.slurp}/bin/slurp";
imv = "${pkgs.imv}/bin/imv";
wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
in {
enable = true;
executable = true;
text = ''
#!/${pkgs.bash}/bin/bash
iDIR="$HOME/.config/mako-icons"
time=`${cu}/date +%Y-%m-%d-%H-%M-%S`
dir="$HOME/Pictures/screenshots"
file="''${time}.png"
notify_cmd_shot="${notify-send} -h string:x-canonical-private-synchronous:sys-notify-shot -u low -i ''${iDIR}/picture.png"
notify_view () {
''${notify_cmd_shot} "Copied to clipboard."
${paplay} /usr/share/sounds/freedesktop/stereo/screen-capture.oga &>/dev/null &
${imv} "''${dir}/$file"
if [[ -e "$dir/$file" ]]; then
''${notify_cmd_shot} "Screenshot Saved."
else
''${notify_cmd_shot} "Screenshot Deleted."
fi
}
countdown () {
for sec in `${cu}/seq $1 -1 1`; do
${notify-send} -h string:x-canonical-private-synchronous:sys-notify-count -t 1000 -i "$iDIR"/timer.png "Taking shot in : $sec"
${cu}/sleep 1
done
}
shotnow () {
cd ''${dir} && ${cu}/sleep 0.5 && ${grim} - | ${cu}/tee "$file" | ${wl-copy}
notify_view
}
shotarea () {
cd ''${dir} && ${grim} -g "$(${slurp} -b 20262CCC -c B4A1DBff -s B4A1DB0D -w 2 && ${cu}/sleep 0.3)" - | ${cu}/tee "$file" | ${wl-copy}
notify_view
}
if [[ ! -d "$dir" ]]; then
${cu}/mkdir -p "$dir"
fi
if [[ "$1" == "--now" ]]; then
shotnow
elif [[ "$1" == "--in5" ]]; then
countdown '5'
shotnow
elif [[ "$1" == "--in10" ]]; then
countdown '10'
shotnow
elif [[ "$1" == "--area" ]]; then
shotarea
else
echo -e "Available Options : --now --in5 --in10 --area"
fi
exit 0
'';
};
}

View file

@ -97,5 +97,4 @@ gitin checkout main
gitin merge --ff-only "${BRANCH}" gitin merge --ff-only "${BRANCH}"
gitin push origin main gitin push origin main
pkill ssh-agent
echo "Update successful" echo "Update successful"