added homemanager

This commit is contained in:
emily 2024-02-05 22:22:40 +01:00
parent 0605d4774f
commit af17bf6993
Signed by: emily
GPG key ID: F6F4C66207FCF995
44 changed files with 2250 additions and 47 deletions

View file

@ -13,3 +13,15 @@ $ colmena apply --on @production
```console
$ colmena apply --on @router
```
## Structure
```
nixfiles
├── config # NixOS configuration
│   ├── common # configuration applyed to all hosts (some settings might be influenced by machine-type)
│   │   └── users # user configuration
│   ├── hosts # configuration for specific hosts
│   ├── profiles # configuariotn for specific machine types
│   └── services # common service configuration
└── modules # NixOS modules
```

View file

@ -23,13 +23,16 @@ with lib; {
zip
figlet
];
programs = {
mtr.enable = true;
fish.enable = true;
};
deployment.tags = [ "all" ];
deployment.targetHost = mkDefault config.networking.fqdn;
deployment.targetPort = mkDefault 22;
deployment.targetUser = mkDefault null;
nix.settings.trusted-users = [ "root" "@wheel" ];
security.dhparams.defaultBitSize = 4096;
system.activationScripts.motd.text = let
@ -51,11 +54,23 @@ with lib; {
nix.gc.automatic = true;
nix.gc.options = "--delete-older-than 7d";
nix.optimise.automatic = true;
services.journald.extraConfig = "SystemMaxUse=256M";
boot.tmp.cleanOnBoot = = mkDefault true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.trusted-users = [ "@wheel" ];
nixpkgs.hostPlatform.system = "x86_64-linux";
boot.tmp.cleanOnBoot = = mkDefault true;
services.journald.extraConfig = "SystemMaxUse=256M";
security.sudo.enable = false;
security.sudo-rs = {
enable = true;
execWheelOnly = true;
};
users.mutableUsers = false;
services.fprintd.enable = config.kyouma.machine-type.graphical;
system.stateVersion = "23.11";
time.timeZone = mkDefault "CET";
}

View file

@ -1,10 +1,54 @@
{ config, pkgs, ... }: {
{ config, pkgs, lib, inputs, ... }: {
imports = [
inputs.home-manager.nixosModules.home-manager
];
users.users.emily = {
isNormalUser = true;
shell = pkgs.bash;
shell = pkgs.fish;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA/+iN407+HsfHbbC3tfdA8Yf4TZ08qXQMb4tb/SDAs+ emily@card"
];
};
home-manager.useGlobalPkgs = true;
home-manager.users.emily = {
home.stateVersion = "23.11";
home.packages = with pkgs; [
whois
restic
] ++ lib.optionals config.kyouma.machine-type.graphical [
thunderbird
obsidian
krita
spotify
cider
pavucontrol
signal-desktop
schildichat-desktop-wayland
image-roll
wl-clipboard
libnotify
slurp
grim
imagemagick_light
jetbrains-mono
];
programs.bat.enable = true;
programs.gpg.enable = true;
programs.ripgrep.enable = true;
programs.yt-dl.enable = true;
programs.git = {
enable = true;
signing.key = "B04F01A7A98A13020C39B4A68AB7B773A214ACE5";
signing.signByDefault = true;
userName = "emily";
userEmail = "ek@kyouma.net";
};
};
}

View file

