Commit for generation 220
This commit is contained in:
11
glasshouse-desktop/home/bat.nix
Normal file
11
glasshouse-desktop/home/bat.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
pager = "less -FR";
|
||||
theme = "Dracula";
|
||||
};
|
||||
};
|
||||
}
|
||||
15
glasshouse-desktop/home/btop.nix
Normal file
15
glasshouse-desktop/home/btop.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
color_theme = "dracula";
|
||||
theme_background = false;
|
||||
update_ms = 500;
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = (with pkgs; [ nvtopPackages.intel ]);
|
||||
}
|
||||
12
glasshouse-desktop/home/cava.nix
Normal file
12
glasshouse-desktop/home/cava.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.cava = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# https://github.com/catppuccin/cava
|
||||
home.file.".config/cava/config".text = ''
|
||||
# custom cava config
|
||||
'' + builtins.readFile "${inputs.catppuccin-cava}/themes/mocha.cava";
|
||||
}
|
||||
23
glasshouse-desktop/home/default.nix
Normal file
23
glasshouse-desktop/home/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (import ./btop.nix) ]
|
||||
++ [ (import ./bat.nix) ]
|
||||
++ [ (import ./cava.nix) ]
|
||||
++ [ (import ./fuzzel.nix) ]
|
||||
++ [ (import ./gtk.nix) ]
|
||||
++ [ (import ./home.nix) ]
|
||||
++ [ (import ./hyprland) ]
|
||||
++ [ (import ./kitty.nix) ]
|
||||
++ [ (import ./nixvim) ]
|
||||
++ [ (import ./scripts) ]
|
||||
++ [ (import ./spicetify.nix) ]
|
||||
++ [ (import ./starship.nix) ]
|
||||
++ [ (import ./swaync) ]
|
||||
++ [ (import ./theme) ]
|
||||
++ [ (import ./toilet) ]
|
||||
++ [ (import ./userpkgs.nix) ]
|
||||
++ [ (import ./waybar) ]
|
||||
++ [ (import ./zshell.nix) ];
|
||||
}
|
||||
35
glasshouse-desktop/home/fuzzel.nix
Normal file
35
glasshouse-desktop/home/fuzzel.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.fuzzel = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
font = "JetBrainsMono Nerd Font:weight=bold:size=14";
|
||||
line-height = 25;
|
||||
fields = "name,generic,comment,categories,filename,keywords";
|
||||
terminal = "kitty";
|
||||
prompt = "' ➜ '" ;
|
||||
icon-theme = "Papirus-Dark";
|
||||
layer = "top";
|
||||
lines = 10;
|
||||
width = 35;
|
||||
horizontal-pad = 25;
|
||||
inner-pad = 5;
|
||||
};
|
||||
colors = {
|
||||
background = "1e1e2ecc";
|
||||
text = "cdd6f4ff";
|
||||
match = "f38ba8ff";
|
||||
selection = "b4befeaa";
|
||||
selection-match = "f38ba8ff";
|
||||
selection-text = "cdd6f4ff";
|
||||
border = "b4befeff";
|
||||
};
|
||||
border = {
|
||||
radius = 15;
|
||||
width = 3;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
41
glasshouse-desktop/home/gtk.nix
Normal file
41
glasshouse-desktop/home/gtk.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
fonts.fontconfig.enable = true;
|
||||
home.packages = [
|
||||
pkgs.nerdfonts
|
||||
(pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" "Noto" ]; })
|
||||
pkgs.twemoji-color-font
|
||||
pkgs.noto-fonts-emoji
|
||||
];
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = "JetBrainsMono Nerd Font";
|
||||
size = 11;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.catppuccin-papirus-folders.override {
|
||||
flavor = "mocha";
|
||||
accent = "lavender";
|
||||
};
|
||||
};
|
||||
theme = {
|
||||
name = "Dracula";
|
||||
package = pkgs.dracula-theme;
|
||||
};
|
||||
cursorTheme = {
|
||||
name = "Nordzy-cursors";
|
||||
package = pkgs.nordzy-cursor-theme;
|
||||
size = 22;
|
||||
};
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Nordzy-cursors";
|
||||
package = pkgs.nordzy-cursor-theme;
|
||||
size = 22;
|
||||
};
|
||||
}
|
||||
0
glasshouse-desktop/home/home.nix
Normal file
0
glasshouse-desktop/home/home.nix
Normal file
176
glasshouse-desktop/home/hyprland/config.nix
Normal file
176
glasshouse-desktop/home/hyprland/config.nix
Normal file
@@ -0,0 +1,176 @@
|
||||
{... }:
|
||||
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
exec-once = [
|
||||
"waybar &"
|
||||
"swaync &"
|
||||
"wl-paste --watch cliphist store &"
|
||||
"wl-clip-persist --clipboard both"
|
||||
"swaybg -m fill -i $(find ~/Pictures/Wallpapers/ -maxdepth 1 -type f) &"
|
||||
"systemctl --user import-environment &"
|
||||
"hash dbus-update-activation-environment 2>/dev/null &"
|
||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &"
|
||||
"aplay /home/pagedmov/sound/sys/login.wav &"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
follow_mouse = 1;
|
||||
accel_profile = "flat";
|
||||
force_no_accel = 1;
|
||||
sensitivity = 0;
|
||||
};
|
||||
|
||||
general = {
|
||||
"$mainMod" = "SUPER";
|
||||
layout = "dwindle";
|
||||
gaps_in = 0;
|
||||
gaps_out = 0;
|
||||
border_size = 2;
|
||||
"col.active_border" = "rgb(cba6f7) rgb(94e2d5) 45deg";
|
||||
"col.inactive_border" = "0x00000000";
|
||||
border_part_of_window = false;
|
||||
no_border_on_floating = false;
|
||||
};
|
||||
misc = {
|
||||
disable_autoreload = true;
|
||||
disable_hyprland_logo = true;
|
||||
always_follow_on_dnd = true;
|
||||
layers_hog_keyboard_focus = true;
|
||||
animate_manual_resizes = false;
|
||||
enable_swallow = true;
|
||||
focus_on_activate = true;
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
no_gaps_when_only = true;
|
||||
force_split = 0;
|
||||
special_scale_factor = 1.0;
|
||||
split_width_multiplier = 1.0;
|
||||
use_active_for_splits = true;
|
||||
pseudotile = "yes";
|
||||
preserve_split = "yes";
|
||||
};
|
||||
|
||||
master = {
|
||||
new_status = "master";
|
||||
special_scale_factor = 1;
|
||||
no_gaps_when_only = false;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 0;
|
||||
# active_opacity = 0.90;
|
||||
# inactive_opacity = 0.90;
|
||||
# fullscreen_opacity = 1.0;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 1;
|
||||
passes = 1;
|
||||
# size = 4;
|
||||
# passes = 2;
|
||||
brightness = 1;
|
||||
contrast = 1.400;
|
||||
ignore_opacity = true;
|
||||
noise = 0;
|
||||
new_optimizations = true;
|
||||
xray = true;
|
||||
};
|
||||
|
||||
drop_shadow = true;
|
||||
|
||||
shadow_ignore_window = true;
|
||||
shadow_offset = "0 2";
|
||||
shadow_range = 20;
|
||||
shadow_render_power = 3;
|
||||
"col.shadow" = "rgba(00000055)";
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
bezier = [
|
||||
"fluent_decel, 0, 0.2, 0.4, 1"
|
||||
"easeOutCirc, 0, 0.55, 0.45, 1"
|
||||
"easeOutCubic, 0.33, 1, 0.68, 1"
|
||||
"easeinoutsine, 0.37, 0, 0.63, 1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
# Windows
|
||||
"windowsIn, 1, 3, easeOutCubic, popin 30%" # window open
|
||||
"windowsOut, 1, 3, fluent_decel, popin 70%" # window close.
|
||||
"windowsMove, 1, 2, easeinoutsine, slide" # everything in between, moving, dragging, resizing.
|
||||
|
||||
# Fade
|
||||
"fadeIn, 1, 3, easeOutCubic" # fade in (open) -> layers and windows
|
||||
"fadeOut, 1, 2, easeOutCubic" # fade out (close) -> layers and windows
|
||||
"fadeSwitch, 0, 1, easeOutCirc" # fade on changing activewindow and its opacity
|
||||
"fadeShadow, 1, 10, easeOutCirc" # fade on changing activewindow for shadows
|
||||
"fadeDim, 1, 4, fluent_decel" # the easing of the dimming of inactive windows
|
||||
"border, 1, 2.7, easeOutCirc" # for animating the border's color switch speed
|
||||
"borderangle, 1, 30, fluent_decel, once" # for animating the border's gradient angle - styles: once (default), loop
|
||||
"workspaces, 1, 4, easeOutCubic, fade" # styles: slide, slidevert, fade, slidefade, slidefadevert
|
||||
];
|
||||
|
||||
bind = [
|
||||
"$mainmod, up, exec, pactl set-sink-volume @default_sink@ +10%"
|
||||
"$mainmod, down, exec, pactl set-sink-volume @default_sink@ -10%"
|
||||
"$mainmod, print, exec, grimblast copy area"
|
||||
"$mainmod, a, exec, $browser"
|
||||
"$mainmod, q, exec, $terminal --title Kitty"
|
||||
"$mainmod, d, exec, /home/pagedmov/coding/scripts/switchmon.sh"
|
||||
"$mainmod, c, killactive,"
|
||||
"$mainmod shift, q, exit,"
|
||||
"$mainmod, m, exec, $menu"
|
||||
"$mainmod, e, exec, $filemanager"
|
||||
"$mainmod, r, exec, neovide"
|
||||
"$mainmod, p, pseudo, # dwindle"
|
||||
"$mainmod, b, togglesplit, # dwindle"
|
||||
"$mainmod, f, togglefloating"
|
||||
"$mainmod, g, fullscreen"
|
||||
"$mainmod, home, exec, /home/pagedmov/scripts/home.sh"
|
||||
"$mainmod, h, movefocus, l"
|
||||
"$mainmod, l, movefocus, r"
|
||||
"$mainmod, k, movefocus, u"
|
||||
"$mainmod, j, movefocus, d"
|
||||
"$mainmod, 1, exec, hyprctl 'dispatch workspace 1'"
|
||||
"$mainmod, 2, exec, hyprctl 'dispatch workspace 2'"
|
||||
"$mainmod, 3, exec, hyprctl 'dispatch workspace 3'"
|
||||
"$mainmod, 4, exec, hyprctl 'dispatch workspace 4'"
|
||||
"$mainmod, 5, exec, hyprctl 'dispatch workspace 5'"
|
||||
"$mainmod, 6, exec, hyprctl 'dispatch workspace 6'"
|
||||
"$mainmod, 7, exec, hyprctl 'dispatch workspace 7'"
|
||||
"$mainmod, 8, exec, hyprctl 'dispatch workspace 8'"
|
||||
"$mainmod, 9, exec, hyprctl 'dispatch workspace 9'"
|
||||
"$mainmod, 0, exec, hyprctl 'dispatch workspace 10'"
|
||||
"$mainmod alt, g, togglegroup"
|
||||
"$mainmod alt, h, changegroupactive, b"
|
||||
"$mainmod alt, l, changegroupactive, f"
|
||||
"$mainmod shift, h, movewindoworgroup, l"
|
||||
"$mainmod shift, l, movewindoworgroup, r"
|
||||
"$mainmod shift, k, movewindoworgroup, u"
|
||||
"$mainmod shift, j, movewindoworgroup, d"
|
||||
"$mainmod shift, 1, movetoworkspace, 1"
|
||||
"$mainmod shift, 2, movetoworkspace, 2"
|
||||
"$mainmod shift, 3, movetoworkspace, 3"
|
||||
"$mainmod shift, 4, movetoworkspace, 4"
|
||||
"$mainmod shift, 5, movetoworkspace, 5"
|
||||
"$mainmod shift, 6, movetoworkspace, 6"
|
||||
"$mainmod shift, 7, movetoworkspace, 7"
|
||||
"$mainmod shift, 8, movetoworkspace, 8"
|
||||
"$mainmod shift, 9, movetoworkspace, 9"
|
||||
"$mainmod shift, 0, movetoworkspace, 10"
|
||||
"$mainmod, s, togglespecialworkspace, magic"
|
||||
"$mainmod shift, s, movetoworkspace, special:magic"
|
||||
"alt, grave, togglespecialworkspace, console"
|
||||
"$mainmod, mouse_down, workspace, e+1"
|
||||
"$mainmod, mouse_up, workspace, e-1"
|
||||
"$mainmod, mouse:272, movewindow"
|
||||
"$mainmod, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
5
glasshouse-desktop/home/hyprland/default.nix
Normal file
5
glasshouse-desktop/home/hyprland/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [ (import ./hyprland.nix) ] ++[ (import ./config.nix) ];
|
||||
}
|
||||
24
glasshouse-desktop/home/hyprland/hyprland.nix
Normal file
24
glasshouse-desktop/home/hyprland/hyprland.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
swaybg
|
||||
inputs.hypr-contrib.packages.${pkgs.system}.grimblast
|
||||
hyprpicker
|
||||
grim
|
||||
slurp
|
||||
wl-clip-persist
|
||||
wf-recorder
|
||||
glib
|
||||
watland
|
||||
direnv
|
||||
];
|
||||
systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ];
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland = {
|
||||
enable = true;
|
||||
};
|
||||
systemd.enable = true;
|
||||
};
|
||||
}
|
||||
46
glasshouse-desktop/home/kitty.nix
Normal file
46
glasshouse-desktop/home/kitty.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
|
||||
theme = "Catppuccin-Mocha";
|
||||
|
||||
font = {
|
||||
name = "JetBrainsMono Nerd Font";
|
||||
size = 13;
|
||||
};
|
||||
|
||||
settings = {
|
||||
confirm_os_window_close = 0;
|
||||
background_opacity = "0.55";
|
||||
window_padding_width = 10;
|
||||
scrollback_lines = 10000;
|
||||
enable_audio_bell = false;
|
||||
mouse_hide_wait = 60;
|
||||
|
||||
## Tabs
|
||||
tab_title_template = "{index}";
|
||||
active_tab_font_style = "normal";
|
||||
inactive_tab_font_style = "normal";
|
||||
tab_bar_style = "powerline";
|
||||
tab_powerline_style = "round";
|
||||
active_tab_foreground = "#1e1e2e";
|
||||
active_tab_background = "#cba6f7";
|
||||
inactive_tab_foreground = "#bac2de";
|
||||
inactive_tab_background = "#313244";
|
||||
};
|
||||
|
||||
keybindings = {
|
||||
## Tabs
|
||||
"alt+1" = "goto_tab 1";
|
||||
"alt+2" = "goto_tab 2";
|
||||
"alt+3" = "goto_tab 3";
|
||||
"alt+4" = "goto_tab 4";
|
||||
|
||||
## Unbind
|
||||
"ctrl+shift+left" = "no_op";
|
||||
"ctrl+shift+right" = "no_op";
|
||||
};
|
||||
};
|
||||
}
|
||||
24
glasshouse-desktop/home/nixvim/config/autocmd.nix
Normal file
24
glasshouse-desktop/home/nixvim/config/autocmd.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
autoCmd = [
|
||||
{
|
||||
command = "FloatermNew --wintype=float --name=shadeterm --position=topright --autoclose=0 --silent --cwd=<buffer> --titleposition=left zsh";
|
||||
event = [ "VimEnter" ];
|
||||
pattern = [ "*" ];
|
||||
}
|
||||
{
|
||||
command = "silent! mkview";
|
||||
event = [ "BufWinLeave" ];
|
||||
pattern = [ "*" ];
|
||||
}
|
||||
{
|
||||
command = "silent! !aplay ~/sound/sys/cd.wav > /dev/null 2>&1 &";
|
||||
event = [ "BufWinLeave" ];
|
||||
pattern = [ "*" ];
|
||||
}
|
||||
{
|
||||
command = "silent! loadview";
|
||||
event = [ "BufWinEnter" ];
|
||||
pattern = [ "*" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
18
glasshouse-desktop/home/nixvim/config/default.nix
Normal file
18
glasshouse-desktop/home/nixvim/config/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
imports = [
|
||||
./plugins/alpha.nix
|
||||
./plugins/coq.nix
|
||||
./plugins/barbar.nix
|
||||
./plugins/cmp.nix
|
||||
./plugins/lsp.nix
|
||||
./plugins/lualine.nix
|
||||
./plugins/plugins.nix
|
||||
./plugins/nvim-tree.nix
|
||||
./plugins/telescope.nix
|
||||
./plugins/extra_plugins.nix
|
||||
./options.nix
|
||||
./keymaps.nix
|
||||
./autocmd.nix
|
||||
];
|
||||
}
|
||||
|
||||
29
glasshouse-desktop/home/nixvim/config/keymaps.nix
Normal file
29
glasshouse-desktop/home/nixvim/config/keymaps.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
keymaps = [
|
||||
{
|
||||
action = "<C-W>W";
|
||||
key = "<S-Tab>";
|
||||
mode = "n";
|
||||
}
|
||||
{
|
||||
action = "<C-w>w";
|
||||
key = "<Tab>";
|
||||
mode = "n";
|
||||
}
|
||||
{
|
||||
action = "<cmd>FloatermToggle shadeterm<CR>";
|
||||
key = "<F2>";
|
||||
mode = "n";
|
||||
}
|
||||
{
|
||||
action = "<cmd>NvimTreeToggle<CR>";
|
||||
key = "<F3>";
|
||||
mode = "n";
|
||||
}
|
||||
{
|
||||
action = "<cmd>FloatermToggle shadeterm<CR>";
|
||||
key = "<F2>";
|
||||
mode = "t";
|
||||
}
|
||||
];
|
||||
}
|
||||
35
glasshouse-desktop/home/nixvim/config/options.nix
Normal file
35
glasshouse-desktop/home/nixvim/config/options.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
colorschemes.kanagawa = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
diagnostics.signs = false;
|
||||
extraConfigLua = ''
|
||||
if vim.g.started_by_firenvim == true then
|
||||
vim.o.laststatus = 0
|
||||
end
|
||||
if vim.g.neovide then
|
||||
vim.g.neovide_refresh_rate = 144
|
||||
vim.g.neovide_cursor_vfx_mode = "sonicboom"
|
||||
vim.g.neovide_cursor_animate_in_insert_mode = false
|
||||
end
|
||||
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.ruler = true
|
||||
vim.opt.scrolloff = 6
|
||||
vim.opt.undofile = true
|
||||
vim.opt.foldmethod = "manual"
|
||||
vim.opt.wrap = true
|
||||
vim.opt.linebreak = true
|
||||
vim.opt.textwidth = 135
|
||||
vim.opt.breakat = " \t!@*-+;:,./?"
|
||||
|
||||
vim.g.mapleader = "!"
|
||||
'';
|
||||
}
|
||||
6
glasshouse-desktop/home/nixvim/config/plugins/alpha.nix
Normal file
6
glasshouse-desktop/home/nixvim/config/plugins/alpha.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
plugins.alpha = {
|
||||
enable = true;
|
||||
theme = "dashboard";
|
||||
};
|
||||
}
|
||||
8
glasshouse-desktop/home/nixvim/config/plugins/barbar.nix
Normal file
8
glasshouse-desktop/home/nixvim/config/plugins/barbar.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
plugins.barbar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
auto_hide = 1;
|
||||
};
|
||||
};
|
||||
}
|
||||
10
glasshouse-desktop/home/nixvim/config/plugins/cmp.nix
Normal file
10
glasshouse-desktop/home/nixvim/config/plugins/cmp.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
plugins.cmp = {
|
||||
autoEnableSources = true;
|
||||
settings.sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "path"; }
|
||||
{ name = "buffer"; }
|
||||
];
|
||||
};
|
||||
}
|
||||
8
glasshouse-desktop/home/nixvim/config/plugins/coq.nix
Normal file
8
glasshouse-desktop/home/nixvim/config/plugins/coq.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
plugins.coq-nvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
auto_start = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# need:
|
||||
#vim-markdown
|
||||
#vim-sneak
|
||||
#vim-slash
|
||||
#undotree
|
||||
#automkdr.nvim
|
||||
extraPlugins = [
|
||||
(pkgs.vimUtils.buildVimPlugin { # vimwiki
|
||||
name = "vimwiki";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "vimwiki";
|
||||
repo = "vimwiki";
|
||||
rev = "705ad1e0dded0e3b7ff5fac78547ab67c9d39bdf";
|
||||
hash = "sha256-Upx29rIPwW/e7Lkmf0PNOpIACnAXIzlkfa6V1p2nYHM=";
|
||||
};
|
||||
})
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "vim-markdown";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "preservim";
|
||||
repo = "vim-markdown";
|
||||
rev = "8f6cb3a6ca4e3b6bcda0730145a0b700f3481b51";
|
||||
hash = "sha256-ZCCSjZ5Xok4rnIwfa4VUEaz6d3oW9066l0EkoqiTppM=";
|
||||
};
|
||||
})
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "vim-sneak";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "justinmk";
|
||||
repo = "vim-sneak";
|
||||
rev = "c13d0497139b8796ff9c44ddb9bc0dc9770ad2dd";
|
||||
hash = "sha256-ndWhnV0fgCcqCGwVyM07GfmUB3CitBZbOWvZtsB1tBk=";
|
||||
};
|
||||
})
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "vim-slash";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "junegunn";
|
||||
repo = "vim-slash";
|
||||
rev = "31aee09b7ea8893a18fa34f65e63e364fc998444";
|
||||
hash = "sha256-hC590lmKBssLCSKPF9O2cnt6TCJkklzbbhDNhf1ozUU=";
|
||||
};
|
||||
})
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "automkdir.nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "mateuszwieloch";
|
||||
repo = "automkdir.nvim";
|
||||
rev = "beeb2dd76f1c3ac776d901c43217a774f1f045de";
|
||||
hash = "sha256-lKSCZ80b/+OV56858FDK7x/zhcuU/AWuCDe+8NdhziU=";
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
17
glasshouse-desktop/home/nixvim/config/plugins/lsp.nix
Normal file
17
glasshouse-desktop/home/nixvim/config/plugins/lsp.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
bashls.enable = true;
|
||||
ccls.enable = true;
|
||||
clangd.enable = true;
|
||||
cmake.enable = true;
|
||||
html.enable = true;
|
||||
jsonls.enable = true;
|
||||
lua-ls.enable = true;
|
||||
nil-ls.enable = true;
|
||||
pyright.enable = true;
|
||||
sqls.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
36
glasshouse-desktop/home/nixvim/config/plugins/lualine.nix
Normal file
36
glasshouse-desktop/home/nixvim/config/plugins/lualine.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
plugins.lualine = {
|
||||
enable = true;
|
||||
settings = {
|
||||
options = {
|
||||
icons_enabled = true;
|
||||
theme = "auto";
|
||||
component_separators = {left = ""; right = "";};
|
||||
section_separators = {left = ""; right = "";};
|
||||
always_divide_middle = true;
|
||||
globalstatus = false;
|
||||
refresh = {
|
||||
statusline = 1000;
|
||||
tabline = 1000;
|
||||
winbar = 1000;
|
||||
};
|
||||
};
|
||||
sections = {
|
||||
lualine_a = ["mode"];
|
||||
lualine_b = ["buffers"];
|
||||
lualine_c = [""];
|
||||
lualine_x = ["searchcount" "fileformat" "filetype"];
|
||||
lualine_y = ["branch" "diff" "diagnostics"];
|
||||
lualine_z = ["location"];
|
||||
};
|
||||
inactive_sections = {
|
||||
lualine_a = [];
|
||||
lualine_b = [];
|
||||
lualine_c = ["filename"];
|
||||
lualine_x = ["location"];
|
||||
lualine_y = [];
|
||||
lualine_z = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
84
glasshouse-desktop/home/nixvim/config/plugins/nvim-tree.nix
Normal file
84
glasshouse-desktop/home/nixvim/config/plugins/nvim-tree.nix
Normal file
@@ -0,0 +1,84 @@
|
||||
{
|
||||
plugins.nvim-tree = {
|
||||
enable = true;
|
||||
hijackUnnamedBufferWhenOpening = false;
|
||||
openOnSetup = false;
|
||||
onAttach = { __raw = ''
|
||||
function(bufnr)
|
||||
local api = require('nvim-tree.api')
|
||||
|
||||
local function opts(desc)
|
||||
return { desc = 'nvim-tree: ' .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
|
||||
end
|
||||
|
||||
-- BEGIN_DEFAULT_ON_ATTACH
|
||||
vim.keymap.set('n', '<C-]>', api.tree.change_root_to_node, opts('CD'))
|
||||
vim.keymap.set('n', '<C-e>', api.node.open.replace_tree_buffer, opts('Open: In Place'))
|
||||
vim.keymap.set('n', '<C-k>', api.node.show_info_popup, opts('Info'))
|
||||
vim.keymap.set('n', '<C-r>', api.fs.rename_sub, opts('Rename: Omit Filename'))
|
||||
vim.keymap.set('n', '<C-t>', api.node.open.tab, opts('Open: New Tab'))
|
||||
vim.keymap.set('n', '<C-v>', api.node.open.vertical, opts('Open: Vertical Split'))
|
||||
vim.keymap.set('n', '<C-x>', api.node.open.horizontal, opts('Open: Horizontal Split'))
|
||||
vim.keymap.set('n', '<BS>', api.node.navigate.parent_close, opts('Close Directory'))
|
||||
vim.keymap.set('n', '<CR>', api.node.open.edit, opts('Open'))
|
||||
vim.keymap.set('n', 'b', api.node.open.preview, opts('Open Preview'))
|
||||
vim.keymap.set('n', '>', api.node.navigate.sibling.next, opts('Next Sibling'))
|
||||
vim.keymap.set('n', '<', api.node.navigate.sibling.prev, opts('Previous Sibling'))
|
||||
vim.keymap.set('n', '.', api.node.run.cmd, opts('Run Command'))
|
||||
vim.keymap.set('n', '-', api.tree.change_root_to_parent, opts('Up'))
|
||||
vim.keymap.set('n', 'a', api.fs.create, opts('Create File Or Directory'))
|
||||
vim.keymap.set('n', 'bd', api.marks.bulk.delete, opts('Delete Bookmarked'))
|
||||
vim.keymap.set('n', 'bt', api.marks.bulk.trash, opts('Trash Bookmarked'))
|
||||
vim.keymap.set('n', 'bmv', api.marks.bulk.move, opts('Move Bookmarked'))
|
||||
vim.keymap.set('n', 'B', api.tree.toggle_no_buffer_filter, opts('Toggle Filter: No Buffer'))
|
||||
vim.keymap.set('n', 'c', api.fs.copy.node, opts('Copy'))
|
||||
vim.keymap.set('n', 'C', api.tree.toggle_git_clean_filter, opts('Toggle Filter: Git Clean'))
|
||||
vim.keymap.set('n', '[c', api.node.navigate.git.prev, opts('Prev Git'))
|
||||
vim.keymap.set('n', ']c', api.node.navigate.git.next, opts('Next Git'))
|
||||
vim.keymap.set('n', 'd', api.fs.remove, opts('Delete'))
|
||||
vim.keymap.set('n', 'D', api.fs.trash, opts('Trash'))
|
||||
vim.keymap.set('n', 'E', api.tree.expand_all, opts('Expand All'))
|
||||
vim.keymap.set('n', 'e', api.fs.rename_basename, opts('Rename: Basename'))
|
||||
vim.keymap.set('n', ']e', api.node.navigate.diagnostics.next, opts('Next Diagnostic'))
|
||||
vim.keymap.set('n', '[e', api.node.navigate.diagnostics.prev, opts('Prev Diagnostic'))
|
||||
vim.keymap.set('n', 'F', api.live_filter.clear, opts('Live Filter: Clear'))
|
||||
vim.keymap.set('n', 'f', api.live_filter.start, opts('Live Filter: Start'))
|
||||
vim.keymap.set('n', 'g?', api.tree.toggle_help, opts('Help'))
|
||||
vim.keymap.set('n', 'gy', api.fs.copy.absolute_path, opts('Copy Absolute Path'))
|
||||
vim.keymap.set('n', 'ge', api.fs.copy.basename, opts('Copy Basename'))
|
||||
vim.keymap.set('n', 'H', api.tree.toggle_hidden_filter, opts('Toggle Filter: Dotfiles'))
|
||||
vim.keymap.set('n', 'I', api.tree.toggle_gitignore_filter, opts('Toggle Filter: Git Ignore'))
|
||||
vim.keymap.set('n', 'J', api.node.navigate.sibling.last, opts('Last Sibling'))
|
||||
vim.keymap.set('n', 'K', api.node.navigate.sibling.first, opts('First Sibling'))
|
||||
vim.keymap.set('n', 'L', api.node.open.toggle_group_empty, opts('Toggle Group Empty'))
|
||||
vim.keymap.set('n', 'M', api.tree.toggle_no_bookmark_filter, opts('Toggle Filter: No Bookmark'))
|
||||
vim.keymap.set('n', 'm', api.marks.toggle, opts('Toggle Bookmark'))
|
||||
vim.keymap.set('n', 'o', api.node.open.edit, opts('Open'))
|
||||
vim.keymap.set('n', 'O', api.node.open.no_window_picker, opts('Open: No Window Picker'))
|
||||
vim.keymap.set('n', 'p', api.fs.paste, opts('Paste'))
|
||||
vim.keymap.set('n', 'P', api.node.navigate.parent, opts('Parent Directory'))
|
||||
vim.keymap.set('n', 'q', api.tree.close, opts('Close'))
|
||||
vim.keymap.set('n', 'r', api.fs.rename, opts('Rename'))
|
||||
vim.keymap.set('n', 'R', api.tree.reload, opts('Refresh'))
|
||||
vim.keymap.set('n', 's', api.node.run.system, opts('Run System'))
|
||||
vim.keymap.set('n', 'S', api.tree.search_node, opts('Search'))
|
||||
vim.keymap.set('n', 'u', api.fs.rename_full, opts('Rename: Full Path'))
|
||||
vim.keymap.set('n', 'U', api.tree.toggle_custom_filter, opts('Toggle Filter: Hidden'))
|
||||
vim.keymap.set('n', 'W', api.tree.collapse_all, opts('Collapse'))
|
||||
vim.keymap.set('n', 'x', api.fs.cut, opts('Cut'))
|
||||
vim.keymap.set('n', 'y', api.fs.copy.filename, opts('Copy Name'))
|
||||
vim.keymap.set('n', 'Y', api.fs.copy.relative_path, opts('Copy Relative Path'))
|
||||
vim.keymap.set('n', '<2-LeftMouse>', api.node.open.edit, opts('Open'))
|
||||
vim.keymap.set('n', '<2-RightMouse>', api.tree.change_root_to_node, opts('CD'))
|
||||
-- END_DEFAULT_ON_ATTACH
|
||||
end
|
||||
''; };
|
||||
view = {
|
||||
side = "right";
|
||||
centralizeSelection = true;
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
width = 40;
|
||||
};
|
||||
};
|
||||
}
|
||||
22
glasshouse-desktop/home/nixvim/config/plugins/plugins.nix
Normal file
22
glasshouse-desktop/home/nixvim/config/plugins/plugins.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
plugins = {
|
||||
nvim-surround.enable = true;
|
||||
indent-blankline.enable = true;
|
||||
treesitter.enable = true;
|
||||
lastplace.enable = true;
|
||||
markdown-preview.enable = true;
|
||||
gitsigns.enable = true;
|
||||
web-devicons.enable = true;
|
||||
endwise.enable = true;
|
||||
marks.enable = true;
|
||||
trouble.enable = true;
|
||||
floaterm.enable = true;
|
||||
fugitive.enable = true;
|
||||
rustaceanvim.enable = true;
|
||||
firenvim.enable = true;
|
||||
dap = {
|
||||
enable = true;
|
||||
extensions.dap-ui.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
12
glasshouse-desktop/home/nixvim/config/plugins/telescope.nix
Normal file
12
glasshouse-desktop/home/nixvim/config/plugins/telescope.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
plugins.telescope = {
|
||||
enable = true;
|
||||
settings = {
|
||||
pickers = {
|
||||
find_files = {
|
||||
hidden = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
390
glasshouse-desktop/home/nixvim/flake.lock
generated
Normal file
390
glasshouse-desktop/home/nixvim/flake.lock
generated
Normal file
@@ -0,0 +1,390 @@
|
||||
{
|
||||
"nodes": {
|
||||
"devshell": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722113426,
|
||||
"narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"revCount": 57,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726153070,
|
||||
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726153070,
|
||||
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726560853,
|
||||
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"nixvim",
|
||||
"flake-compat"
|
||||
],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727514110,
|
||||
"narHash": "sha256-0YRcOxJG12VGDFH8iS8pJ0aYQQUAgo/r3ZAL+cSh9nk=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "85f7a7177c678de68224af3402ab8ee1bcee25c8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"git-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"pre-commit-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727383923,
|
||||
"narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "ffe2d07e771580a005e675108212597e5b367d2d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727507295,
|
||||
"narHash": "sha256-I/FrX1peu4URoj5T5odfuKR2rm4GjYJJpCGF9c0/lDA=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "f2e1c4aa29fc211947c3a7113cba1dd707433b70",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1727348695,
|
||||
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1725233747,
|
||||
"narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1720386169,
|
||||
"narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "194846768975b7ad2c4988bdb82572c00222c0d7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-parts": "flake-parts_2",
|
||||
"git-hooks": "git-hooks",
|
||||
"home-manager": "home-manager",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nuschtosSearch": "nuschtosSearch",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727557953,
|
||||
"narHash": "sha256-xe8JQaNOPTyzWsSlLu2yC6qw4SjOMHrXk4Iq+pIgLhM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "2c4e4681db658deeceb2f781136d7ba1d0009521",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nuschtosSearch": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727452028,
|
||||
"narHash": "sha256-ehl/A4HQFRyqj1Fk7cl+dgSf/2Fb1jLwWJtZaMU6RfU=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"rev": "9f7426e532ef8dfc839c4a3fcc567b13a20a70d3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"gitignore": "gitignore_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727514110,
|
||||
"narHash": "sha256-0YRcOxJG12VGDFH8iS8pJ0aYQQUAgo/r3ZAL+cSh9nk=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "85f7a7177c678de68224af3402ab8ee1bcee25c8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixvim": "nixvim",
|
||||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727431250,
|
||||
"narHash": "sha256-uGRlRT47ecicF9iLD1G3g43jn2e+b5KaMptb59LHnvM=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "879b29ae9a0378904fbbefe0dadaed43c8905754",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
72
glasshouse-desktop/home/nixvim/flake.nix
Normal file
72
glasshouse-desktop/home/nixvim/flake.nix
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
description = "pagedMov's NeoVim configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
pre-commit-hooks = {
|
||||
url = "github:cachix/pre-commit-hooks.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
nixvim,
|
||||
flake-parts,
|
||||
pre-commit-hooks,
|
||||
...
|
||||
}@inputs:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
"aarch64-darwin"
|
||||
"x86_64-darwin"
|
||||
];
|
||||
|
||||
perSystem =
|
||||
{
|
||||
system,
|
||||
pkgs,
|
||||
self',
|
||||
...
|
||||
}:
|
||||
let
|
||||
nixvim' = nixvim.legacyPackages.${system};
|
||||
nvim = nixvim'.makeNixvimWithModule {
|
||||
inherit pkgs;
|
||||
module = ./config;
|
||||
};
|
||||
in
|
||||
{
|
||||
checks = {
|
||||
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
statix.enable = true;
|
||||
nixfmt-rfc-style.enable = true;
|
||||
deadnix = {
|
||||
enable = true;
|
||||
settings = {
|
||||
edit = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
formatter = pkgs.nixfmt-rfc-style;
|
||||
|
||||
packages.default = nvim;
|
||||
|
||||
devShells = {
|
||||
default = with pkgs; mkShell { inherit (self'.checks.pre-commit-check) shellHook; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
53
glasshouse-desktop/home/scripts/scripts.nix
Normal file
53
glasshouse-desktop/home/scripts/scripts.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{pkgs, ...}: let
|
||||
wall-change = pkgs.writeShellScriptBin "wall-change" (builtins.readFile ./scripts/wall-change.sh);
|
||||
wallpaper-picker = pkgs.writeShellScriptBin "wallpaper-picker" (builtins.readFile ./scripts/wallpaper-picker.sh);
|
||||
|
||||
runbg = pkgs.writeShellScriptBin "runbg" (builtins.readFile ./scripts/runbg.sh);
|
||||
music = pkgs.writeShellScriptBin "music" (builtins.readFile ./scripts/music.sh);
|
||||
lofi = pkgs.writeScriptBin "lofi" (builtins.readFile ./scripts/lofi.sh);
|
||||
|
||||
toggle_blur = pkgs.writeScriptBin "toggle_blur" (builtins.readFile ./scripts/toggle_blur.sh);
|
||||
toggle_oppacity = pkgs.writeScriptBin "toggle_oppacity" (builtins.readFile ./scripts/toggle_oppacity.sh);
|
||||
|
||||
maxfetch = pkgs.writeScriptBin "maxfetch" (builtins.readFile ./scripts/maxfetch.sh);
|
||||
|
||||
compress = pkgs.writeScriptBin "compress" (builtins.readFile ./scripts/compress.sh);
|
||||
extract = pkgs.writeScriptBin "extract" (builtins.readFile ./scripts/extract.sh);
|
||||
|
||||
shutdown-script = pkgs.writeScriptBin "shutdown-script" (builtins.readFile ./scripts/shutdown-script.sh);
|
||||
|
||||
show-keybinds = pkgs.writeScriptBin "show-keybinds" (builtins.readFile ./scripts/keybinds.sh);
|
||||
|
||||
vm-start = pkgs.writeScriptBin "vm-start" (builtins.readFile ./scripts/vm-start.sh);
|
||||
|
||||
ascii = pkgs.writeScriptBin "ascii" (builtins.readFile ./scripts/ascii.sh);
|
||||
|
||||
record = pkgs.writeScriptBin "record" (builtins.readFile ./scripts/record.sh);
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
wall-change
|
||||
wallpaper-picker
|
||||
|
||||
runbg
|
||||
music
|
||||
lofi
|
||||
|
||||
toggle_blur
|
||||
toggle_oppacity
|
||||
|
||||
maxfetch
|
||||
|
||||
compress
|
||||
extract
|
||||
|
||||
shutdown-script
|
||||
|
||||
show-keybinds
|
||||
|
||||
vm-start
|
||||
|
||||
ascii
|
||||
|
||||
record
|
||||
];
|
||||
}
|
||||
45
glasshouse-desktop/home/scripts/scripts/ascii.sh
Executable file
45
glasshouse-desktop/home/scripts/scripts/ascii.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
RED=$(tput setaf 1)
|
||||
GREEN=$(tput setaf 2)
|
||||
BLUE=$(tput setaf 4)
|
||||
MAGENTA=$(tput setaf 5)
|
||||
CYAN=$(tput setaf 6)
|
||||
NORMAL=$(tput sgr0)
|
||||
|
||||
echo -e "┌─────────────┬─────────────┬─────────────┬─────────────┐"
|
||||
echo -e "│ ${BLUE}Dec${NORMAL} ${GREEN}Hex${NORMAL} Chr │ ${BLUE}Dec${NORMAL} ${GREEN}Hex${NORMAL} Chr │ ${BLUE}Dec${NORMAL} ${GREEN}Hex${NORMAL} Chr │ ${BLUE}Dec${NORMAL} ${GREEN}Hex${NORMAL} Chr │"
|
||||
echo -e "├─────────────┼─────────────┼─────────────┼─────────────┤"
|
||||
echo -e "│ 0 0 \033[2mNUL\033[0m\033[0m │ 32 20 │ 64 40 ${CYAN}@${NORMAL} │ 96 60 ${CYAN}\`${NORMAL} │"
|
||||
echo -e "│ 1 1 \033[2mSOH\033[0m │ 33 21 ${CYAN}!${NORMAL} │ 65 41 ${GREEN}A${NORMAL} │ 97 61 ${GREEN}a${NORMAL} │"
|
||||
echo -e "│ 2 2 \033[2mSTX\033[0m │ 34 22 ${CYAN}\"${NORMAL} │ 66 42 ${GREEN}B${NORMAL} │ 98 62 ${GREEN}b${NORMAL} │"
|
||||
echo -e "│ 3 3 \033[2mETX\033[0m │ 35 23 ${CYAN}#${NORMAL} │ 67 43 ${GREEN}C${NORMAL} │ 99 63 ${GREEN}c${NORMAL} │"
|
||||
echo -e "│ 4 4 \033[2mEOT\033[0m │ 36 24 ${CYAN}\$${NORMAL} │ 68 44 ${GREEN}D${NORMAL} │ 100 64 ${GREEN}d${NORMAL} │"
|
||||
echo -e "│ 5 5 \033[2mENQ\033[0m │ 37 25 ${CYAN}%${NORMAL} │ 69 45 ${GREEN}E${NORMAL} │ 101 65 ${GREEN}e${NORMAL} │"
|
||||
echo -e "│ 6 6 \033[2mACK\033[0m │ 38 26 ${CYAN}&${NORMAL} │ 70 46 ${GREEN}F${NORMAL} │ 102 66 ${GREEN}f${NORMAL} │"
|
||||
echo -e "│ 7 7 \033[2mBEL\033[0m │ 39 27 ${CYAN}'${NORMAL} │ 71 47 ${GREEN}G${NORMAL} │ 103 67 ${GREEN}g${NORMAL} │"
|
||||
echo -e "│ 8 8 \033[2mBS\033[0m │ 40 28 ${CYAN}(${NORMAL} │ 72 48 ${GREEN}H${NORMAL} │ 104 68 ${GREEN}h${NORMAL} │"
|
||||
echo -e "│ 9 9 \033[2mHT\033[0m │ 41 29 ${CYAN})${NORMAL} │ 73 49 ${GREEN}I${NORMAL} │ 105 69 ${GREEN}i${NORMAL} │"
|
||||
echo -e "│ 10 A \033[2mLF\033[0m │ 42 2A ${CYAN}*${NORMAL} │ 74 4A ${GREEN}J${NORMAL} │ 106 6A ${GREEN}j${NORMAL} │"
|
||||
echo -e "│ 11 B \033[2mVT\033[0m │ 43 2B ${CYAN}+${NORMAL} │ 75 4B ${GREEN}K${NORMAL} │ 107 6B ${GREEN}k${NORMAL} │"
|
||||
echo -e "│ 12 C \033[2mFF\033[0m │ 44 2C ${CYAN},${NORMAL} │ 76 4C ${GREEN}L${NORMAL} │ 108 6C ${GREEN}l${NORMAL} │"
|
||||
echo -e "│ 13 D \033[2mCR\033[0m │ 45 2D ${CYAN}-${NORMAL} │ 77 4D ${GREEN}M${NORMAL} │ 109 6D ${GREEN}m${NORMAL} │"
|
||||
echo -e "│ 14 E \033[2mSO\033[0m │ 46 2E ${CYAN}.${NORMAL} │ 78 4E ${GREEN}N${NORMAL} │ 110 6E ${GREEN}n${NORMAL} │"
|
||||
echo -e "│ 15 F \033[2mSI\033[0m │ 47 2F ${CYAN}/${NORMAL} │ 79 4F ${GREEN}O${NORMAL} │ 111 6F ${GREEN}o${NORMAL} │"
|
||||
echo -e "│ 16 10 \033[2mDLE\033[0m │ 48 30 ${RED}0${NORMAL} │ 80 50 ${GREEN}P${NORMAL} │ 112 70 ${GREEN}p${NORMAL} │"
|
||||
echo -e "│ 17 11 \033[2mDC1\033[0m │ 49 31 ${RED}1${NORMAL} │ 81 51 ${GREEN}Q${NORMAL} │ 113 71 ${GREEN}q${NORMAL} │"
|
||||
echo -e "│ 18 12 \033[2mDC2\033[0m │ 50 32 ${RED}2${NORMAL} │ 82 52 ${GREEN}R${NORMAL} │ 114 72 ${GREEN}r${NORMAL} │"
|
||||
echo -e "│ 19 13 \033[2mDC3\033[0m │ 51 33 ${RED}3${NORMAL} │ 83 53 ${GREEN}S${NORMAL} │ 115 73 ${GREEN}s${NORMAL} │"
|
||||
echo -e "│ 20 14 \033[2mDC4\033[0m │ 52 34 ${RED}4${NORMAL} │ 84 54 ${GREEN}T${NORMAL} │ 116 74 ${GREEN}t${NORMAL} │"
|
||||
echo -e "│ 21 15 \033[2mNAK\033[0m │ 53 35 ${RED}5${NORMAL} │ 85 55 ${GREEN}U${NORMAL} │ 117 75 ${GREEN}u${NORMAL} │"
|
||||
echo -e "│ 22 16 \033[2mSYN\033[0m │ 54 36 ${RED}6${NORMAL} │ 86 56 ${GREEN}V${NORMAL} │ 118 76 ${GREEN}v${NORMAL} │"
|
||||
echo -e "│ 23 17 \033[2mETB\033[0m │ 55 37 ${RED}7${NORMAL} │ 87 57 ${GREEN}W${NORMAL} │ 119 77 ${GREEN}w${NORMAL} │"
|
||||
echo -e "│ 24 18 \033[2mCAN\033[0m │ 56 38 ${RED}8${NORMAL} │ 88 58 ${GREEN}X${NORMAL} │ 120 78 ${GREEN}x${NORMAL} │"
|
||||
echo -e "│ 25 19 \033[2mEM\033[0m │ 57 39 ${RED}9${NORMAL} │ 89 59 ${GREEN}Y${NORMAL} │ 121 79 ${GREEN}y${NORMAL} │"
|
||||
echo -e "│ 26 1A \033[2mSUB\033[0m │ 58 3A ${CYAN}:${NORMAL} │ 90 5A ${GREEN}Z${NORMAL} │ 122 7A ${GREEN}z${NORMAL} │"
|
||||
echo -e "│ 27 1B \033[2mESC\033[0m │ 59 3B ${CYAN};${NORMAL} │ 91 5B ${CYAN}[${NORMAL} │ 123 7B ${CYAN}{${NORMAL} │"
|
||||
echo -e "│ 28 1C \033[2mFS\033[0m │ 60 3C ${CYAN}<${NORMAL} │ 92 5C ${CYAN}\\${NORMAL} │ 124 7C ${CYAN}|${NORMAL} │"
|
||||
echo -e "│ 29 1D \033[2mGS\033[0m │ 61 3D ${CYAN}=${NORMAL} │ 93 5D ${CYAN}]${NORMAL} │ 125 7D ${CYAN}}${NORMAL} │"
|
||||
echo -e "│ 30 1E \033[2mRS\033[0m │ 62 3E ${CYAN}>${NORMAL} │ 94 5E ${CYAN}^${NORMAL} │ 126 7E ${CYAN}~${NORMAL} │"
|
||||
echo -e "│ 31 1F \033[2mUS\033[0m │ 63 3F ${CYAN}?${NORMAL} │ 95 5F ${CYAN}_${NORMAL} │ 127 7F \033[2mDEL\033[0m │"
|
||||
echo -e "└─────────────┴─────────────┴─────────────┴─────────────┘"
|
||||
10
glasshouse-desktop/home/scripts/scripts/compress.sh
Executable file
10
glasshouse-desktop/home/scripts/scripts/compress.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if (( $# == 1 )) then
|
||||
# echo -ne "Archive name: "
|
||||
# read name
|
||||
# tar -cvzf "$name.tar.gz" $1
|
||||
tar -cvzf "$1.tar.gz" $1
|
||||
else
|
||||
echo "Wrong number of arguments..."
|
||||
fi
|
||||
6
glasshouse-desktop/home/scripts/scripts/extract.sh
Executable file
6
glasshouse-desktop/home/scripts/scripts/extract.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
for i in "$@" ; do
|
||||
tar -xvzf $i
|
||||
break
|
||||
done
|
||||
6
glasshouse-desktop/home/scripts/scripts/keybinds.sh
Executable file
6
glasshouse-desktop/home/scripts/scripts/keybinds.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
config_file=~/.config/hypr/hyprland.conf
|
||||
keybinds=$(grep -oP '(?<=bind=).*' $config_file)
|
||||
keybinds=$(echo "$keybinds" | sed 's/,\([^,]*\)$/ = \1/' | sed 's/, exec//g' | sed 's/^,//g')
|
||||
rofi -dmenu -theme-str 'window {width: 50%;}' <<< "$keybinds"
|
||||
7
glasshouse-desktop/home/scripts/scripts/lofi.sh
Executable file
7
glasshouse-desktop/home/scripts/scripts/lofi.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if (ps aux | grep mpv | grep -v grep > /dev/null) then
|
||||
pkill mpv
|
||||
else
|
||||
runbg mpv --no-video https://www.youtube.com/live/jfKfPfyJRdk?si=OF0HKrYFFj33BzMo
|
||||
fi
|
||||
53
glasshouse-desktop/home/scripts/scripts/maxfetch.sh
Executable file
53
glasshouse-desktop/home/scripts/scripts/maxfetch.sh
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
unicode=" "
|
||||
version="1.2.0"
|
||||
|
||||
_black=$(tput setaf 0)
|
||||
red=$(tput setaf 1)
|
||||
green=$(tput setaf 2)
|
||||
yellow=$(tput setaf 3)
|
||||
blue=$(tput setaf 4)
|
||||
magenta=$(tput setaf 5)
|
||||
cyan=$(tput setaf 6)
|
||||
_white=$(tput setaf 7)
|
||||
_bright=$(tput bold)
|
||||
normal=$(tput sgr0)
|
||||
_underline=$(tput smul)
|
||||
|
||||
up=$(uptime | awk -F'( |,|:)+' '{
|
||||
d=h=m=0;
|
||||
if ($7=="min")
|
||||
m=$6;
|
||||
else {
|
||||
if ($7~/^day/) { d=$6; h=$8; m=$9}
|
||||
else {h=$6;m=$7}
|
||||
}
|
||||
}
|
||||
{ print h+0,"h",m+0,"m" }
|
||||
')
|
||||
up=$(sed -e "s/ h/h/g" <<< ${up})
|
||||
up=$(sed -e "s/ m/m/g" <<< ${up})
|
||||
|
||||
pkgs=$(nix-store --query --requisites /run/current-system | wc -l)
|
||||
|
||||
fetch() {
|
||||
echo "${cyan}$(tput bold) _ ___ ____ ____ ${normal}$(tput sgr0)"
|
||||
echo "${cyan}$(tput bold) / |/ (_)_ __/ __ \/ __/ ${normal}$(tput sgr0)"
|
||||
echo "${cyan}$(tput bold) / / /\ \ / /_/ /\ \ ${normal}$(tput sgr0)"
|
||||
echo "${cyan}$(tput bold) /_/|_/_//_\_"'\\'"____/___/ ${normal}$(tput sgr0)"
|
||||
echo ""
|
||||
echo " ╭─────────────╮ "
|
||||
echo " │ ${red} ${normal} user │ ${red}$(whoami)${normal}"
|
||||
echo " │ ${yellow} ${normal} distro │ ${yellow}$(sed -nE "s@PRETTY_NAME=\"([^\"]*)\"@\1@p" /etc/os-release)${normal} "
|
||||
echo " │ ${green} ${normal} kernel │ ${green}$(uname -r)${normal} "
|
||||
echo " │ ${cyan} ${normal} de/wm │ ${cyan}$XDG_CURRENT_DESKTOP${normal} "
|
||||
echo " │ ${blue} ${normal} uptime │ ${blue}${up}${normal} "
|
||||
echo " │ ${magenta} ${normal} shell │ ${magenta}$(echo ${SHELL##*/})${normal} "
|
||||
echo " │ ${red} ${normal} pkgs │ ${red}${pkgs}${normal} "
|
||||
echo " ├─────────────┤ "
|
||||
echo " │ ${_white} ${normal}colors │${_white}$unicode${normal}${red}$unicode${normal}${yellow}$unicode${normal}${green}$unicode${normal}${cyan}$unicode${normal}${blue}$unicode${normal}${magenta}$unicode${normal}${_black}$unicode${normal}"
|
||||
echo " ╰─────────────╯ "
|
||||
}
|
||||
|
||||
fetch && exit 0
|
||||
10
glasshouse-desktop/home/scripts/scripts/music.sh
Executable file
10
glasshouse-desktop/home/scripts/scripts/music.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if (ps aux | grep audacious | grep -v grep > /dev/null) then
|
||||
pkill audacious
|
||||
else
|
||||
hyprctl dispatch exec "[workspace 5 silent] audacious -t ~/Music/playlist"
|
||||
sleep 0.5
|
||||
audtool playlist-repeat-status |grep "on" || audtool playlist-repeat-toggle
|
||||
audtool playlist-shuffle-status|grep "on" || audtool playlist-shuffle-toggle
|
||||
fi
|
||||
Submodule glasshouse-desktop/home/scripts/scripts/nixos-config added at 1d8001a7a8
3
glasshouse-desktop/home/scripts/scripts/power-menu.sh
Executable file
3
glasshouse-desktop/home/scripts/scripts/power-menu.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
rofi -show p -modi p:'rofi-power-menu' -theme-str 'window {width: 10em; height: 15em;} listview {lines: 5;}'
|
||||
125
glasshouse-desktop/home/scripts/scripts/record.sh
Executable file
125
glasshouse-desktop/home/scripts/scripts/record.sh
Executable file
@@ -0,0 +1,125 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
TMP_FILE_UNOPTIMIZED="/tmp/recording_unoptimized.gif"
|
||||
TMP_PALETTE_FILE="/tmp/palette.png"
|
||||
TMP_MP4_FILE="/tmp/recording.mp4"
|
||||
TMP_GIF_RESULT="/tmp/gif_result"
|
||||
APP_NAME="Recorder"
|
||||
|
||||
OUT_DIR="$HOME/Videos"
|
||||
filename=$(date +"%Y-%m-%d_%H-%M-%S")
|
||||
FILENAME="$OUT_DIR/$filename."
|
||||
|
||||
if [ ! -d "$OUT_DIR" ]; then
|
||||
mkdir -p "$OUT_DIR"
|
||||
fi
|
||||
|
||||
is_recorder_running() {
|
||||
pgrep -x wf-recorder >/dev/null
|
||||
}
|
||||
|
||||
convert_to_gif() {
|
||||
ffmpeg -i "$TMP_MP4_FILE" -filter_complex "[0:v] palettegen" "$TMP_PALETTE_FILE"
|
||||
ffmpeg -i "$TMP_MP4_FILE" -i "$TMP_PALETTE_FILE" -filter_complex "[0:v] fps=10,scale=1400:-1,setpts=0.5*PTS [new];[new][1:v] paletteuse" "$TMP_FILE_UNOPTIMIZED"
|
||||
if [ -f "$TMP_PALETTE_FILE" ]; then
|
||||
rm "$TMP_PALETTE_FILE"
|
||||
fi
|
||||
if [ -f "$TMP_MP4_FILE" ]; then
|
||||
rm "$TMP_MP4_FILE"
|
||||
fi
|
||||
gifsicle -O3 --lossy=100 -i "$TMP_FILE_UNOPTIMIZED" -o "$TMP_GIF_RESULT"
|
||||
if [ -f "$TMP_FILE_UNOPTIMIZED" ]; then
|
||||
rm "$TMP_FILE_UNOPTIMIZED"
|
||||
fi
|
||||
}
|
||||
|
||||
notify() {
|
||||
notify-send -a "$APP_NAME" "$1" "$2" -t 5000
|
||||
}
|
||||
|
||||
screen() {
|
||||
notify "Starting Recording" "Your screen is being recorded"
|
||||
timeout 600 wf-recorder -F format=rgb24 -x rgb24 -p qp=0 -p crf=0 -p preset=slow -c libx264rgb -f "$TMP_MP4_FILE"
|
||||
}
|
||||
|
||||
area() {
|
||||
GEOMETRY=$(slurp)
|
||||
if [[ ! -z "$GEOMETRY" ]]; then
|
||||
notify "Starting Recording" "Your screen is being recorded"
|
||||
timeout 600 wf-recorder -F format=rgb24 -x rgb24 -p qp=0 -p crf=0 -p preset=slow -c libx264rgb -g "$GEOMETRY" -f "$TMP_MP4_FILE"
|
||||
fi
|
||||
}
|
||||
|
||||
gif() {
|
||||
touch /tmp/recording_gif
|
||||
area
|
||||
}
|
||||
|
||||
stop() {
|
||||
if is_recorder_running; then
|
||||
kill $(pgrep -x wf-recorder)
|
||||
|
||||
if [[ -f /tmp/recording_gif ]] then
|
||||
notify "Stopped Recording" "Starting GIF conversion phase..."
|
||||
FILENAME+="gif"
|
||||
convert_to_gif
|
||||
SavePath=$( zenity --file-selection --save --file-filter=*.gif --filename="$OUT_DIR"'/.gif' )
|
||||
if [ "$SavePath" == "" ]; then
|
||||
SavePath="$FILENAME"
|
||||
fi
|
||||
[[ $SavePath =~ \.gif$ ]] || SavePath+='.gif'
|
||||
mv $TMP_GIF_RESULT $SavePath
|
||||
wl-copy -t image/png < $SavePath
|
||||
notify "GIF conversion completed" "GIF saved to $SavePath"
|
||||
else
|
||||
FILENAME+="mp4"
|
||||
SavePath=$( zenity --file-selection --save --file-filter=*.mp4 --filename="$OUT_DIR"'/.mp4' )
|
||||
if [ "$SavePath" == "" ]; then
|
||||
SavePath="$FILENAME"
|
||||
fi
|
||||
[[ $SavePath =~ \.mp4$ ]] || SavePath+='.mp4'
|
||||
mv $TMP_MP4_FILE $SavePath
|
||||
wl-copy -t video/mp4 < $SavePath
|
||||
notify "Stopped Recording" "Video saved to $SavePath"
|
||||
fi
|
||||
|
||||
[[ -f $TMP_FILE_UNOPTIMIZED ]] && rm -f "$TMP_FILE_UNOPTIMIZED"
|
||||
[[ -f $TMP_PALETTE_FILE ]] && rm -f "$TMP_PALETTE_FILE"
|
||||
[[ -f $TMP_GIF_RESULT ]] && rm -f "$TMP_GIF_RESULT"
|
||||
[[ -f $TMP_MP4_FILE ]] && rm -f "$TMP_MP4_FILE"
|
||||
[[ -f /tmp/recording_gif ]] && rm -f /tmp/recording_gif
|
||||
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
if is_recorder_running; then
|
||||
stop
|
||||
fi
|
||||
|
||||
if [ "$1" != "stop" ]; then
|
||||
[[ -f $TMP_FILE_UNOPTIMIZED ]] && rm -f "$TMP_FILE_UNOPTIMIZED"
|
||||
[[ -f $TMP_PALETTE_FILE ]] && rm -f "$TMP_PALETTE_FILE"
|
||||
[[ -f $TMP_GIF_RESULT ]] && rm -f "$TMP_GIF_RESULT"
|
||||
[[ -f $TMP_MP4_FILE ]] && rm -f "$TMP_MP4_FILE"
|
||||
[[ -f /tmp/recording_gif ]] && rm -f /tmp/recording_gif
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
screen)
|
||||
screen
|
||||
;;
|
||||
area)
|
||||
area
|
||||
;;
|
||||
gif)
|
||||
gif
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {screen|area|gif|stop}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
281
glasshouse-desktop/home/scripts/scripts/rofi-power-menu.sh
Executable file
281
glasshouse-desktop/home/scripts/scripts/rofi-power-menu.sh
Executable file
@@ -0,0 +1,281 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script defines just a mode for rofi instead of being a self-contained
|
||||
# executable that launches rofi by itself. This makes it more flexible than
|
||||
# running rofi inside this script as now the user can call rofi as one pleases.
|
||||
# For instance:
|
||||
#
|
||||
# rofi -show powermenu -modi powermenu:./rofi-power-menu
|
||||
#
|
||||
# See README.md for more information.
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
# All supported choices
|
||||
all=(shutdown reboot suspend hibernate lockscreen)
|
||||
|
||||
# By default, show all (i.e., just copy the array)
|
||||
show=("${all[@]}")
|
||||
|
||||
declare -A texts
|
||||
texts[lockscreen]="lock screen"
|
||||
texts[switchuser]="switch user"
|
||||
texts[logout]="log out"
|
||||
texts[suspend]="suspend"
|
||||
texts[hibernate]="hibernate"
|
||||
texts[reboot]="reboot"
|
||||
texts[shutdown]="shut down"
|
||||
|
||||
declare -A icons
|
||||
icons[lockscreen]="\Uf033e"
|
||||
icons[switchuser]="\Uf0019"
|
||||
icons[logout]="\Uf0343"
|
||||
icons[suspend]="\Uf04b2"
|
||||
icons[hibernate]="\Uf02ca"
|
||||
icons[reboot]="\Uf0709"
|
||||
icons[shutdown]="\Uf0425"
|
||||
icons[cancel]="\Uf0156"
|
||||
|
||||
declare -A actions
|
||||
actions[lockscreen]="hyprlock"
|
||||
#actions[switchuser]="???"
|
||||
actions[logout]="sway exit"
|
||||
actions[suspend]="systemctl suspend"
|
||||
actions[hibernate]="systemctl hibernate"
|
||||
actions[reboot]="systemctl reboot"
|
||||
actions[shutdown]="systemctl poweroff"
|
||||
|
||||
# By default, ask for confirmation for actions that are irreversible
|
||||
confirmations=(reboot shutdown hibernate)
|
||||
|
||||
# By default, no dry run
|
||||
dryrun=false
|
||||
showsymbols=true
|
||||
showtext=true
|
||||
|
||||
function check_valid {
|
||||
option="$1"
|
||||
shift 1
|
||||
for entry in "${@}"
|
||||
do
|
||||
if [ -z "${actions[$entry]+x}" ]
|
||||
then
|
||||
echo "Invalid choice in $1: $entry" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Parse command-line options
|
||||
parsed=$(getopt --options=h --longoptions=help,dry-run,confirm:,choices:,choose:,symbols,no-symbols,text,no-text,symbols-font: --name "$0" -- "$@")
|
||||
if [ $? -ne 0 ]; then
|
||||
echo 'Terminating...' >&2
|
||||
exit 1
|
||||
fi
|
||||
eval set -- "$parsed"
|
||||
unset parsed
|
||||
while true; do
|
||||
case "$1" in
|
||||
"-h"|"--help")
|
||||
echo "rofi-power-menu - a power menu mode for Rofi"
|
||||
echo
|
||||
echo "Usage: rofi-power-menu [--choices CHOICES] [--confirm CHOICES]"
|
||||
echo " [--choose CHOICE] [--dry-run] [--symbols|--no-symbols]"
|
||||
echo
|
||||
echo "Use with Rofi in script mode. For instance, to ask for shutdown or reboot:"
|
||||
echo
|
||||
echo " rofi -show menu -modi \"menu:rofi-power-menu --choices=shutdown/reboot\""
|
||||
echo
|
||||
echo "Available options:"
|
||||
echo " --dry-run Don't perform the selected action but print it to stderr."
|
||||
echo " --choices CHOICES Show only the selected choices in the given order. Use /"
|
||||
echo " as the separator. Available choices are lockscreen,"
|
||||
echo " logout,suspend, hibernate, reboot and shutdown. By"
|
||||
echo " default, all available choices are shown."
|
||||
echo " --confirm CHOICES Require confirmation for the gives choices only. Use / as"
|
||||
echo " the separator. Available choices are lockscreen, logout,"
|
||||
echo " suspend, hibernate, reboot and shutdown. By default, only"
|
||||
echo " irreversible actions logout, reboot and shutdown require"
|
||||
echo " confirmation."
|
||||
echo " --choose CHOICE Preselect the given choice and only ask for a"
|
||||
echo " confirmation (if confirmation is set to be requested). It"
|
||||
echo " is strongly recommended to combine this option with"
|
||||
echo " --confirm=CHOICE if the choice wouldn't require"
|
||||
echo " confirmation by default. Available choices are"
|
||||
echo " lockscreen, logout, suspend, hibernate, reboot and"
|
||||
echo " shutdown."
|
||||
echo " --[no-]symbols Show Unicode symbols or not. Requires a font with support"
|
||||
echo " for the symbols. Use, for instance, fonts from the"
|
||||
echo " Nerdfonts collection. By default, they are shown"
|
||||
echo " --[no-]text Show text description or not."
|
||||
echo " --symbols-font FONT Use the given font for symbols. By default, the symbols"
|
||||
echo " use the same font as the text. That font is configured"
|
||||
echo " with rofi."
|
||||
echo " -h,--help Show this help text."
|
||||
exit 0
|
||||
;;
|
||||
"--dry-run")
|
||||
dryrun=true
|
||||
shift 1
|
||||
;;
|
||||
"--confirm")
|
||||
IFS='/' read -ra confirmations <<< "$2"
|
||||
check_valid "$1" "${confirmations[@]}"
|
||||
shift 2
|
||||
;;
|
||||
"--choices")
|
||||
IFS='/' read -ra show <<< "$2"
|
||||
check_valid "$1" "${show[@]}"
|
||||
shift 2
|
||||
;;
|
||||
"--choose")
|
||||
# Check that the choice is valid
|
||||
check_valid "$1" "$2"
|
||||
selectionID="$2"
|
||||
shift 2
|
||||
;;
|
||||
"--symbols")
|
||||
showsymbols=true
|
||||
shift 1
|
||||
;;
|
||||
"--no-symbols")
|
||||
showsymbols=false
|
||||
shift 1
|
||||
;;
|
||||
"--text")
|
||||
showtext=true
|
||||
shift 1
|
||||
;;
|
||||
"--no-text")
|
||||
showtext=false
|
||||
shift 1
|
||||
;;
|
||||
"--symbols-font")
|
||||
symbols_font="$2"
|
||||
shift 2
|
||||
;;
|
||||
"--")
|
||||
shift
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo "Internal error" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$showsymbols" = "false" -a "$showtext" = "false" ]
|
||||
then
|
||||
echo "Invalid options: cannot have --no-symbols and --no-text enabled at the same time." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Define the messages after parsing the CLI options so that it is possible to
|
||||
# configure them in the future.
|
||||
|
||||
function write_message {
|
||||
if [ -z ${symbols_font+x} ];
|
||||
then
|
||||
icon="<span font_size=\"medium\">$1</span>"
|
||||
else
|
||||
icon="<span font=\"${symbols_font}\" font_size=\"medium\">$1</span>"
|
||||
fi
|
||||
text="<span font_size=\"medium\">$2</span>"
|
||||
if [ "$showsymbols" = "true" ]
|
||||
then
|
||||
if [ "$showtext" = "true" ]
|
||||
then
|
||||
echo -n "\u200e$icon \u2068$text\u2069"
|
||||
else
|
||||
echo -n "\u200e$icon"
|
||||
fi
|
||||
else
|
||||
echo -n "$text"
|
||||
fi
|
||||
}
|
||||
|
||||
function print_selection {
|
||||
echo -e "$1" | $(read -r -d '' entry; echo "echo $entry")
|
||||
}
|
||||
|
||||
declare -A messages
|
||||
declare -A confirmationMessages
|
||||
for entry in "${all[@]}"
|
||||
do
|
||||
messages[$entry]=$(write_message "${icons[$entry]}" "${texts[$entry]^}")
|
||||
done
|
||||
for entry in "${all[@]}"
|
||||
do
|
||||
confirmationMessages[$entry]=$(write_message "${icons[$entry]}" "Yes, ${texts[$entry]}")
|
||||
done
|
||||
confirmationMessages[cancel]=$(write_message "${icons[cancel]}" "No, cancel")
|
||||
|
||||
if [ $# -gt 0 ]
|
||||
then
|
||||
# If arguments given, use those as the selection
|
||||
selection="${@}"
|
||||
else
|
||||
# Otherwise, use the CLI passed choice if given
|
||||
if [ -n "${selectionID+x}" ]
|
||||
then
|
||||
selection="${messages[$selectionID]}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Don't allow custom entries
|
||||
echo -e "\0no-custom\x1ftrue"
|
||||
# Use markup
|
||||
echo -e "\0markup-rows\x1ftrue"
|
||||
|
||||
if [ -z "${selection+x}" ]
|
||||
then
|
||||
echo -e "\0prompt\x1fPower menu"
|
||||
for entry in "${show[@]}"
|
||||
do
|
||||
echo -e "${messages[$entry]}\0icon\x1f${icons[$entry]}"
|
||||
done
|
||||
else
|
||||
for entry in "${show[@]}"
|
||||
do
|
||||
if [ "$selection" = "$(print_selection "${messages[$entry]}")" ]
|
||||
then
|
||||
# Check if the selected entry is listed in confirmation requirements
|
||||
for confirmation in "${confirmations[@]}"
|
||||
do
|
||||
if [ "$entry" = "$confirmation" ]
|
||||
then
|
||||
# Ask for confirmation
|
||||
echo -e "\0prompt\x1fAre you sure"
|
||||
echo -e "${confirmationMessages[$entry]}\0icon\x1f${icons[$entry]}"
|
||||
echo -e "${confirmationMessages[cancel]}\0icon\x1f${icons[cancel]}"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
# If not, then no confirmation is required, so mark confirmed
|
||||
selection=$(print_selection "${confirmationMessages[$entry]}")
|
||||
fi
|
||||
if [ "$selection" = "$(print_selection "${confirmationMessages[$entry]}")" ]
|
||||
then
|
||||
if [ $dryrun = true ]
|
||||
then
|
||||
# Tell what would have been done
|
||||
echo "Selected: $entry" >&2
|
||||
else
|
||||
# Perform the action
|
||||
pkill -9 rofi
|
||||
${actions[$entry]}
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
if [ "$selection" = "$(print_selection "${confirmationMessages[cancel]}")" ]
|
||||
then
|
||||
# Do nothing
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
# The selection didn't match anything, so raise an error
|
||||
echo "Invalid selection: $selection" >&2
|
||||
exit 1
|
||||
fi
|
||||
16
glasshouse-desktop/home/scripts/scripts/runbg.sh
Executable file
16
glasshouse-desktop/home/scripts/scripts/runbg.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
[ $# -eq 0 ] && { # $# is number of args
|
||||
echo "$(basename $0): missing command" >&2
|
||||
exit 1
|
||||
}
|
||||
prog="$(which "$1")" # see below
|
||||
[ -z "$prog" ] && {
|
||||
echo "$(basename $0): unknown command: $1" >&2
|
||||
exit 1
|
||||
}
|
||||
shift # remove $1, now $prog, from args
|
||||
tty -s && exec </dev/null # if stdin is a terminal, redirect from null
|
||||
tty -s <&1 && exec >/dev/null # if stdout is a terminal, redirect to null
|
||||
tty -s <&2 && exec 2>&1 # stderr to stdout (which might not be null)
|
||||
"$prog" "$@" & # $@ is all args
|
||||
34
glasshouse-desktop/home/scripts/scripts/screenshot.sh
Executable file
34
glasshouse-desktop/home/scripts/scripts/screenshot.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
dir="$HOME/Pictures/Screenshots"
|
||||
time=$(date +'%Y_%m_%d_at_%Hh%Mm%Ss')
|
||||
file="${dir}/Screenshot_${time}.png"
|
||||
|
||||
copy() {
|
||||
grimblast --notify --freeze copy area
|
||||
}
|
||||
|
||||
save() {
|
||||
grimblast --notify --freeze save area "$file"
|
||||
}
|
||||
|
||||
swappy_() {
|
||||
grimblast --notify --freeze save area "$file"
|
||||
swappy -f "$file"
|
||||
}
|
||||
|
||||
if [[ ! -d "$dir" ]]; then
|
||||
mkdir -p "$dir"
|
||||
fi
|
||||
|
||||
if [[ "$1" == "--copy" ]]; then
|
||||
copy
|
||||
elif [[ "$1" == "--save" ]]; then
|
||||
save
|
||||
elif [[ "$1" == "--swappy" ]]; then
|
||||
swappy_
|
||||
else
|
||||
echo -e "Available Options: --copy --save --swappy"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
15
glasshouse-desktop/home/scripts/scripts/shutdown-script.sh
Executable file
15
glasshouse-desktop/home/scripts/scripts/shutdown-script.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
respond="$(echo " Shutdown\n Restart\n Cancel" | rofi -dmenu)"
|
||||
|
||||
if [ $respond = ' Shutdown' ]
|
||||
then
|
||||
echo "shutdown"
|
||||
shutdown now
|
||||
elif [ $respond = ' Restart' ]
|
||||
then
|
||||
echo "restart"
|
||||
reboot
|
||||
else
|
||||
notify-send "cancel shutdown"
|
||||
fi
|
||||
7
glasshouse-desktop/home/scripts/scripts/toggle_blur.sh
Executable file
7
glasshouse-desktop/home/scripts/scripts/toggle_blur.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if hyprctl getoption decoration:blur:enabled | grep "int: 1" >/dev/null ; then
|
||||
hyprctl keyword decoration:blur:enabled false >/dev/null
|
||||
else
|
||||
hyprctl keyword decoration:blur:enabled true >/dev/null
|
||||
fi
|
||||
5
glasshouse-desktop/home/scripts/scripts/toggle_float.sh
Executable file
5
glasshouse-desktop/home/scripts/scripts/toggle_float.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
hyprctl dispatch togglefloating
|
||||
hyprctl dispatch resizeactive exact 950 600
|
||||
hyprctl dispatch centerwindow
|
||||
9
glasshouse-desktop/home/scripts/scripts/toggle_oppacity.sh
Executable file
9
glasshouse-desktop/home/scripts/scripts/toggle_oppacity.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if hyprctl getoption decoration:active_opacity | grep "float: 1" >/dev/null ; then
|
||||
hyprctl keyword decoration:active_opacity 0.90 >/dev/null
|
||||
hyprctl keyword decoration:inactive_opacity 0.90 >/dev/null
|
||||
else
|
||||
hyprctl keyword decoration:active_opacity 1 >/dev/null
|
||||
hyprctl keyword decoration:inactive_opacity 1 >/dev/null
|
||||
fi
|
||||
10
glasshouse-desktop/home/scripts/scripts/toggle_waybar.sh
Executable file
10
glasshouse-desktop/home/scripts/scripts/toggle_waybar.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SERVICE=".waybar-wrapped"
|
||||
|
||||
if pgrep -x "$SERVICE" >/dev/null
|
||||
then
|
||||
pkill -9 waybar
|
||||
else
|
||||
runbg waybar
|
||||
fi
|
||||
11
glasshouse-desktop/home/scripts/scripts/vm-start.sh
Executable file
11
glasshouse-desktop/home/scripts/scripts/vm-start.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
# VM name
|
||||
vm_name="win10"
|
||||
export LIBVIRT_DEFAULT_URI="qemu:///system"
|
||||
|
||||
# change workspace
|
||||
hyprctl dispatch workspace 6
|
||||
|
||||
virsh start ${vm_name}
|
||||
virt-viewer -f -w -a ${vm_name}
|
||||
9
glasshouse-desktop/home/scripts/scripts/wall-change.sh
Executable file
9
glasshouse-desktop/home/scripts/scripts/wall-change.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PIDS=$(pgrep -f "swaybg")
|
||||
|
||||
swaybg -m fill -i $1 &
|
||||
|
||||
if [ -n "$PIDS" ]; then
|
||||
echo "$PIDS" | xargs kill
|
||||
fi
|
||||
12
glasshouse-desktop/home/scripts/scripts/wallpaper-picker.sh
Executable file
12
glasshouse-desktop/home/scripts/scripts/wallpaper-picker.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
wallpaper_path=$HOME/Pictures/wallpapers
|
||||
wallpapers_folder=$HOME/Pictures/wallpapers/others
|
||||
wallpaper_name="$(ls $wallpapers_folder | rofi -dmenu || pkill rofi)"
|
||||
if [[ -f $wallpapers_folder/$wallpaper_name ]]; then
|
||||
find ~/Pictures/wallpapers -maxdepth 1 -type f -delete
|
||||
cp $wallpapers_folder/$wallpaper_name $wallpaper_path/$wallpaper_name
|
||||
wall-change $wallpaper_path/$wallpaper_name
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
24
glasshouse-desktop/home/spicetify.nix
Normal file
24
glasshouse-desktop/home/spicetify.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ pkgs, lib, inputs, ...}:
|
||||
|
||||
let
|
||||
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
|
||||
in
|
||||
{
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"spotify"
|
||||
];
|
||||
|
||||
imports = [inputs.spicetify-nix.homeManagerModules.default];
|
||||
|
||||
programs.spicetify = {
|
||||
enable = true;
|
||||
enabledExtensions = with spicePkgs.extensions; [
|
||||
adblock
|
||||
hidePodcasts
|
||||
shuffle # shuffle+ (special characters are sanitized out of extension names)
|
||||
];
|
||||
theme = spicePkgs.themes.catppuccin;
|
||||
colorScheme = "mocha";
|
||||
};
|
||||
}
|
||||
37
glasshouse-desktop/home/starship.nix
Normal file
37
glasshouse-desktop/home/starship.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ lib, inputs, ... }:
|
||||
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
|
||||
settings = {
|
||||
# right_format = "$cmd_duration";
|
||||
|
||||
directory = {
|
||||
format = "[ ](bold #89b4fa)[ $path ]($style)";
|
||||
style = "bold #b4befe";
|
||||
};
|
||||
|
||||
character = {
|
||||
success_symbol = "[ ](bold #89b4fa)[ ➜](bold green)";
|
||||
error_symbol = "[ ](bold #89b4fa)[ ➜](bold red)";
|
||||
# error_symbol = "[ ](bold #89dceb)[ ✗](bold red)";
|
||||
};
|
||||
|
||||
cmd_duration = {
|
||||
format = "[ $duration]($style)";
|
||||
disabled = false;
|
||||
style = "bg:none fg:#f9e2af";
|
||||
show_notifications = false;
|
||||
min_time_to_notify = 60000;
|
||||
};
|
||||
|
||||
palette = "catppuccin_mocha";
|
||||
} // builtins.fromTOML (builtins.readFile "${inputs.catppuccin-starship}/palettes/mocha.toml");
|
||||
};
|
||||
}
|
||||
|
||||
136
glasshouse-desktop/home/swaync/config.json
Normal file
136
glasshouse-desktop/home/swaync/config.json
Normal file
@@ -0,0 +1,136 @@
|
||||
{
|
||||
"positionX": "right",
|
||||
"positionY": "top",
|
||||
"layer": "overlay",
|
||||
"layer-shell": "true",
|
||||
"cssPriority": "application",
|
||||
"control-center-margin-top": 10,
|
||||
"control-center-margin-bottom": 10,
|
||||
"control-center-margin-right": 10,
|
||||
"control-center-margin-left": 10,
|
||||
"notification-icon-size": 64,
|
||||
"notification-body-image-height": 128,
|
||||
"notification-body-image-width": 200,
|
||||
"timeout": 10,
|
||||
"timeout-low": 5,
|
||||
"timeout-critical": 0,
|
||||
"fit-to-screen": true,
|
||||
"control-center-width": 400,
|
||||
"control-center-height": 650,
|
||||
"notification-window-width": 350,
|
||||
"keyboard-shortcuts": true,
|
||||
"image-visibility": "when-available",
|
||||
"transition-time": 200,
|
||||
"hide-on-clear": false,
|
||||
"hide-on-action": true,
|
||||
"script-fail-notify": true,
|
||||
"widgets": [
|
||||
"title",
|
||||
"menubar#desktop",
|
||||
"volume",
|
||||
"backlight#mobile",
|
||||
"mpris",
|
||||
"dnd",
|
||||
"notifications"
|
||||
],
|
||||
"widget-config": {
|
||||
"title": {
|
||||
"text": "Notifications",
|
||||
"clear-all-button": true,
|
||||
"button-text": " Clear All "
|
||||
},
|
||||
"menubar#desktop": {
|
||||
"menu#powermode-buttons": {
|
||||
"label": " ",
|
||||
"position": "left",
|
||||
"actions": [
|
||||
{
|
||||
"label": "Performance",
|
||||
"command": "powerprofilesctl set performance"
|
||||
},
|
||||
{
|
||||
"label": "Balanced",
|
||||
"command": "powerprofilesctl set balanced"
|
||||
},
|
||||
{
|
||||
"label": "Power-saver",
|
||||
"command": "powerprofilesctl set power-saver"
|
||||
}
|
||||
]
|
||||
},
|
||||
"menu#screenshot": {
|
||||
"label": " ",
|
||||
"position": "left",
|
||||
"actions": [
|
||||
{
|
||||
"label": " Whole screen",
|
||||
"command": "grimblast --notify --cursor --freeze copy output"
|
||||
},
|
||||
{
|
||||
"label": " Window / Region",
|
||||
"command": "grimblast --notify --cursor --freeze copy area"
|
||||
}
|
||||
]
|
||||
},
|
||||
"menu#record": {
|
||||
"label": " ",
|
||||
"position": "left",
|
||||
"actions": [
|
||||
{
|
||||
"label": " Record screen",
|
||||
"command": "record screen & ; swaync-client -t"
|
||||
},
|
||||
{
|
||||
"label": " Record selection",
|
||||
"command": "record area & ; swaync-client -t"
|
||||
},
|
||||
{
|
||||
"label": " Record GIF",
|
||||
"command": "record gif & ; swaync-client -t"
|
||||
},
|
||||
{
|
||||
"label": " Stop",
|
||||
"command": "record stop"
|
||||
}
|
||||
]
|
||||
},
|
||||
"menu#power-buttons": {
|
||||
"label": " ",
|
||||
"position": "left",
|
||||
"actions": [
|
||||
{
|
||||
"label": " Lock",
|
||||
"command": "swaylock"
|
||||
},
|
||||
{
|
||||
"label": " Reboot",
|
||||
"command": "systemctl reboot"
|
||||
},
|
||||
{
|
||||
"label": " Shut down",
|
||||
"command": "systemctl poweroff"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"backlight#mobile": {
|
||||
"label": " ",
|
||||
"device": "panel"
|
||||
},
|
||||
"volume": {
|
||||
"label": "",
|
||||
"expand-button-label": "",
|
||||
"collapse-button-label": "",
|
||||
"show-per-app": true,
|
||||
"show-per-app-icon": true,
|
||||
"show-per-app-label": false
|
||||
},
|
||||
"dnd": {
|
||||
"text": " Do Not Disturb"
|
||||
},
|
||||
"mpris": {
|
||||
"image-size": 85,
|
||||
"image-radius": 5
|
||||
}
|
||||
}
|
||||
}
|
||||
601
glasshouse-desktop/home/swaync/style.css
Normal file
601
glasshouse-desktop/home/swaync/style.css
Normal file
@@ -0,0 +1,601 @@
|
||||
|
||||
@define-color shadow rgba(0, 0, 0, 0.25);
|
||||
/*
|
||||
*
|
||||
* Catppuccin Mocha palette
|
||||
* Maintainer: rubyowo
|
||||
*
|
||||
*/
|
||||
|
||||
@define-color base #1E1D2E;
|
||||
@define-color mantle #181825;
|
||||
@define-color crust #11111b;
|
||||
|
||||
@define-color text #cdd6f4;
|
||||
@define-color subtext0 #a6adc8;
|
||||
@define-color subtext1 #bac2de;
|
||||
|
||||
@define-color surface0 #313244;
|
||||
@define-color surface1 #45475a;
|
||||
@define-color surface2 #585b70;
|
||||
|
||||
@define-color overlay0 #6c7086;
|
||||
@define-color overlay1 #7f849c;
|
||||
@define-color overlay2 #9399b2;
|
||||
|
||||
@define-color blue #89b4fa;
|
||||
@define-color lavender #b4befe;
|
||||
@define-color sapphire #74c7ec;
|
||||
@define-color sky #89dceb;
|
||||
@define-color teal #94e2d5;
|
||||
@define-color green #a6e3a1;
|
||||
@define-color yellow #f9e2af;
|
||||
@define-color peach #fab387;
|
||||
@define-color maroon #eba0ac;
|
||||
@define-color red #f38ba8;
|
||||
@define-color mauve #cba6f7;
|
||||
@define-color pink #f5c2e7;
|
||||
@define-color flamingo #f2cdcd;
|
||||
@define-color rosewater #f5e0dc;
|
||||
|
||||
* {
|
||||
font-family: "NotoSansMono Nerd Font";
|
||||
background-clip: border-box;
|
||||
}
|
||||
|
||||
/* #notifications_box { */
|
||||
/* border: solid 4px red; */
|
||||
/* } */
|
||||
|
||||
label {
|
||||
color: @text;
|
||||
}
|
||||
|
||||
.notification {
|
||||
border: @lavender;
|
||||
box-shadow: none;
|
||||
/* margin: 0px; */
|
||||
/* margin: -15px -10px -15px -10px; */
|
||||
border-radius: 4px;
|
||||
background: inherit;
|
||||
/* background: @theme_bg_color; */
|
||||
/* background: shade(alpha(@borders, 2.55), 0.25); */
|
||||
}
|
||||
|
||||
.notification button {
|
||||
background: transparent;
|
||||
border-radius: 0px;
|
||||
border: none;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.notification button:hover {
|
||||
background: @surface0;
|
||||
/* background: @insensitive_bg_color; */
|
||||
}
|
||||
|
||||
|
||||
.notification-content {
|
||||
min-height: 64px;
|
||||
margin: 10px;
|
||||
padding: 0px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.close-button {
|
||||
background: @crust;
|
||||
color: @surface2;
|
||||
}
|
||||
|
||||
.notification-default-action,
|
||||
.notification-action {
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
|
||||
.notification-default-action {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* When alternative actions are visible */
|
||||
.notification-default-action:not(:only-child) {
|
||||
border-bottom-left-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
}
|
||||
|
||||
.notification-action {
|
||||
border-radius: 0px;
|
||||
padding: 2px;
|
||||
color: @text;
|
||||
/* color: @theme_text_color; */
|
||||
}
|
||||
|
||||
/* add bottom border radius to eliminate clipping */
|
||||
.notification-action:first-child {
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
|
||||
.notification-action:last-child {
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
|
||||
/*** Notification ***/
|
||||
/* Notification header */
|
||||
.summary {
|
||||
color: @text;
|
||||
/* color: @theme_text_color; */
|
||||
font-size: 16px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.time {
|
||||
color: @subtext0;
|
||||
/* color: alpha(@theme_text_color, 0.9); */
|
||||
font-size: 12px;
|
||||
text-shadow: none;
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding: 2px 0px;
|
||||
}
|
||||
|
||||
.body {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: @subtext1;
|
||||
/* color: alpha(@text, 0.9); */
|
||||
/* color: alpha(@theme_text_color, 0.9); */
|
||||
text-shadow: none;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.body-image {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* The "Notifications" and "Do Not Disturb" text widget */
|
||||
.top-action-title {
|
||||
color: @text;
|
||||
/* color: @theme_text_color; */
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
/* Control center */
|
||||
|
||||
.control-center {
|
||||
/* background: transparent; */
|
||||
background: @crust;
|
||||
/* background: @theme_bg_color; */
|
||||
/* border: 1px solid @surface0; */
|
||||
border-radius: 5px;
|
||||
/* box-shadow: 0px 0px 2px black; */
|
||||
}
|
||||
|
||||
/* .right.overlay-indicator { */
|
||||
/* border: solid 5px red; */
|
||||
/* } */
|
||||
|
||||
.control-center-list {
|
||||
/* background: @base; */
|
||||
background: @crust;
|
||||
min-height: 5px;
|
||||
/* border: 1px solid @surface1; */
|
||||
border-top: none;
|
||||
border-radius: 0px 0px 4px 4px;
|
||||
}
|
||||
|
||||
.control-center-list-placeholder,
|
||||
.notification-group-icon,
|
||||
.notification-group {
|
||||
/* opacity: 1.0; */
|
||||
/* opacity: 0; */
|
||||
color: alpha(@theme_text_color, 0.50);
|
||||
}
|
||||
|
||||
.notification-group {
|
||||
/* unset the annoying focus thingie */
|
||||
all: unset;
|
||||
border: none;
|
||||
opacity: 0;
|
||||
padding: 0px;
|
||||
box-shadow: none;
|
||||
/* selectable: no; */
|
||||
}
|
||||
.notification-group > box {
|
||||
all: unset;
|
||||
background: @mantle;
|
||||
/* background: alpha(currentColor, 0.072); */
|
||||
padding: 8px;
|
||||
margin: 0px;
|
||||
/* margin: 0px -5px; */
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
.notification-row {
|
||||
outline: none;
|
||||
transition: all 1s ease;
|
||||
background: @base;
|
||||
/* background: @theme_bg_color; */
|
||||
border: 1px solid @crust;
|
||||
margin: 10px 5px 0px 5px;
|
||||
border-radius: 4px;
|
||||
/* box-shadow: 0px 0px 4px black; */
|
||||
/* background: alpha(currentColor, 0.05); */
|
||||
}
|
||||
|
||||
.notification-row:focus,
|
||||
.notification-row:hover {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.control-center-list > row,
|
||||
.control-center-list > row:focus,
|
||||
.control-center-list > row:hover {
|
||||
background: transparent;
|
||||
border: none;
|
||||
margin: 0px;
|
||||
padding: 5px 10px 5px 10px;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.control-center-list > row:last-child {
|
||||
padding: 5px 10px 10px 10px;
|
||||
}
|
||||
|
||||
|
||||
/* Window behind control center and on all other monitors */
|
||||
.blank-window {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/*** Widgets ***/
|
||||
|
||||
/* Title widget */
|
||||
.widget-title {
|
||||
margin: 0px;
|
||||
background: inherit;
|
||||
/* background: @theme_bg_color; */
|
||||
border-radius: 4px 4px 0px 0px;
|
||||
/* border: 1px solid @surface1; */
|
||||
border-bottom: none;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.widget-title > label {
|
||||
margin: 18px 10px;
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.widget-title > button {
|
||||
font-weight: 700;
|
||||
padding: 7px 3px;
|
||||
margin-right: 10px;
|
||||
background: @mantle;
|
||||
color: @text;
|
||||
/* color: @theme_text_color; */
|
||||
/* border: none; */
|
||||
border-radius: 4px;
|
||||
}
|
||||
.widget-title > button:hover {
|
||||
background: @base;
|
||||
/* background: alpha(currentColor, 0.1); */
|
||||
}
|
||||
|
||||
/* Label widget */
|
||||
.widget-label {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
min-height: 5px;
|
||||
background: @mantle;
|
||||
/* background: @theme_bg_color; */
|
||||
border-radius: 0px 0px 4px 4px;
|
||||
/* border: 1px solid @surface1; */
|
||||
border-top: none;
|
||||
}
|
||||
.widget-label > label {
|
||||
font-size: 0px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
/* Menubar */
|
||||
.widget-menubar {
|
||||
background: inherit;
|
||||
/* background: @theme_bg_color; */
|
||||
/* border: 1px solid @surface1; */
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
.widget-menubar > box > box {
|
||||
margin: 5px 10px 5px 10px;
|
||||
min-height: 40px;
|
||||
border-radius: 4px;
|
||||
background: transparent;
|
||||
}
|
||||
.widget-menubar > box > box > button {
|
||||
background: @mantle;
|
||||
/* background: alpha(currentColor, 0.05); */
|
||||
min-width: 85px;
|
||||
min-height: 50px;
|
||||
margin-right: 13px;
|
||||
font-size: 17px;
|
||||
padding: 0px;
|
||||
}
|
||||
.widget-menubar > box > box > button:nth-child(4) {
|
||||
margin-right: 0px;
|
||||
}
|
||||
.widget-menubar button:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
.widget-menubar button:focus:hover {
|
||||
background: @base;
|
||||
/* background: alpha(currentColor,0.1); */
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.widget-menubar > box > revealer > box {
|
||||
margin: 5px 10px 5px 10px;
|
||||
background: @mantle;
|
||||
/* background: alpha(currentColor, 0.05); */
|
||||
border-radius: 4px;
|
||||
}
|
||||
.widget-menubar > box > revealer > box > button {
|
||||
background: transparent;
|
||||
min-height: 50px;
|
||||
padding: 0px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
/* Buttons grid */
|
||||
.widget-buttons-grid {
|
||||
/* background-color: @theme_bg_color; */
|
||||
background-color: @mantle;
|
||||
/* border: 1px solid @surface1; */
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
margin: 0px;
|
||||
padding: 5px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.widget-buttons-grid > flowbox > flowboxchild {
|
||||
background: @mantle;
|
||||
/* background: alpha(currentColor, 0.05); */
|
||||
border-radius: 4px;
|
||||
min-height: 50px;
|
||||
min-width: 85px;
|
||||
margin: 5px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.widget-buttons-grid > flowbox > flowboxchild > button {
|
||||
background: transparent;
|
||||
border-radius: 4px;
|
||||
margin: 0px;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
.widget-buttons-grid > flowbox > flowboxchild > button:hover {
|
||||
background: @mantle;
|
||||
/* background: alpha(currentColor, 0.1); */
|
||||
}
|
||||
|
||||
/* Mpris widget */
|
||||
.widget-mpris {
|
||||
padding: 10px;
|
||||
padding-bottom: 35px;
|
||||
padding-top: 35px;
|
||||
margin-bottom: -33px;
|
||||
}
|
||||
.widget-mpris > box {
|
||||
padding: 0px;
|
||||
margin: -5px 0px -10px 0px;
|
||||
padding: 0px;
|
||||
border-radius: 4px;
|
||||
/* background: alpha(currentColor, 0.05); */
|
||||
background: @mantle;
|
||||
}
|
||||
.widget-mpris > box > button:nth-child(1),
|
||||
.widget-mpris > box > button:nth-child(3) {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.widget-mpris > box > button:nth-child(1) {
|
||||
margin-left: -25px;
|
||||
margin-right: -25px;
|
||||
opacity: 0;
|
||||
}
|
||||
.widget-mpris > box > button:nth-child(3) {
|
||||
margin-left: -25px;
|
||||
margin-right: -25px;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.widget-mpris-album-art {
|
||||
all: unset;
|
||||
}
|
||||
|
||||
/* Player button box */
|
||||
.widget-mpris > box > carousel > widget > box > box:nth-child(2) {
|
||||
margin: 5px 0px -5px 90px;
|
||||
}
|
||||
|
||||
/* Player buttons */
|
||||
.widget-mpris > box > carousel > widget > box > box:nth-child(2) > button {
|
||||
border-radius: 4px;
|
||||
}
|
||||
.widget-mpris > box > carousel > widget > box > box:nth-child(2) > button:hover {
|
||||
background: alpha(currentColor, 0.1);
|
||||
}
|
||||
carouselindicatordots {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.widget-mpris-title {
|
||||
color: #eeeeee;
|
||||
font-weight: bold;
|
||||
font-size: 1.25rem;
|
||||
text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.widget-mpris-subtitle {
|
||||
color: #eeeeee;
|
||||
font-size: 1rem;
|
||||
text-shadow: 0px 0px 3px rgba(0, 0, 0, 1);
|
||||
}
|
||||
|
||||
.widget-mpris-player {
|
||||
border-radius: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
.widget-mpris-player > box > image {
|
||||
margin: 0px 0px -48px 0px;
|
||||
}
|
||||
|
||||
.notification-group > box.vertical {
|
||||
/* border: solid 5px red; */
|
||||
margin-top: 3px
|
||||
}
|
||||
|
||||
/* Backlight and volume widgets */
|
||||
.widget-backlight,
|
||||
.widget-volume {
|
||||
background-color: @crust;
|
||||
/* background-color: @theme_bg_color; */
|
||||
/* border: 1px solid @surface1; */
|
||||
border-top: none;
|
||||
border-bottom: none; font-size: 13px;
|
||||
font-weight: 600;
|
||||
border-radius: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
.widget-volume > box {
|
||||
background: @mantle;
|
||||
/* background: alpha(currentColor, 0.05); */
|
||||
border-radius: 4px;
|
||||
margin: 5px 10px 5px 10px;
|
||||
min-height: 50px;
|
||||
}
|
||||
.widget-volume > box > label {
|
||||
min-width: 50px;
|
||||
padding: 0px;
|
||||
}
|
||||
.widget-volume > box > button {
|
||||
min-width: 50px;
|
||||
box-shadow: none;
|
||||
padding: 0px;
|
||||
}
|
||||
.widget-volume > box > button:hover {
|
||||
/* background: alpha(currentColor, 0.05); */
|
||||
background: @surface0;
|
||||
}
|
||||
.widget-volume > revealer > list {
|
||||
background: @mantle;
|
||||
/* background: alpha(currentColor, 0.05); */
|
||||
border-radius: 4px;
|
||||
margin-top: 5px;
|
||||
padding: 0px;
|
||||
}
|
||||
.widget-volume > revealer > list > row {
|
||||
padding-left: 10px;
|
||||
min-height: 40px;
|
||||
background: transparent;
|
||||
}
|
||||
.widget-volume > revealer > list > row:hover {
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.widget-backlight > scale {
|
||||
background: @mantle;
|
||||
/* background: alpha(currentColor, 0.05); */
|
||||
border-radius: 0px 4px 4px 0px;
|
||||
margin: 5px 10px 5px 0px;
|
||||
padding: 0px 10px 0px 0px;
|
||||
min-height: 50px;
|
||||
}
|
||||
.widget-backlight > label {
|
||||
background: @surface0;
|
||||
/* background: alpha(currentColor, 0.05); */
|
||||
margin: 5px 0px 5px 10px;
|
||||
border-radius: 4px 0px 0px 4px;
|
||||
padding: 0px;
|
||||
min-height: 50px;
|
||||
min-width: 50px;
|
||||
}
|
||||
|
||||
/* DND widget */
|
||||
.widget-dnd {
|
||||
margin: 8px;
|
||||
font-size: 1.1rem;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.widget-dnd>switch {
|
||||
font-size: initial;
|
||||
border-radius: 12px;
|
||||
background: @surface0;
|
||||
border: 1px solid @lavender;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.widget-dnd>switch:checked {
|
||||
background: @surface2;
|
||||
}
|
||||
|
||||
.widget-dnd>switch slider {
|
||||
background: @lavender;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
/* Toggles */
|
||||
.toggle:checked {
|
||||
background: @surface1;
|
||||
/* background: @theme_selected_bg_color; */
|
||||
}
|
||||
/*.toggle:not(:checked) {
|
||||
color: rgba(128, 128, 128, 0.5);
|
||||
}*/
|
||||
.toggle:checked:hover {
|
||||
background: @surface2;
|
||||
/* background: alpha(@theme_selected_bg_color, 0.75); */
|
||||
}
|
||||
|
||||
/* Sliders */
|
||||
scale {
|
||||
padding: 0px;
|
||||
margin: 0px 10px 0px 10px;
|
||||
}
|
||||
|
||||
scale trough {
|
||||
border-radius: 4px;
|
||||
background: @surface0;
|
||||
/* background: alpha(currentColor, 0.1); */
|
||||
}
|
||||
|
||||
scale highlight {
|
||||
border-radius: 5px;
|
||||
min-height: 10px;
|
||||
margin-right: -5px;
|
||||
}
|
||||
|
||||
scale slider {
|
||||
margin: -10px;
|
||||
min-width: 10px;
|
||||
min-height: 10px;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
padding: 0px;
|
||||
}
|
||||
scale slider:hover {
|
||||
}
|
||||
|
||||
.right.overlay-indicator {
|
||||
all: unset;
|
||||
}
|
||||
7
glasshouse-desktop/home/swaync/swaync.nix
Normal file
7
glasshouse-desktop/home/swaync/swaync.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = (with pkgs; [ swaynotificationcenter ]);
|
||||
xdg.configFile."swaync/style.css".source = ./style.css;
|
||||
xdg.configFile."swaync/config.json".source = ./config.json;
|
||||
}
|
||||
27
glasshouse-desktop/home/theme/cursor/flake.lock
generated
Normal file
27
glasshouse-desktop/home/theme/cursor/flake.lock
generated
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1726937504,
|
||||
"narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9357f4f23713673f310988025d9dc261c20e70c6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
30
glasshouse-desktop/home/theme/cursor/flake.nix
Normal file
30
glasshouse-desktop/home/theme/cursor/flake.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
description = "Hackneyed X11 Cursors";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
packages.${system} = {
|
||||
default = pkgs.stdenv.mkDerivation {
|
||||
pname = "hackneyed-cursors-dark-right-48px";
|
||||
version = "0.9.2";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://gitlab.com/-/project/6703061/uploads/53e6cb854a0bd446b326ca7c40fb5cdf/Hackneyed-Dark-48px-0.9.2-right-handed.tar.bz2";
|
||||
sha256 = "sha256-AAAAAAAAAAAAAAAAAAAAAAAA=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/icons/Hackneyed-Dark
|
||||
tar xjf $src -C $out/share/icons/Hackneyed-Dark --strip-components=1
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
27
glasshouse-desktop/home/toilet/flake.lock
generated
Normal file
27
glasshouse-desktop/home/toilet/flake.lock
generated
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1726937504,
|
||||
"narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9357f4f23713673f310988025d9dc261c20e70c6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
47
glasshouse-desktop/home/toilet/flake.nix
Normal file
47
glasshouse-desktop/home/toilet/flake.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
description = "Toilet Configuration with Extra Fonts";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
# Fetch extra fonts from GitHub
|
||||
extraFonts = pkgs.fetchFromGitHub {
|
||||
owner = "xero";
|
||||
repo = "figlet-fonts";
|
||||
rev = "master"; # Or specify a particular commit/tag
|
||||
sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY="; # Replace with actual hash
|
||||
};
|
||||
in {
|
||||
packages.${system} = {
|
||||
default = pkgs.toilet.overrideAttrs (oldAttrs: rec {
|
||||
buildInputs = oldAttrs.buildInputs or [] ++ [ extraFonts ];
|
||||
|
||||
installPhase = ''
|
||||
make install PREFIX=$out
|
||||
|
||||
# Copy the extra fonts into the correct directory
|
||||
mkdir -p $out/share/figlet
|
||||
cp -r ${extraFonts}/* $out/share/figlet
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
||||
# Define a development shell for testing
|
||||
devShells.${system} = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
pkgs.toilet
|
||||
extraFonts
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo "Toilet dev shell with extra fonts"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
1
glasshouse-desktop/home/toilet/result
Symbolic link
1
glasshouse-desktop/home/toilet/result
Symbolic link
@@ -0,0 +1 @@
|
||||
/nix/store/i2ibv054n0ll5p78qabrkb5sxcjzbr2n-toilet-0.3
|
||||
45
glasshouse-desktop/home/userpkgs.nix
Normal file
45
glasshouse-desktop/home/userpkgs.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
let
|
||||
nvim = inputs.nvim.packages."x86_64-linux".default;
|
||||
toilet = inputs.toilet.packages."x86_64-linux".default;
|
||||
in
|
||||
{
|
||||
packages = with pkgs; [
|
||||
hello
|
||||
grimblast
|
||||
gtk3
|
||||
adwaita-icon-theme
|
||||
waybar
|
||||
uhk-agent
|
||||
dunst
|
||||
rofi
|
||||
sqlite
|
||||
starship
|
||||
yazi
|
||||
zathura
|
||||
inkscape
|
||||
imagemagick
|
||||
firefox
|
||||
yt-dlp
|
||||
vlc
|
||||
speedtest-cli
|
||||
vesktop
|
||||
qbittorrent
|
||||
obs-studio
|
||||
neovide
|
||||
chromium
|
||||
zsh
|
||||
zsh-syntax-highlighting
|
||||
zsh-history-substring-search
|
||||
zsh-autosuggestions
|
||||
audacity
|
||||
snes9x-gtk
|
||||
rustup
|
||||
libreoffice
|
||||
handbrake
|
||||
gtrash
|
||||
ripgrep
|
||||
nvim
|
||||
toilet
|
||||
];
|
||||
}
|
||||
7
glasshouse-desktop/home/waybar/default.nix
Normal file
7
glasshouse-desktop/home/waybar/default.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ (import ./waybar.nix) ]
|
||||
++ [ (import ./settings.nix) ]
|
||||
++ [ (import ./style.nix) ];
|
||||
}
|
||||
138
glasshouse-desktop/home/waybar/settings.nix
Normal file
138
glasshouse-desktop/home/waybar/settings.nix
Normal file
@@ -0,0 +1,138 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.waybar.settings.mainBar = {
|
||||
position= "bottom";
|
||||
layer= "top";
|
||||
height= 5;
|
||||
margin-top= 0;
|
||||
margin-bottom= 0;
|
||||
margin-left= 0;
|
||||
margin-right= 0;
|
||||
modules-left= [
|
||||
"custom/launcher"
|
||||
"hyprland/workspaces"
|
||||
];
|
||||
modules-center= [
|
||||
"clock"
|
||||
];
|
||||
modules-right= [
|
||||
"tray"
|
||||
"cpu"
|
||||
"memory"
|
||||
"disk"
|
||||
"pulseaudio"
|
||||
"battery"
|
||||
"network"
|
||||
"custom/notification"
|
||||
];
|
||||
clock= {
|
||||
calendar = {
|
||||
format = { today = "<span color='#b4befe'><b><u>{}</u></b></span>"; };
|
||||
};
|
||||
format = " {:%H:%M}";
|
||||
tooltip= "true";
|
||||
tooltip-format= "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
format-alt= " {:%d/%m}";
|
||||
};
|
||||
"hyprland/workspaces"= {
|
||||
active-only= false;
|
||||
disable-scroll= true;
|
||||
format = "{icon}";
|
||||
on-click= "activate";
|
||||
format-icons= {
|
||||
"1"= "";
|
||||
"2"= "";
|
||||
"3"= "";
|
||||
"4"= "";
|
||||
"5"= "";
|
||||
"6"= "";
|
||||
urgent= "";
|
||||
default = "";
|
||||
sort-by-number= true;
|
||||
};
|
||||
persistent-workspaces = {
|
||||
"1"= [];
|
||||
"2"= [];
|
||||
"3"= [];
|
||||
"4"= [];
|
||||
"5"= [];
|
||||
};
|
||||
};
|
||||
memory= {
|
||||
format= " {}%";
|
||||
format-alt= " {used} GiB"; #
|
||||
interval= 2;
|
||||
};
|
||||
cpu= {
|
||||
format= " {usage}%";
|
||||
format-alt= " {avg_frequency} GHz";
|
||||
interval= 2;
|
||||
};
|
||||
disk = {
|
||||
# path = "/";
|
||||
format = " {percentage_used}%";
|
||||
interval= 60;
|
||||
};
|
||||
network = {
|
||||
format-wifi = " {signalStrength}%";
|
||||
format-ethernet = " ";
|
||||
tooltip-format = "Connected to {essid} {ifname} via {gwaddr}";
|
||||
format-linked = "{ifname} (No IP)";
|
||||
format-disconnected = " ";
|
||||
};
|
||||
tray= {
|
||||
icon-size= 20;
|
||||
spacing= 8;
|
||||
};
|
||||
pulseaudio= {
|
||||
format= "{icon} {volume}%";
|
||||
format-muted= " {volume}%";
|
||||
format-icons= {
|
||||
default= [" "];
|
||||
};
|
||||
scroll-step= 5;
|
||||
on-click= "pamixer -t";
|
||||
};
|
||||
battery = {
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = [" " " " " " " " " "];
|
||||
format-charging = " {capacity}%";
|
||||
format-full = " {capacity}%";
|
||||
format-warning = " {capacity}%";
|
||||
interval = 5;
|
||||
states = {
|
||||
warning = 20;
|
||||
};
|
||||
format-time = "{H}h{M}m";
|
||||
tooltip = true;
|
||||
tooltip-format = "{time}";
|
||||
};
|
||||
"custom/launcher"= {
|
||||
format= "";
|
||||
on-click= "fuzzel";
|
||||
on-click-right= "wallpaper-picker";
|
||||
tooltip= "false";
|
||||
};
|
||||
"custom/notification" = {
|
||||
tooltip = false;
|
||||
format = "{icon} ";
|
||||
format-icons = {
|
||||
notification = "<span foreground='red'><sup></sup></span> ";
|
||||
none = " ";
|
||||
dnd-notification = "<span foreground='red'><sup></sup></span> ";
|
||||
dnd-none = " ";
|
||||
inhibited-notification = "<span foreground='red'><sup></sup></span> ";
|
||||
inhibited-none = " ";
|
||||
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span> ";
|
||||
dnd-inhibited-none = " ";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "swaync-client -t -sw";
|
||||
on-click-right = "swaync-client -d -sw";
|
||||
escape = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
105
glasshouse-desktop/home/waybar/style.nix
Normal file
105
glasshouse-desktop/home/waybar/style.nix
Normal file
@@ -0,0 +1,105 @@
|
||||
{ ... }:
|
||||
|
||||
let custom = {
|
||||
font = "JetBrainsMono Nerd Font";
|
||||
font_size = "15px";
|
||||
font_weight = "bold";
|
||||
text_color = "#cdd6f4";
|
||||
secondary_accent= "89b4fa";
|
||||
tertiary_accent = "f5f5f5";
|
||||
background = "11111B";
|
||||
opacity = "0.98";
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.waybar.style = ''
|
||||
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
min-height: 0px;
|
||||
font-family: ${custom.font};
|
||||
font-weight: ${custom.font_weight};
|
||||
opacity: ${custom.opacity};
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: none;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
font-size: 18px;
|
||||
padding-left: 15px;
|
||||
|
||||
}
|
||||
#workspaces button {
|
||||
color: ${custom.text_color};
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
}
|
||||
#workspaces button.empty {
|
||||
color: #6c7086;
|
||||
}
|
||||
#workspaces button.active {
|
||||
color: #b4befe;
|
||||
}
|
||||
|
||||
#tray, #pulseaudio, #network, #cpu, #memory, #disk, #clock, #battery, #custom-notification {
|
||||
font-size: ${custom.font_size};
|
||||
color: ${custom.text_color};
|
||||
}
|
||||
|
||||
#cpu {
|
||||
padding-left: 15px;
|
||||
padding-right: 9px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
#memory {
|
||||
padding-left: 9px;
|
||||
padding-right: 9px;
|
||||
}
|
||||
#disk {
|
||||
padding-left: 9px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
#tray {
|
||||
padding: 0 20px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
padding-left: 15px;
|
||||
padding-right: 9px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
#battery {
|
||||
padding-left: 9px;
|
||||
padding-right: 9px;
|
||||
}
|
||||
#network {
|
||||
padding-left: 9px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
custom-notification {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
padding-left: 9px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
#custom-launcher {
|
||||
font-size: 20px;
|
||||
color: #b4befe;
|
||||
font-weight: ${custom.font_weight};
|
||||
padding-left: 10px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
'';
|
||||
}
|
||||
10
glasshouse-desktop/home/waybar/waybar.nix
Normal file
10
glasshouse-desktop/home/waybar/waybar.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
};
|
||||
programs.waybar.package = pkgs.waybar.overrideAttrs (oa: {
|
||||
mesonFlags = (oa.mesonFlags or [ ]) ++ [ "-Dexperimental=true" ];
|
||||
});
|
||||
}
|
||||
320
glasshouse-desktop/home/zshell.nix
Normal file
320
glasshouse-desktop/home/zshell.nix
Normal file
@@ -0,0 +1,320 @@
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
||||
sessionVariables = {
|
||||
SOUNDS_ENABLED = "1";
|
||||
EDITOR = "/nixbin/nvim";
|
||||
SUDO_EDITOR = "/nixbin/nvim";
|
||||
VISUAL = "/nixbin/nvim";
|
||||
LANG = "en_US.UTF-8";
|
||||
BROWSER = "/nixbin/firefox";
|
||||
STARSHIP_CONFIG = /home/pagedmov/.config/starship/starship.toml;
|
||||
FZF_DEFAULT_COMMAND = "find $HOME \( -path \"$HOME/.steam\" -o -path \"$HOME/.mozilla\" -o -path \"$HOME/go\" \) -prune -o -type f -print";
|
||||
GIT_TOKEN = "$(cat supersecret/git-token)";
|
||||
PROMPT_COMMAND = "if [[ $? != 0 ]]; then s_check && (aplay ~/sound/sys/error.wav 2> /dev/null &); fi";
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [ "git" "fzf" ];
|
||||
};
|
||||
|
||||
enableCompletion = true;
|
||||
history = {
|
||||
path = ".zsh_history";
|
||||
save = 10000;
|
||||
size = 10000;
|
||||
share = true;
|
||||
};
|
||||
autosuggestion = {
|
||||
enable = true;
|
||||
highlight = "fg=#4C566A,underline";
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
enterwifi = "nmtui-connect";
|
||||
grep = "grep --color=auto";
|
||||
v = "nvim";
|
||||
mv = "mv -v";
|
||||
cp = "cp -vr";
|
||||
rm = "safe_rm";
|
||||
grub-update = "sudo grub-mkconfig -o /boot/grub/grub.cfg";
|
||||
mtar = "tar -zcvf"; # mtar <archive_compress>;
|
||||
utar = "tar -zxvf"; # utar <archive_decompress> <file_list>;
|
||||
z = "zip -r"; # z <archive_compress> <file_list>;
|
||||
uz = "unzip"; # uz <archive_decompress> -d <dir>;
|
||||
sr = "source ~/.zshrc";
|
||||
".." = "cd ..";
|
||||
psg = "ps aux | grep -v grep | grep -i -e VSZ -e" ;
|
||||
mkdir = "mkdir -p";
|
||||
fm = "ranger";
|
||||
killjob = "kill -9 \$(jobs -l | awk '{print \$3}')";
|
||||
rmf = "fzf -m | xargs -ro rm";
|
||||
nwt = "ping google.com";
|
||||
wiki = "vimwiki";
|
||||
uwiki = "wiki_update";
|
||||
beep = "paplay $BEEP";
|
||||
pk = "pkill -9 -f";
|
||||
zrc = "nvim $HOME/sysflakes/glasshouse-desktop/modules/zshell.nix";
|
||||
vfind = "nvim_find";
|
||||
theme = "change_kitty_theme";
|
||||
navhelp = "navhelp | less";
|
||||
svc = "systemctl --user";
|
||||
hmswitch = "home-manager switch";
|
||||
hyprconf = "nvim $HOME/sysflakes/glasshouse-desktop/dotfiles/packages/hyprland/hyprland.conf";
|
||||
hmconf = "nvim $HOME/sysflakes/glasshouse-desktop/home.nix";
|
||||
nixconf = "nvim $HOME/sysflakes/glasshouse-desktop/configuration.nix";
|
||||
viflake = "nvim flake.nix";
|
||||
nvimcfg = "ranger $HOME/sysflakes/glasshouse-desktop/dotfiles/packages/nixvim/";
|
||||
};
|
||||
|
||||
initExtraFirst = ''
|
||||
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
|
||||
export PATH="$HOME/.nix-profile/bin:$PATH"
|
||||
export UPDATE_ZSH_DAYS=7
|
||||
unalias ls
|
||||
|
||||
# Uncomment the following line to enable command auto-correction.
|
||||
ENABLE_CORRECTION="true"
|
||||
|
||||
if [[ $- != *i* ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
||||
typeset -g comppath="$HOME/.cache"
|
||||
typeset -g compfile="$comppath/.zcompdump"
|
||||
|
||||
if [[ -d "$comppath" ]]; then
|
||||
[[ -w "$compfile" ]] || rm -rf "$compfile" >/dev/null 2>&1
|
||||
else
|
||||
mkdir -p "$comppath"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
preexec() {
|
||||
cmdcounter="/tmp/cmdcounter_$(whoami)"
|
||||
|
||||
if [[ ! -f "$cmdcounter" ]]; then
|
||||
echo 0 > "$cmdcounter"
|
||||
fi
|
||||
|
||||
cmd_count="$(cat "$cmdcounter")"
|
||||
|
||||
cmd_count=$((cmd_count + 1))
|
||||
|
||||
echo "$cmd_count" > "$cmdcounter"
|
||||
}
|
||||
|
||||
s_check() { [ $SOUNDS_ENABLED -eq 1 ] }
|
||||
|
||||
snd_restart() {
|
||||
echo -n "Restarting wireplumber service... "
|
||||
systemctl --user restart wireplumber; code1=$? && echo "SUCCESS" || echo "FAILED"
|
||||
[ $code1 -ne 0 ] && exit 1
|
||||
echo -n "Restarting pipewire service... "
|
||||
systemctl --user restart pipewire; code2=$? && echo "SUCCESS" || echo "FAILED"
|
||||
[ $code2 -ne 0 ] && exit 1
|
||||
echo "Audio services successfully restarted"
|
||||
}
|
||||
|
||||
vid_restart() {
|
||||
echo -n "Restarting wireplumber service... "
|
||||
systemctl --user restart wireplumber; code1=$? && echo "SUCCESS" || echo "FAILED"
|
||||
[ $code1 -ne 0 ] && exit 1
|
||||
echo -n "Restarting pipewire service... "
|
||||
systemctl --user restart pipewire; code2=$? && echo "SUCCESS" || echo "FAILED"
|
||||
[ $code2 -ne 0 ] && exit 1
|
||||
echo -n "Restarting xdg-desktop-portal service... "
|
||||
systemctl --user restart xdg-desktop-portal; code3=$? && echo "SUCCESS" || echo "FAILED"
|
||||
[ $code3 -ne 0 ] && exit 1
|
||||
echo -n "Restarting xdg-desktop-portal-hyprland service... "
|
||||
systemctl --user restart xdg-desktop-portal-hyprland; code4=$? && echo "SUCCESS" || echo "FAILED"
|
||||
[ $code4 -ne 0 ] && exit 1
|
||||
echo "Video services successfully restarted"
|
||||
}
|
||||
|
||||
wiki_update() {
|
||||
old_pwd=$(pwd)
|
||||
cd ~/vimwiki > /dev/null
|
||||
git pull
|
||||
cd $old_pwd > /dev/null
|
||||
}
|
||||
|
||||
# Functions
|
||||
ls() {
|
||||
command ls --group-directories-first --color=always -F1 "$@" | sort -f -k1
|
||||
s_check && (aplay ~/sound/sys/ls.wav > /dev/null 2>&1 &)
|
||||
}
|
||||
|
||||
# cd and ls after
|
||||
cd() {
|
||||
export SOUNDS_ENABLED=0
|
||||
ls "$@"
|
||||
builtin cd "$@"
|
||||
export SOUNDS_ENABLED=1
|
||||
s_check && (aplay ~/sound/sys/cd.wav > /dev/null 2>&1 &)
|
||||
}
|
||||
src() {
|
||||
autoload -U zrecompile
|
||||
rm -rf "$compfile"*
|
||||
compinit -u -d "$compfile"
|
||||
zrecompile -p "$compfile"
|
||||
exec zsh
|
||||
}
|
||||
|
||||
mcd () {
|
||||
mkdir -p $1
|
||||
cd $1
|
||||
}
|
||||
|
||||
rc(){
|
||||
g++ "$1" -o run
|
||||
./run
|
||||
}
|
||||
|
||||
safe_rm() {
|
||||
played_sound=false
|
||||
for dir in "$@"; do
|
||||
# Check if it's a file or directory
|
||||
if [ -d "$dir" ] || [ -f "$dir" ]; then
|
||||
# Get size of the directory or file
|
||||
size=$(du -s "$dir" 2>/dev/null | awk '{print $1/1024}' | awk '{printf("%d\n", $1 + 0.5)}')
|
||||
|
||||
# Count files (recursively if it's a directory)
|
||||
files=$(find "$dir" | wc -l)
|
||||
|
||||
check=false
|
||||
is_file_or_dir=$([ -f "$dir" ] && echo 'file' || echo 'directory')
|
||||
|
||||
# If there are many files, or the size is big, warn the user
|
||||
if [ "$files" -gt 20 ]; then
|
||||
echo "There's a lot of stuff in '$dir' ($files files) ."
|
||||
check=true
|
||||
fi
|
||||
|
||||
if [ "$size" -gt 1024 ]; then
|
||||
size_in_gb=$(echo "scale=2; $size / 1024" | bc -l)
|
||||
echo "This $is_file_or_dir ('$dir') is kind of big ($size_in_gb GB)."
|
||||
check=true
|
||||
fi
|
||||
|
||||
# Ask for confirmation only if necessary
|
||||
if [ "$check" = true ]; then
|
||||
echo "Are you sure you want to remove this $is_file_or_dir '$dir'? (y/n)"
|
||||
read -r confirm
|
||||
[ "$confirm" = "y" ] && (aplay ~/sound/sys/rm.wav > /dev/null 2>&1 &)
|
||||
[ "$confirm" != "y" ] && (aplay ~/sound/sys/cd.wav > /dev/null 2>&1 &)
|
||||
fi
|
||||
|
||||
# Perform the removal if no checks or confirmation is "y"
|
||||
if [ "$check" = false ] || [ "$confirm" = "y" ]; then
|
||||
/run/current-system/sw/bin/rm -rfv "$dir"
|
||||
[[ "$played_sound" -eq "0" ]] && (aplay ~/sound/sys/rm.wav > /dev/null 2>&1 &)
|
||||
played_sound=1
|
||||
else
|
||||
echo "Operation cancelled for '$dir'."
|
||||
fi
|
||||
else
|
||||
echo "'$dir' does not exist or is not accessible."
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
nixswitch() {
|
||||
s_check && (aplay ~/sound/sys/nixswitch-start.wav > /dev/null 2>&1 &)
|
||||
builtin cd "$HOME/sysflakes"
|
||||
nix flake update
|
||||
|
||||
gen=$(readlink /nix/var/nix/profiles/system | sed 's/.*system-\([0-9]*\)-link/\1/')
|
||||
gen=$((gen + 1))
|
||||
|
||||
git diff --quiet
|
||||
if [ $? -eq 1 ]; then
|
||||
git add .
|
||||
git commit -m "Commit for generation $gen"
|
||||
git push
|
||||
fi
|
||||
sudo nixos-rebuild switch --flake "$HOME/sysflakes#glasshouse"
|
||||
if [ $? -eq 0 ]; then
|
||||
s_check && (aplay ~/sound/sys/update.wav > /dev/null 2>&1 &)
|
||||
else
|
||||
s_check && (aplay ~/sound/sys/error.wav > /dev/null 2>&1 &)
|
||||
fi
|
||||
builtin cd $OLDPWD
|
||||
}
|
||||
journal() {
|
||||
# journal for keeping track of stuff I do that isn't declared in my nix config
|
||||
[ ! -f "$HOME/loose_ends" ] && touch "$HOME/loose_ends"
|
||||
echo "$(date) - $1" >> "$HOME/loose_ends"
|
||||
}
|
||||
invoke() { nix run nixpkgs#"$@" }
|
||||
|
||||
'';
|
||||
|
||||
initExtraBeforeCompInit = ''
|
||||
source ~/.zstyle
|
||||
'';
|
||||
initExtra = ''
|
||||
if [ ! -e $HOME/.zsh_history ]; then
|
||||
touch $HOME/.zsh_history
|
||||
chmod 600 $HOME/.zsh_history
|
||||
fi
|
||||
HISTFILE=~/.zsh_history # The file where your history will be saved
|
||||
HISTSIZE=10000 # The number of lines kept in memory
|
||||
SAVEHIST=10000 # The number of lines kept in the history file
|
||||
setopt APPEND_HISTORY # Append history to the history file (don't overwrite)
|
||||
setopt INC_APPEND_HISTORY # Append to the history file incrementally
|
||||
setopt SHARE_HISTORY # Share history between all zsh sessions
|
||||
setopt CORRECT
|
||||
setopt NO_NOMATCH
|
||||
setopt LIST_PACKED
|
||||
setopt ALWAYS_TO_END
|
||||
setopt GLOB_COMPLETE
|
||||
setopt COMPLETE_ALIASES
|
||||
setopt COMPLETE_IN_WORD
|
||||
setopt AUTO_CD
|
||||
setopt AUTO_CONTINUE
|
||||
setopt LONG_LIST_JOBS
|
||||
setopt HIST_VERIFY
|
||||
setopt SHARE_HISTORY
|
||||
setopt HIST_IGNORE_SPACE
|
||||
setopt HIST_SAVE_NO_DUPS
|
||||
setopt HIST_IGNORE_ALL_DUPS
|
||||
setopt EXTENDED_GLOB
|
||||
setopt TRANSIENT_RPROMPT
|
||||
setopt INTERACTIVE_COMMENTS
|
||||
|
||||
autoload -U compinit # completion
|
||||
autoload -U terminfo # terminfo keys
|
||||
zmodload -i zsh/complist # menu completion
|
||||
autoload -U promptinit # prompt
|
||||
|
||||
autoload -U up-line-or-beginning-search; zle -N up-line-or-beginning-search
|
||||
autoload -U down-line-or-beginning-search; zle -N down-line-or-beginning-search
|
||||
|
||||
|
||||
|
||||
if [ "$TERM" = "linux" ] ; then
|
||||
echo -en "\e]P0232323"
|
||||
fi
|
||||
|
||||
clear
|
||||
source ~/.zkbd
|
||||
~/coding/scripts/splash.sh
|
||||
eval "$(starship init zsh)"
|
||||
s_check && (aplay ~/sound/sys/sh-source.wav > /dev/null 2>&1 &)
|
||||
'';
|
||||
|
||||
# Options
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user