@ -1,11 +1,11 @@
{ config, pkgs, ... }: {
imports = [
./nginx.nix
../../common
../../common-dus.nix
../../common-lxc.nix
../../common-nginx.nix
../../common-headless.nix
../../profiles/headless.nix
../../profiles/kartoffel.nix
../../profiles/lxc.nix
../../services/nginx.nix
./nginx.nix
];
networking = {
hostName = "crime";

View file

@ -1,8 +1,6 @@
{ config, pkgs, lib, ... }:
let
landingPage = pkgs.writeTextFile {
name = "index.html";
text = ''
landingPage = pkgs.writeTextDir "index.html" ''
<!DOCTYPE html>
<html>
<head>
@ -31,8 +29,6 @@ let
</body>
</html>
'';
destination = "/index.html";
};
extraConfig = ''
add_header Strict-Transport-Security $hsts_header;
add_header X-Content-Type-Options "nosniff" always;

View file

@ -1,10 +1,9 @@
{ config, lib, ... }: {
imports = [
../../common
../../common-headless.nix
../../profiles/headless.nix
];
kyouma.machine-type.physical = true;
kyouma.machine-type.headless = true;
systemd.network.networks."98-eth-static" = {
matchConfig.Type = "ether";

View file

@ -0,0 +1,6 @@
{ ... }: {
imports = [
../../common
../../profiles/graphical
];
}

View file

@ -13,10 +13,10 @@ in {
inputs.fernglas.nixosModules.default
inputs.kyouma-www.nixosModules.default
../../common
../../common-lxc.nix
../../common-dus.nix
../../common-nginx.nix
../../common-headless.nix
../../profiles/headless.nix
../../profiles/kartoffel.nix
../../profiles/lxc.nix
../../services/nginx.nix
];
networking = {
hostName = "web-dus";

View file

@ -0,0 +1,557 @@
{ config, pkgs, lib, inputs, ... }: {
imports = [
inputs.home-manager.nixosModules.home-manager
];
kyouma.machine-type.graphical = true;
services.geoclue2.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
};
environment.variables = {
SDL_VIDEODRIVER = "wayland";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
GDK_BACKEND = "wayland,x11";
MOZ_ENABLE_WAYLAND = "1";
CLUTTER_BACKEND = "wayland";
};
xdg.portal.wlr.enable = true;
home-manager.users.emily = {
home.keyboard = {
layout = "de";
variant = "neo_qwerty";
};
home.file.".local/bin/hypr/playerctl.sh" = let
playerctl = "${pkgs.playerctl}/bin/playerctl";
title = "$(${playerctl} metadata --format '{{markup_escape(title)}}')";
artist = "$(${playerctl} metadata --format '{{markup_escape(artist)}}')";
status = "$(${playerctl} status 2> /dev/null)";
in {
enable = true;
executable = true;
text = ''
#!${pkgs.bash}/bin/bash
if [ "${status}" = "Playing" ]; then
echo -e " ${title}\nPlaying: ${artist} - ${title}\nplaying"
elif [ "${status}" = "Paused" ]; then
echo -e " ${title}\nPaused: ${artist} - ${title}\npaused"
else
echo -e ""
fi
'';
};
home.file.".local/bin/hypr" = {
enable = true;
executable = true;
recursive = true;
source = ./files/scripts;
};
home.file.".config/mako-icons/" = {
enable = true;
recursive = true;
source = ./files/icons;
};
home.file.".config/rofi" = {
enable = true;
recursive = true;
source = .files/rofi;
};
wayland.windowManager.hyprland = {
enable = true;
settings = let
kitty = "${pkgs.kitty}/bin/kitty";
pactl = "${pkgs.pulseaudio}/bin/pactl";
playerctl = "${pkgs.playerctl}/bin/playerctl";
notifysend = "${pkgs.libnotify}/bin/notify-send";
swaylock = "${pkgs.swaylock}/bin/swaylock";
dolphin = "${pkgs.libsForQt5.dolphin}/bin/dolphin";
firefox = "${pkgs.firefox}/bin/firefox";
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
screenshot = "~/.local/bin/hypr/screenshot.sh";
rofi = "${pkgs.rofi-wayland}/bin/rofi";
in {
general = {
border_size = 1;
gaps_in = 4;
gaps_out = 8;
"col.active_border" = "0xFFB4A1DB 0xFFD04E9D 45deg";
"col.inactive_border" = "1e2030 1e2030 45deg";
cursor_inactive_timeout = 30;
layout = "dwindle";
};
decoration = {
rounding = 8;
shadow_range = 10;
"col.shadow" = "0x66000000";
"col.shadow_inactive" = "0x66000000";
blur = {
enabled = true;
passes = 2;
};
};
animations = {
bezier = [
"wind, 0.05, 0.9, 0.1, 1.05"
"winMov, 0.05, 0.9, 0.1, 1.1"
"winIn, 0.1, 1.1, 0.1, 1.1"
"winOut, 0.3, -0.3, 0, 1"
"liner, 1, 1, 1, 1"
];
animation = [
"windows, 1, 6, wind, slide"
"windowsIn, 1, 8, winIn, slide"
"windowsOut, 1, 5, winOut, slide"
"windowsMove, 1, 6, winMov, slide"
"border, 1, 1, liner"
"borderangle, 1, 30, liner, loop"
"fade, 1, 10, default"
"workspaces, 1, 8, wind"
];
};
input = {
kb_layout = "de";
kb_variant = "neo_qwerty";
kb_options = "grp:alt_shift_toggle";
accel_profile = "adaptive";
scroll_method = "2fg";
float_switch_override_focus = 2;
touchpad = {
natural_scroll = true;
scroll_factor = 0;
tap-to-click = false;
drag_lock = true;
};
};
gestures = {
workspace_swipe = true;
workspace_swipe_min_speed_to_force = 15;
workspace_swipe_cancel_ratio = 0.3;
workspace_swipe_forever = true;
};
group = {
"col.border_inactive" = "0xFFDB695B";
"col.border_active" = "0xFF4BC66D";
groupbar = {
render_titles = false;
};
};
misc = {
disable_hyprland_logo = true;
vrr = 1;
};
xwayland = {
use_nearest_neighbor = false;
force_zero_scaling = true;
};
"device:syna8013:00-06cb:ce69-touchpad" = {
sensitivity = 0.3;
};
"device:logitech-m705" = {
sensitivity = 0.1;
accel_profile = "flat";
};
"device:tpps/2-ibm-trackpoint" = {
sensitivity = 0.2;
scroll_method = "on_button_down";
accel_profile = "flat";
};
"device:tpps/2-elan-trackpoint" = {
sensitivity = 0;
scroll_method = "on_button_down";
accel_profile = "flat";
};
"device:tpps/2-elan-trackpoint" = {
sensitivity = 0;
scroll_method = "on_button_down";
accel_profile = "flat";
};
monitor = [
"eDP-1, 3840x2400@60, 0x0, 1, bitdepth, 10"
"eDP-1, addreserved,-8,0,0,0"
"desc:ASUSTek COMPUTER INC ASUS VA24E M7LMTF021529, 1920x1080@60, -320x-1080, 1"
"desc:ASUSTek COMPUTER INC ASUS VA24E M7LMTF021525, 1920x1080@60, 1600x-1080, 1"
",preferred,auto,1"
];
workspace = [
"1, monitor:eDP-1, default:true"
"2, monitor:eDP-1"
"3, monitor:eDP-1"
"8, monitor:DP-2"
"9, monitor:DP-3"
"10, monitor:eDP-1"
];
windowrule = [
"float, foot-float"
"float, yad|nm-connection-editor|pavucontrol"
"float, xfce-polkit|kvantummanager|qt5ct|zenity|waypaper"
"float, feh|com.github.weclaw1.ImageRoll|Gpicview|Gimp|MPlayer"
"float, VirtualBox Manager|qemu|Qemu-system-x86_64|PacketTracer"
"float, title:File Operation Progress|Open Files|Media viewer"
"float, title:Confirm to replace files"
"size 60% 64%, com.github.weclaw1.ImageRoll "
"center, com.github.weclaw1.ImageRoll"
"animation slide down,foot-full"
"animation slide up,Rofi"
];
"$mod" = "SUPER";
"$notifycmd" = "${notifysend} -h string:x-canonical-private-synchronous:hypr-cfg -u low";
bind = [
"$mod, Return, exec, ${kitty}"
"$mod, F1, exec, ${dolphin}"
"$mod, F2, exec, ${firefox}"
# Rofi
"$mod, D, exec, ${rofi} -show drun -theme ~/.config/rofi/launcher.rasi"
"$mod, R, exec, ${rofi} -show run -theme ~/.config/rofi/runner.rasi"
"$mod, X, exec, ~/.local/bin/hypr/rofi_powermenu.sh"
"$mod, A, exec, ~/.local/bin/hypr/rofi_screenshot.sh"
# Misc
"$mod, C, exec, ~/.local/bin/hypr/colorpicker.sh"
"CTRL_ALT, L, exec, ${swaylock} -f -i ~/Pictures/wallpapers/lockscreen.png"
# Function keys
", XF86MonBrightnessUp, exec, ${brightnessctl} s +10%"
", XF86MonBrightnessDown, exec, ${brightnessctl} s 10%-"
", XF86AudioRaiseVolume, exec, ${pactl} set-sink-volume @DEFAULT_SINK@ +2dB"
", XF86AudioLowerVolume, exec, ${pactl} set-sink-volume @DEFAULT_SINK@ -2dB"
", XF86AudioMute, exec, ${pactl} set-sink-mute @DEFAULT_SINK@ toggle"
", XF86AudioMicMute, exec, ${pactl} set-source-mute @DEFAULT_SOURCE@ toggle"
", XF86AudioNext, exec, ${playerctl} next"
", XF86AudioPrev, exec, ${playerctl} previous"
", XF86AudioPlay, exec, ${playerctl} play"
", XF86AudioStop, exec, ${playerctl} pause"
# Scratchpad
"$mod SHIFT, MINUS, movetoworkspace,special"
"$mod, MINUS, togglespecialworkspace,"
# Screenshots
", Print, exec, ${screenshot} --now"
"ALT, Print, exec, ${screenshot} --in5"
"SHIFT, Print, exec, ${screenshot} --in10"
"CTRL, Print, exec, ${screenshot} --win"
"$mod, Print, exec, ${screenshot} --area"
# Hyprland
"$mod SHIFT, Q, killactive,"
"CTRL_ALT, Delete, exit,"
"$mod, F, fullscreen, 0"
"$mod, F, exec, $notifycmd 'Fullscreen Mode'"
"$mod, S, pseudo,"
"$mod, S, exec, $notifycmd 'Pseudo Mode'"
"$mod SHIFT, Space, togglefloating,"
"$mod SHIFT, Space, centerwindow,"
# windowgroup
"$mod, G, togglegroup"
"$mod, G, exec, $notifycmd 'Toggled Group Mode'"
"$mod, H, changegroupactive, b"
"$mod, L, changegroupactive, f"
# Change Focusconfig
"$mod, left, movefocus, l"
"$mod, H, movefocus, l"
"$mod, right, movefocus, r"
"$mod, L, movefocus, r"
"$mod, up, movefocus, u"
"$mod, K, movefocus, u"
"$mod, down, movefocus, d"
"$mod, J, movefocus, d"
# Move Active
"$mod SHIFT, left, movewindow, l"
"$mod SHIFT, H, movewindow, l"
"$mod SHIFT, right, movewindow, r"
"$mod SHIFT, L, movewindow, r"
"$mod SHIFT, up, movewindow, u"
"$mod SHIFT, K, movewindow, u"
"$mod SHIFT, down, movewindow, d"
"$mod SHIFT, J, movewindow, d"
# Switch between windows
"$mod,Tab,cyclenext,"
"$mod,Tab,bringactivetotop,"
# Workspaces
"$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, 7, workspace, 7"
"$mod, 8, workspace, 8"
"$mod, 9, workspace, 9"
"$mod, 0, workspace, 10"
# Send to Workspaces
"$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 SHIFT, 7, movetoworkspace, 7"
"$mod SHIFT, 8, movetoworkspace, 8"
"$mod SHIFT, 9, movetoworkspace, 9"
"$mod SHIFT, 0, movetoworkspace, 10"
# Change Workspace Mode
"$mod CTRL, F, workspaceopt, allfloat"
"$mod CTRL, F, exec, $notifycmd 'Toggled All Float Mode'"
"$mod CTRL, S, workspaceopt, allpseudo"
"$mod CTRL, S, exec, $notifycmd 'Toggled All Pseudo Mode'"
# Misc
"$mod SHIFT, P, pin,"
"$mod SHIFT, P, exec, $notifycmd 'Toggled Pin'"
"$mod SHIFT, S, swapnext"
"$mod SHIFT, O, toggleopaque"
];
binde = [
# Resize Active
"$mod CTRL, left, resizeactive, -20 0"
"$mod CTRL, H, resizeactive, -20 0"
"$mod CTRL, right, resizeactive, 20 0"
"$mod CTRL, L, resizeactive, 20 0"
"$mod CTRL, up, resizeactive, 0 -20"
"$mod CTRL, K, resizeactive, 0 -20"
"$mod CTRL, down, resizeactive, 0 20"
"$mod CTRL, J, resizeactive, 0 20"
# Move Active (Floating Only)
"$mod ALT, left, moveactive, -80 0"
"$mod ALT, H, moveactive, -80 0"
"$mod ALT, right, moveactive, 80 0"
"$mod ALT, L, moveactive, 80 0"
"$mod ALT, up, moveactive, 0 -80"
"$mod ALT, K, moveactive, 0 -80"
"$mod ALT, down, moveactive, 0 80"
"$mod ALT, J, moveactive, 0 80"
];
bindl = [
",switch:Lid Switch, exec, ${swaylock} -f -i ~/Pictures/wallpapers/lockscreen.png"
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
};
};
programs.imv.enable = true;
programs.wpaperd = {
enable = true;
settings.default = {
path = "/home/emily/Pictures/wallpapers/sylviaritter/";
duration = "60m";
sorting = "random";
};
};
programs.waybar = {
enable = true;
style = ./waybar-style.css;
systemd = {
enable = true;
target = "hyprland-session.target";
};
settings = {
hyprbar = {
layer = "top";
position = "top";
output = "eDP-1";
margin = "0 0 0 0";
modules-left = [ "hyprland/workspaces" "custom/playerctl" "tray" ];
modules-center = [ "clock" ];
modules-right = [ "backlight" "pulseaudio" "temperature" "cpu" "memory" "battery" "network" ];
"hyprland/workspaces" = {
format = "{icon}";
sort-by-number = true;
active-only = false;
on-click = "activate";
format-icons = {
"10" = "0";
urgent = "";
focused = "";
default = "";
};
};
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
};
};
tray = {
icon-size = 18;
spacing = 8;
};
clock = {
tooltip-format = "{:%A %d %B | %H:%M}";
format = " {:%Y-%m-%d %H:%M:%OS}";
format-alt = " {:%Y %b %d %a %H:%M:%OS}";
interval = 1;
};
cpu = {
format = " {usage:02}";
interval = 2;
on-click = "kitty -e htop";
};
memory = {
format = " {used:0.2f}";
on-click = "kitty -e htop";
};
temperature = {
hwmon-path = "/sys/class/hwmon/hwmon1/temp1_input";
critical-threshold = 80;
format = " {temperatureC}°C";
};
backlight = {
format = "{icon} {percent: >3}%";
format-icons = ["", ""];
on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl -c backlight set 1%-";
on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl -c backlight set +1%";
};
battery = {
states = {
good = 90;
warning = 30;
critical = 15;
};
format = "\uf1e6";
format-discharging = "{icon} {capacity: >3}% {power:0.1f}W";
format-charging = "\uf1e6 {capacity: >3}% {power:0.1f}W";
interval = 3;
format-icons = ["", "", "", "", ""];
};
network = {
format = " Disabled";
format-wifi = " {essid}";
format-ethernet = " Wired";
format-disconnected = " Disconnected";
on-click = "nm-connection-editor";
};
pulseaudio = {
scroll-step = 5;
format = "{icon} {volume: >3}%";
format-bluetooth = "{icon} {volume: >3}%";
format-muted = " muted";
format-icons = {
headphones = "";
handsfree = "";
headset = "";
phone = "";
portable = "";
car = "";
default = ["", ""];
};
on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
};
"custom/playerctl" = {
interval = 1;
exec = "~/.local/bin/hypr/playerctl.sh";
on-click-middle = "${pkgs.playerctl}/bin/playerctl play-pause";
on-click-right = "${pkgs.playerctl}/bin/playerctl next";
on-click = "${pkgs.playerctl}/bin/playerctl previous";
escape = true;
};
};
};
};
programs.kitty = {
enable = true;
font.size = "11";
font.name = "JetBrains Mono";
settings = {
enable_audio_bell = false;
scrollback_lines = 65536;
remember_window_size = false;
initial_window_width = 1200;
initial_window_height = 800;
bold_font = "auto";
italic_font = "auto";
bold_italic_font = "auto";
background = "#090312";
background_opacity = "0.7";
};
keybindings = {
"shift+right" = "next_tab";
"ctrl+l" = "next_tab";
"shift+left" = "previous_tab";
"ctrl+h" = "previous_tab";
};
};
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
};
services.gammastep = {
enable = true;
provider = "geoclue2";
temperature.day = "6500";
temperature.night = "3700";
settings.general.adjustment-method = "wayland";
};
services.mako = {
enable = true;
anchor = "top-right";
backgroundColor = "#24273a";
borderColor = "#c6a0f6";
borderRadius = 15;
borderSize = 2;
defaultTimeout = 5000;
layer = "overlay";
maxIconSize = 48;
padding = "15";
progressColor = "over #B4A1DB";
sort = "-time";
textColor = "#cad3f5";
extraConfig = ''
max-history=100
on-button-left=dismiss
on-button-right=dismiss-all
on-notify=exec ${pkgs.mpv}/bin/mpv /usr/share/sounds/freedesktop/stereo/message.oga
[urgency=low]
border-color=#B4A1DB
default-timeout=2000
[urgency=normal]
border-color=#B4A1DB
default-timeout=5000
[urgency=high]
border-color=#D04E9D
text-color=#D04E9D
default-timeout=0
[category=mpd]
border-color=#E49186
default-timeout=2000
group-by=category
'';
};
services.gpg-agent = {
enable = true;
enableSshSupport = true;
};
services.syncthing = {
enable = true;
tray.enable = true;
};
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View file

@ -0,0 +1,148 @@
/**
* Copyright (C) 2020-2023 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
@import "shared/fonts.rasi"
/*
USE_ICON=YES
*/
/*****----- Main Window -----*****/
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;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
background-color: transparent;
children: [ "inputbar", "message", "listview" ];
}
/*****----- Inputbar -----*****/
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 -----*****/
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 -----*****/
listview {
enabled: true;
columns: 6;
lines: 1;
cycle: true;
scrollbar: false;
layout: vertical;
spacing: 10px;
background-color: transparent;
cursor: "default";
}
/*****----- Elements -----*****/
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

@ -0,0 +1,202 @@
/**
* Copyright (C) 2020-2023 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Configuration -----*****/
configuration {
modi: "drun,run,filebrowser";
show-icons: true;
display-drun: "";
display-run: "";
display-filebrowser: "";
drun-display-format: "{name}";
}
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
@import "shared/fonts.rasi"
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 800px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 15px;
border-color: @border;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
background-color: transparent;
children: [ "inputbar", "message", "listview", "mode-switcher" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 10px;
border-radius: 0px;
background-color: @background-alt;
text-color: @foreground;
children: [ "textbox-prompt-colon", "entry" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 0px;
expand: false;
str: "";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "Search...";
placeholder-color: inherit;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 2;
lines: 7;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 5px;
background-color: transparent;
text-color: @foreground;
cursor: "default";
}
scrollbar {
handle-width: 5px ;
handle-color: @selected;
border-radius: 10px;
background-color: @background-alt;
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 6px;
border-radius: 0px;
background-color: transparent;
text-color: @foreground;
cursor: pointer;
}
element normal.normal,
element alternate.normal {
background-color: var(background);
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);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 24px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Mode Switcher -----*****/
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px 250px;
background-color: transparent;
text-color: @foreground;
}
button {
padding: 10px;
border-radius: 0px;
background-color: @background-alt;
text-color: inherit;
cursor: pointer;
}
button selected {
background-color: var(urgent);
text-color: var(background);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 10px;
border-radius: 0px;
background-color: @background-alt;
text-color: @foreground;
}
textbox {
background-color: transparent;
text-color: @foreground;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground;
blink: true;
markup: true;
}
error-message {
padding: 30px;
background-color: @background;
text-color: @foreground;
}

View file

@ -0,0 +1,141 @@
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
@import "shared/fonts.rasi"
/*****----- Main Window -----*****/
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;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
background-color: transparent;
children: [ "inputbar", "message", "listview" ];
}
/*****----- Inputbar -----*****/
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 -----*****/
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 -----*****/
listview {
enabled: true;
columns: 6;
lines: 1;
cycle: true;
scrollbar: false;
layout: vertical;
spacing: 10px;
background-color: transparent;
cursor: "default";
}
/*****----- Elements -----*****/
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

@ -0,0 +1,202 @@
/**
* Copyright (C) 2020-2023 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Configuration -----*****/
configuration {
modi: "run";
show-icons: true;
display-drun: "";
display-run: "";
display-filebrowser: "";
drun-display-format: "{name}";
}
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
@import "shared/fonts.rasi"
/*****----- Main Window -----*****/
window {
/* properties for window widget */
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 600px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 15px;
border-color: @border;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
background-color: transparent;
children: [ "inputbar", "listview" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 10px;
border-radius: 0px;
background-color: @background-alt;
text-color: @foreground;
children: [ "textbox-prompt-colon", "entry" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 0px;
expand: false;
str: "";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "Run...";
placeholder-color: inherit;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 2;
lines: 6;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 5px;
background-color: transparent;
text-color: @foreground;
cursor: "default";
}
scrollbar {
handle-width: 5px ;
handle-color: @selected;
border-radius: 10px;
background-color: @background-alt;
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 6px;
border-radius: 0px;
background-color: transparent;
text-color: @foreground;
cursor: pointer;
}
element normal.normal,
element alternate.normal {
background-color: var(background);
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);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 24px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
/*****----- Mode Switcher -----*****/
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px 250px;
background-color: transparent;
text-color: @foreground;
}
button {
padding: 10px;
border-radius: 0px;
background-color: @background-alt;
text-color: inherit;
cursor: pointer;
}
button selected {
background-color: var(urgent);
text-color: var(background);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px;
padding: 10px;
border-radius: 0px;
background-color: @background-alt;
text-color: @foreground;
}
textbox {
background-color: transparent;
text-color: @foreground;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground;
blink: true;
markup: true;
}
error-message {
padding: 30px;
background-color: @background;
text-color: @foreground;
}

View file

@ -0,0 +1,148 @@
/**
* Copyright (C) 2020-2023 Aditya Shakya <adi1090x@gmail.com>
**/
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
@import "shared/fonts.rasi"
/*
USE_ICON=YES
*/
/*****----- Main Window -----*****/
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 440px;
x-offset: 0px;
y-offset: 0px;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 15px;
border-color: @border;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
background-color: transparent;
children: [ "inputbar", "message", "listview" ];
}
/*****----- Inputbar -----*****/
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 12px;
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 -----*****/
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 -----*****/
listview {
enabled: true;
columns: 6;
lines: 1;
cycle: true;
scrollbar: false;
layout: vertical;
spacing: 10px;
background-color: transparent;
cursor: "default";
}
/*****----- Elements -----*****/
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

@ -0,0 +1,13 @@
/* Copyright (C) 2020-2023 Aditya Shakya <adi1090x@gmail.com> */
/* Colors */
* {
background: #24273a;
background-alt: #1e2030;
border: #c6a0f6;
foreground: #cad3f5;
selected: #c6a0f6;
active: #c6a0f6;
urgent: #ed8796;
}

View file

@ -0,0 +1,9 @@
/* Copyright (C) 2020-2023 Aditya Shakya <adi1090x@gmail.com> */
/* Text Font */
/*
{
font: "Iosevka Nerd Font 10";
}
*/

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/rofi"
RASI="$DIR/powermenu.rasi"
CNFR="$DIR/confirm.rasi"
# Theme Elements
prompt="`hostname` (`echo $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
swaylock -f -i ~/.config/hypr/wallpapers/lockscreen.png
elif [[ "$1" == '--opt2' ]]; then
confirm_run 'hyprctl dispatch exit 0'
elif [[ "$1" == '--opt3' ]]; then
confirm_run 'pulsemixer --mute' 'swaylock -f -i ~/.config/hypr/wallpapers/lockscreen.png' '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

@ -0,0 +1,136 @@
#!/usr/bin/env bash
# Import Current Theme
DIR="$HOME/.config/rofi"
RASI="$DIR/screenshot.rasi"
# Theme Elements
prompt='Screenshot'
mesg="Directory :: `xdg-user-dir PICTURES`/screenshots"
# Options
layout=`cat ${RASI} | grep 'USE_ICON' | cut -d'=' -f2`
if [[ "$layout" == 'NO' ]]; then
option_1=" Capture Desktop"
option_2=" Capture Area"
option_3=" Capture Window"
option_4=" Capture in 5s"
option_5=" Capture in 10s"
else
option_1=""
option_2=""
option_3=""
option_4="5s"
option_5="10"
fi
# 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" | rofi_cmd
}
# Screenshot
time=`date +%Y-%m-%d-%H-%M-%S`
dir="`xdg-user-dir PICTURES`/screenshots"
file="${time}_${geometry}.png"
# Directory
if [[ ! -d "$dir" ]]; then
mkdir -p "$dir"
fi
# notify and view screenshot
iDIR="$HOME/.config/hypr/mako/icons"
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} "Copied to clipboard."
paplay /usr/share/sounds/freedesktop/stereo/screen-capture.oga &>/dev/null &
image-roll "$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} && sleep 0.3 && 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
}
# Execute Command
run_cmd() {
if [[ "$1" == '--opt1' ]]; then
shotnow
elif [[ "$1" == '--opt2' ]]; then
shotarea
elif [[ "$1" == '--opt3' ]]; then
shotwin
elif [[ "$1" == '--opt4' ]]; then
shot5
elif [[ "$1" == '--opt5' ]]; then
shot10
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
;;
esac

View file

@ -0,0 +1,78 @@
#!/usr/bin/env bash
iDIR="$HOME/.config/mako-icons"
time=`date +%Y-%m-%d-%H-%M-%S`
dir="$HOME/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 &
image-roll "${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

@ -0,0 +1,335 @@
@define-color base #24273a;
@define-color mantle #1e2030;
@define-color crust #181926;
@define-color text #cad3f5;
@define-color subtext0 #a5adcb;
@define-color subtext1 #b8c0e0;
@define-color surface0 #363a4f;
@define-color surface1 #494d64;
@define-color surface2 #5b6078;
@define-color overlay0 #6e738d;
@define-color overlay1 #8087a2;
@define-color overlay2 #939ab7;
@define-color blue #8aadf4;
@define-color lavender #b7bdf8;
@define-color sapphire #7dc4e4;
@define-color sky #91d7e3;
@define-color teal #8bd5ca;
@define-color green #a6da95;
@define-color yellow #eed49f;
@define-color peach #f5a97f;
@define-color maroon #ee99a0;
@define-color red #ed8796;
@define-color mauve #c6a0f6;
@define-color pink #f5bde6;
@define-color flamingo #f0c6c6;
@define-color rosewater #f4dbd6;
* {
color: @lavender;
border: 0;
padding: 0 0;
font-family: UbuntuMono;
/* font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; */
font-size: 19px;
font-weight: bold;
transition: all 0.5s ease;
}
window#waybar {
/* border-bottom: 4px solid shade(@base, 1.1); */
/* border-radius: 10px; */
/* background:#2d2a2e; */
/* background-color: rgba(36, 39, 58, 0.60); */
/* background-color: rgba(0, 0, 0, 0); */
/* background-color: shade(#1e1e2e, 0.95); */
/* background-color: rgba(9, 3, 18, 0.70); */
background: none;
}
#workspaces button {
color: @base;
border-radius: 50%;
/* background-color: @base; */
margin: 0px 8px 0px 8px;
padding: 2px 6px 2px 0px;
}
#workspaces button:hover * {
color: @mauve;
}
#workspaces button:hover {
color: @mauve;
/* border-radius: 20px; */
box-shadow: none; /* Remove predefined box-shadow */
text-shadow: none; /* Remove predefined text-shadow */
border: 0px;
background: none;
}
#workspaces * {
color: whitesmoke;
}
#workspaces {
border-style: solid;
background-color: shade(@base, 0.7);
opacity: 1;
border-radius: 10px;
margin: 9px 8px 8px 8px;
}
#workspaces button.active {
color: @mauve;
border-radius: 20px;
/* background-color: @flamingo; */
}
#workspaces button.active * {
color: @mauve;
}
#mode {
color: #ebcb8b;
}
#clock,
#battery,
#cpu,
#memory,
#idle_inhibitor,
#temperature,
#backlight,
#network,
#pulseaudio,
#mode,
#tray,
#custom-pacman,
#custom-playerctl,
#mpd {
padding: 6px 8px;
border-style: solid;
background-color: shade(@base, 0.70);
opacity: 1;
margin: 9px 0px 8px 0px;
}
#mpd {
border-radius: 10px;
color: @mauve;
margin-left: 5px;
background-color: rgba(0, 0, 0, 0);
}
#custom-background {
border-radius: 0px 10px 10px 0px;
background-color: @base;
color: white;
padding: 5px 14px 5px 5px;
}
#custom-playerctl {
color: @mauve;
border-radius: 10px;
margin: 9px 8px 8px 0px;
}
#clock {
color: @mauve;
border-radius: 10px;
margin: 9px 10px 8px 10px;
}
#backlight {
color: @yellow;
border-radius: 10px 0 0 10px;
}
#battery {
color: @sky;
/* border-bottom: 2px solid #d8dee9; */
border-radius: 0 10px 10px 0;
margin-right: 10px;
}
#battery.charging {
color: #81a1c1;
}
@keyframes blink {
to {
color: @red;
/* border-bottom: 2px solid @red; */
}
}
#battery.critical:not(.charging) {
color: #bf616a;
/* border-bottom: 2px solid #bf616a; */
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#cpu {
color: @sky;
/* border-bottom: 2px solid @sky; */
}
#cpu #cpu-icon {
color: @sky;
}
#memory {
color: @sky;
}
#network.disabled {
color: #bf616a;
/* border-bottom: 2px solid #bf616a; */
}
#network {
color: @green;
/* border-bottom: 2px solid @green; */
border-radius: 10px;
margin-right: 8px;
}
#network.disconnected {
color: #bf616a;
/* border-bottom: 2px solid #bf616a; */
}
#pulseaudio {
color: @flamingo;
border-radius: 0 10px 10px 0;
margin-right: 10px;
/* border-bottom: 2px solid @flamingo; */
}
#pulseaudio.muted {
color: #3b4252;
/* border-bottom: 2px solid #3b4252; */
}
#temperature {
color: @teal;
border-radius: 10px 0 0 10px;
}
#temperature.critical {
color: @red;
/* border-bottom: 2px solid @red; */
}
#custom-pacman {
border-radius: 10px 0 0 10px;
}
#idle_inhibitor {
background-color: #ebcb8b;
color: @base;
}
#tray {
/* background-color: @base; */
border-radius: 10px;
}
#window {
border-style: hidden;
margin-left: 10px;
/* margin-top:1px;
padding: 8px 1rem; */
margin-right: 10px;
color: #eceff4;
}
#mode {
margin-bottom: 4px;
}
/* window#waybar {
background: #2d2a2e;
}
* {
color: #c8b9a9;
font-family: Ubuntu Mono, sans-serif;
font-size: 12px;
}
#workspaces button.focused {
color: #f2e5bc;
}
#workspaces button {
color: #c8b9a9;
}
.separator {
background-color: #c8b9a9;
}
#mode {
color: #ebcb8b;
}
#clock {
color: #a3be8c;
}
#battery {
color: #d8dee9;
}
#battery.charging {
color: #b48ead;
}
#battery.critical:not(.charging) {
color: #bf616a;
}
#cpu {
color: #a3be8c;
}
#memory {
color: #d3869b;
}
#network {
color: #8fbcbb;
}
#network.disabled {
color: #bf616a;
}
#network.disconnected {
color: #bf616a;
}
#pulseaudio {
color: #b48ead;
}
#pulseaudio.muted {
color: #bf616a;
}
#temperature {
color: #8fbcbb;
}
#temperature.critical {
color: #bf616a;
} */

View file

@ -6,11 +6,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1703863936,
"narHash": "sha256-sy+rSQ1NMUf5Rhoi0waBgBh+vj98ADjrROSkBG4EFWY=",
"lastModified": 1705593119,
"narHash": "sha256-bax2BqeVfLRILgevpVhT3PMhq/koBB/XzwLGhv6N2LU=",
"owner": "wobcom",
"repo": "fernglas",
"rev": "eef7c251904c9c39eacb0d680474901af4b7a9b4",
"rev": "2a63e52f6402e3d3ea1fd69091b044dd5b62a960",
"type": "github"
},
"original": {
@ -76,11 +76,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1705312285,
"narHash": "sha256-rd+dY+v61Y8w3u9bukO/hB55Xl4wXv4/yC8rCGVnK5U=",
"lastModified": 1706182238,
"narHash": "sha256-Ti7CerGydU7xyrP/ow85lHsOpf+XMx98kQnPoQCSi1g=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "bee2202bec57e521e3bd8acd526884b9767d7fa0",
"rev": "f84eaffc35d1a655e84749228cde19922fcf55f1",
"type": "github"
},
"original": {
@ -123,11 +123,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1705316053,
"narHash": "sha256-J2Ey5mPFT8gdfL2XC0JTZvKaBw/b2pnyudEXFvl+dQM=",
"lastModified": 1705856552,
"narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c3e128f3c0ecc1fb04aef9f72b3dcc2f6cecf370",
"rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d",
"type": "github"
},
"original": {
@ -137,12 +137,47 @@
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1694959747,
"narHash": "sha256-CXQ2MuledDVlVM5dLC4pB41cFlBWxRw4tCBsFrq3cRk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "970a59bd19eff3752ce552935687100c46e820a5",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"fernglas": "fernglas",
"kyouma-www": "kyouma-www",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_3",
"secrix": "secrix"
}
},
"secrix": {
"inputs": {
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1701493419,
"narHash": "sha256-Aa6uQcHp1vABB0FlMsMVMI0Vhk91VozLoSkAT7L7PMU=",
"owner": "Platonic-Systems",
"repo": "secrix",
"rev": "c5d193ae564b93ffa3e5a950fb7666760e0ae324",
"type": "github"
},
"original": {
"owner": "Platonic-Systems",
"repo": "secrix",
"type": "github"
}
},
"systems": {

View file

@ -5,9 +5,14 @@
nixos-hardware.url = "github:nixos/nixos-hardware";
fernglas.url = "github:wobcom/fernglas";
kyouma-www.url = "git+ssh://git@git.bsd.gay/snaki/kyouma-net.git";
secrix.url = "github:Platonic-Systems/secrix";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nixos-hardware, fernglas, kyouma-www, ... }@inputs: {
outputs = { self, nixpkgs, nixos-hardware, fernglas, kyouma-www, secrix, home-manager, ... }@inputs: {
colmena = {
meta = {
allowApplyAll = false;
@ -20,18 +25,11 @@
crime = {
imports = [ ./config/hosts/crime/configuration.nix ];
};
ryuuko = {
imports = [ ./config/hosts/ryuuko/configuartion.nix ];
};
};
nixosConfigurations = {
# ryuuko = nixpkgs.lib.nixosSystem {
# system = "x86_64-linux";
# specialArgs = attrs;
# modules = [
# ./config/common
# ./config/x1.nix
# ./config/hosts/ryuuko/configuration.nix
# ];
# };
};
apps.x86_64-linux.secrix = inputs.secrix.secrix self;
devShells.x86_64-linux.default = let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
in pkgs.mkShell {

View file

@ -1,4 +1,7 @@
{ config, lib, ...}: with lib; {
{ config, lib, ...}: with lib;
let
cfg = config.kyouma.machine-type;
in {
options.kyouma.machine-type = {
physical = mkOption {
type = types.bool;
@ -36,9 +39,21 @@
description = mdDoc "Mark machine as portable.";
};
};
config = let
cfg = config.kyouma.machine-type;
in {
config = {
assertions = [
{ assertion = !(cfg.physical && cfg.virtual);
message = "machine-type.physical and machine-type.virtual are mutually exclusive";
}
{ assertion = !(cfg.headless && cfg.graphical);
message = "machine-type.headless and machine-type.graphical are mutually exclusive";
}
{ assertion = if cfg.router then cfg.headless == cfg.router else true;
message = "hosts of machine-type.router must also be machine-type.headless";
}
{ assertion = if cfg.portable then cfg.physical == cfg.portable else true;
message = "hosts of machine-type.protable must also be machine-type.physical";
}
];
deployment.tags = mkIf cfg.router [ "router" ];
};
}