rearrange directory structure
This commit is contained in:
parent
2fe0f94a23
commit
67cb4995f9
33 changed files with 213 additions and 219 deletions
15
home/programs/git.nix
Normal file
15
home/programs/git.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
aliases = {
|
||||
graph = "log --oneline --all --graph";
|
||||
amend = "commit --amend --no-edit";
|
||||
};
|
||||
delta = {
|
||||
enable = true;
|
||||
};
|
||||
extraConfig = {
|
||||
pull.rebase = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
95
home/programs/graphical.nix
Normal file
95
home/programs/graphical.nix
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
imv
|
||||
obs-studio
|
||||
selectdefaultapplication
|
||||
easyeffects
|
||||
inkscape
|
||||
libsForQt5.okular
|
||||
pavucontrol
|
||||
qpwgraph
|
||||
element-desktop
|
||||
brave
|
||||
gimp
|
||||
quickemu
|
||||
bitwarden
|
||||
libsForQt5.kasts
|
||||
libreoffice
|
||||
logseq
|
||||
insomnia
|
||||
dbeaver
|
||||
];
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "Vimix-Doder";
|
||||
package = pkgs.vimix-icon-theme;
|
||||
};
|
||||
cursorTheme = {
|
||||
name = "Vanilla-DMZ";
|
||||
package = pkgs.vanilla-dmz;
|
||||
size = 24;
|
||||
};
|
||||
gtk3.bookmarks = [
|
||||
"file:///home/tristan/Documents"
|
||||
"file:///home/tristan/Pictures/Screenshots"
|
||||
"file:///home/tristan/Downloads"
|
||||
];
|
||||
};
|
||||
|
||||
programs.mpv.enable = true;
|
||||
programs.mpv.bindings = {
|
||||
l = "seek 5";
|
||||
h = "seek -5";
|
||||
e = "add chapter 1";
|
||||
b = "add chapter -1";
|
||||
">" = "multiply speed 1.1";
|
||||
"<" = "multiply speed 1/1.1";
|
||||
"." = "frame-step";
|
||||
"," = "frame-back-step";
|
||||
"ctrl+n" = "playlist-next";
|
||||
"ctrl+p" = "playlist-prev";
|
||||
k = "add volume 2";
|
||||
j = "add volume -2";
|
||||
m = "cycle mute";
|
||||
c = "cycle sub-visibility";
|
||||
};
|
||||
programs.mpv.scripts = [
|
||||
pkgs.mpvScripts.mpris
|
||||
];
|
||||
|
||||
programs.librewolf.enable = true;
|
||||
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
searchEngines = {
|
||||
DEFAULT = "https://search.brave.com/search?q={}";
|
||||
w = "https://en.wikipedia.org/wiki/Special:Search?search={}&go=Go&ns0=1";
|
||||
aw = "https://wiki.archlinux.org/?search={}";
|
||||
nw = "https://nixos.wiki/index.php?search={}";
|
||||
nixpkgs = "https://search.nixos.org/packages?channel=unstable&query={}";
|
||||
};
|
||||
settings = {
|
||||
colors = {
|
||||
webpage.preferred_color_scheme = "dark";
|
||||
};
|
||||
tabs = {
|
||||
background = false;
|
||||
indicator.width = 0;
|
||||
favicons.scale = 2.0;
|
||||
position = "left";
|
||||
show = "always";
|
||||
width = 40;
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
c.tabs.padding = {
|
||||
"bottom" : 10,
|
||||
"left" : 5,
|
||||
"right" : 5,
|
||||
"top" : 10
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
160
home/programs/hyprland.nix
Normal file
160
home/programs/hyprland.nix
Normal file
|
|
@ -0,0 +1,160 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(import ./swaylock.nix)
|
||||
(import ./swayidle.nix)
|
||||
];
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
configPackages = [pkgs.hyprland];
|
||||
extraPortals = [pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-gtk];
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
input = {
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
scroll_factor = 0.5;
|
||||
};
|
||||
};
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_numbered = true;
|
||||
};
|
||||
decoration = {
|
||||
rounding = 5;
|
||||
drop_shadow = false;
|
||||
};
|
||||
bezier = [
|
||||
"overshot, 0.05, 0.9, 0.1, 1.1"
|
||||
"linear, 0.0, 0.0, 1.0, 1.0"
|
||||
];
|
||||
animations = {
|
||||
enabled = true;
|
||||
animation = [
|
||||
"windows, 1, 1, default, popin"
|
||||
"border, 1, 1, default"
|
||||
"fade, 1, 1, default"
|
||||
"workspaces, 1, 3, overshot"
|
||||
"borderangle,1, 50, linear, loop"
|
||||
];
|
||||
};
|
||||
bind = [
|
||||
"SUPER, h, movefocus,l"
|
||||
"SUPER, l, movefocus,r"
|
||||
"SUPER, j, layoutmsg,cyclenext"
|
||||
"SUPER, k, layoutmsg,cycleprev"
|
||||
"SUPER, space, layoutmsg,swapwithmaster master"
|
||||
"SUPER, F, fullscreen,"
|
||||
"SUPER, V, togglefloating,"
|
||||
"SUPER, W, layoutmsg, orientationprev"
|
||||
"SUPER_SHIFT, W, layoutmsg, orientationnext"
|
||||
"SUPER_SHIFT, V, togglegroup,"
|
||||
"SUPER_SHIFT, h, changegroupactive,b"
|
||||
"SUPER_SHIFT, h, moveintogroup,l"
|
||||
"SUPER_SHIFT, l, moveintogroup,r"
|
||||
"SUPER_SHIFT, l, changegroupactive,f"
|
||||
"SUPER, Y, togglespecialworkspace"
|
||||
"SUPER_SHIFT, Y, movetoworkspace, special"
|
||||
"SUPER_SHIFT, X, killactive"
|
||||
"SUPER, slash, focuswindow, brave-browser"
|
||||
"SUPER, n, focuswindow, Logseq"
|
||||
"SUPER, R, submap, resize"
|
||||
"SUPER,1,workspace,1"
|
||||
"SUPER,2,workspace,2"
|
||||
"SUPER,3,workspace,3"
|
||||
"SUPER,4,workspace,4"
|
||||
"SUPER,5,workspace,5"
|
||||
"SUPER,6,workspace,6"
|
||||
"SUPER,7,workspace,7"
|
||||
"SUPER,8,workspace,8"
|
||||
"SUPER,9,workspace,9"
|
||||
"SUPER,0,workspace,10"
|
||||
"SUPER,left,workspace,r-1"
|
||||
"SUPER,right,workspace,r+1"
|
||||
"SUPER_SHIFT,1,movetoworkspace,1"
|
||||
"SUPER_SHIFT,2,movetoworkspace,2"
|
||||
"SUPER_SHIFT,3,movetoworkspace,3"
|
||||
"SUPER_SHIFT,4,movetoworkspace,4"
|
||||
"SUPER_SHIFT,5,movetoworkspace,5"
|
||||
"SUPER_SHIFT,6,movetoworkspace,6"
|
||||
"SUPER_SHIFT,7,movetoworkspace,7"
|
||||
"SUPER_SHIFT,8,movetoworkspace,8"
|
||||
"SUPER_SHIFT,9,movetoworkspace,9"
|
||||
"SUPER_SHIFT,0,movetoworkspace,10"
|
||||
];
|
||||
bindm = [
|
||||
"SUPER, mouse:272, movewindow"
|
||||
"SUPER, mouse:273, resizewindow"
|
||||
];
|
||||
env = [
|
||||
"GDK_BACKEND,wayland,x11"
|
||||
"QT_QPA_PLATFORM,wayland;xcb"
|
||||
"SDL_VIDEODRIVER,wayland"
|
||||
"CLUTTER_BACKEND,wayland"
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"NIXOS_OZONE_WL,1"
|
||||
"WLR_NO_HARDWARE_CURSORS,1"
|
||||
];
|
||||
windowrule = [
|
||||
"float, title:wlogout"
|
||||
"idleinhibit always, vrmonitor"
|
||||
"idleinhibit focus, steam_app"
|
||||
];
|
||||
workspace = [
|
||||
"11, default:true"
|
||||
];
|
||||
general = {
|
||||
gaps_out = 10;
|
||||
resize_on_border = true;
|
||||
layout = "master";
|
||||
# "col.active_border" = "rgb(FFFF00) rgb(00FFFF) rgb(FF00FF)";
|
||||
border_size = lib.mkDefault 5;
|
||||
};
|
||||
master = {
|
||||
mfact = 0.7;
|
||||
new_on_top = true;
|
||||
};
|
||||
misc = {
|
||||
vrr = 2;
|
||||
focus_on_activate = true;
|
||||
};
|
||||
};
|
||||
# https://wiki.hyprland.org/Configuring/Variables/
|
||||
extraConfig = ''
|
||||
submap = resize
|
||||
binde = ,right,resizeactive,10 0
|
||||
binde = ,left,resizeactive,-10 0
|
||||
binde = ,up,resizeactive,0 -10
|
||||
binde = ,down,resizeactive,0 10
|
||||
binde = ,k,resizeactive,0 -10
|
||||
binde = ,j,resizeactive,0 10
|
||||
binde = ,l,splitratio,0.05
|
||||
binde = ,h,splitratio,-0.05
|
||||
binde = SHIFT,l,splitratio,0.3
|
||||
binde = SHIFT,h,splitratio,-0.3
|
||||
|
||||
bind = , escape, submap,reset
|
||||
bind = , enter, submap,reset
|
||||
bind = SUPER, R, submap,reset
|
||||
bind = CONTROL, C, submap,reset
|
||||
submap = reset
|
||||
'';
|
||||
};
|
||||
|
||||
services.mako = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.waybar.settings.mainBar.modules-left = ["hyprland/workspaces" "hyprland/window"];
|
||||
}
|
||||
28
home/programs/neovim/config.lua
Normal file
28
home/programs/neovim/config.lua
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
vim.o.relativenumber = true
|
||||
vim.o.signcolumn = 'yes'
|
||||
vim.o.tabstop = 2
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.expandtab = true
|
||||
vim.o.smartindent = true
|
||||
vim.o.hlsearch = false
|
||||
vim.o.scrolloff = 4
|
||||
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||
|
||||
vim.keymap.set("x", "p", "\"_dP")
|
||||
|
||||
vim.keymap.set("n", "<leader>y", "\"+y")
|
||||
vim.keymap.set("v", "<leader>y", "\"+y")
|
||||
|
||||
-- Global mappings.
|
||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float)
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist)
|
||||
|
||||
vim.keymap.set('v', '<C-c>', '"+y')
|
||||
vim.keymap.set('i', '<C-v>', '<escape>"+p')
|
||||
51
home/programs/neovim/default.nix
Normal file
51
home/programs/neovim/default.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
extraLuaConfig = ''
|
||||
${builtins.readFile ./config.lua}
|
||||
'';
|
||||
extraPackages = with pkgs; [
|
||||
nodePackages_latest.typescript-language-server
|
||||
vscode-langservers-extracted
|
||||
gopls
|
||||
nil
|
||||
];
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-surround
|
||||
vim-commentary
|
||||
{
|
||||
plugin = telescope-nvim;
|
||||
type = "lua";
|
||||
config = ''
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./lspconfig.lua;
|
||||
}
|
||||
firenvim
|
||||
];
|
||||
};
|
||||
|
||||
programs.vscode = {
|
||||
extensions = [pkgs.vscode-extensions.asvetliakov.vscode-neovim];
|
||||
userSettings = {
|
||||
"vscode-neovim.neovimExecutablePaths.linux" = "${pkgs.neovim}/bin/nvim";
|
||||
"extensions.experimental.affinity" = {
|
||||
"asvetliakov.vscode-neovim" = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
48
home/programs/neovim/lspconfig.lua
Normal file
48
home/programs/neovim/lspconfig.lua
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
-- Setup language servers.
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
lspconfig.tsserver.setup {
|
||||
on_attach = function(client)
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
end
|
||||
}
|
||||
|
||||
lspconfig.eslint.setup {
|
||||
on_attach = function(client)
|
||||
client.server_capabilities.documentFormattingProvider = true
|
||||
end
|
||||
}
|
||||
|
||||
lspconfig.gopls.setup {}
|
||||
lspconfig.nil_ls.setup {}
|
||||
|
||||
-- Use LspAttach autocommand to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||
callback = function(ev)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
|
||||
|
||||
-- Buffer local mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
local opts = { buffer = ev.buf }
|
||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
|
||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts)
|
||||
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, opts)
|
||||
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, opts)
|
||||
vim.keymap.set('n', '<leader>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, opts)
|
||||
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, opts)
|
||||
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set({ 'n', 'v' }, '<space>ca', vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
|
||||
vim.keymap.set('n', '<leader>f', function()
|
||||
vim.lsp.buf.format { async = true }
|
||||
end, opts)
|
||||
end,
|
||||
})
|
||||
320
home/programs/scripts.nix
Normal file
320
home/programs/scripts.nix
Normal file
|
|
@ -0,0 +1,320 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
terminal = config.programs.terminal;
|
||||
termcmd = "${terminal}/bin/${terminal.pname}";
|
||||
my-deps = {
|
||||
notify-send = "${pkgs.libnotify}/bin/notify-send";
|
||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||
grim = "${pkgs.grim}/bin/grim";
|
||||
slurp = "${pkgs.slurp}/bin/slurp";
|
||||
amixer = "${pkgs.alsa-utils}/bin/amixer";
|
||||
swaybg = "${pkgs.swaybg}/bin/swaybg";
|
||||
chafa = "${pkgs.chafa}/bin/chafa";
|
||||
exiftool = "${pkgs.exiftool}/bin/exiftool";
|
||||
wc = "${pkgs.coreutils}/bin/wc";
|
||||
jq = "${pkgs.jq}/bin/jq";
|
||||
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
|
||||
xargs = "${pkgs.findutils}/bin/xargs";
|
||||
menu = "${config.programs.menu.package}${config.programs.menu.dmenuCommand}";
|
||||
runmenu = "${config.programs.menu.package}/bin/wofi --show drun";
|
||||
fileman = "${pkgs.pcmanfm}/bin/pcmanfm";
|
||||
gawk = "${pkgs.gawk}/bin/awk";
|
||||
hyprpicker = "${pkgs.hyprpicker}/bin/hyprpicker";
|
||||
sed = "${pkgs.gnused}/bin/sed";
|
||||
};
|
||||
in {
|
||||
programs.scripts = [
|
||||
{
|
||||
name = "play-pause";
|
||||
text = ''
|
||||
if [ "$(${my-deps.playerctl} --list-all | ${my-deps.wc} -l)" -lt 2 ]
|
||||
then
|
||||
${my-deps.playerctl} play-pause
|
||||
else
|
||||
${my-deps.playerctl} --list-all | \
|
||||
${my-deps.xargs} -I _ ${my-deps.playerctl} --player _ metadata --format '_ - {{title}}' | \
|
||||
${my-deps.menu} | ${my-deps.gawk} '{print $1}' | \
|
||||
${my-deps.xargs} -I _ ${my-deps.playerctl} --player _ play-pause
|
||||
fi
|
||||
'';
|
||||
hotkeys = [
|
||||
{
|
||||
modifier = "";
|
||||
key = "XF86AudioPlay";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "bwmenu";
|
||||
text = ''
|
||||
items="$(rbw list)"
|
||||
echo "$items" | ${my-deps.menu} | xargs -I_ rbw get _ | wl-copy
|
||||
'';
|
||||
hotkeys = [{key = "P";}];
|
||||
install = false;
|
||||
}
|
||||
{
|
||||
name = "bwotpmenu";
|
||||
text = ''
|
||||
items="$(rbw list)"
|
||||
echo "$items" | ${my-deps.menu} | xargs -I_ rbw code _ | wl-copy
|
||||
'';
|
||||
hotkeys = [
|
||||
{
|
||||
modifier = "SUPER_SHIFT";
|
||||
key = "P";
|
||||
}
|
||||
];
|
||||
install = false;
|
||||
}
|
||||
{
|
||||
name = "screenshot";
|
||||
text = ''
|
||||
OUT_DIR=~/Pictures/Screenshots
|
||||
mkdir -p "$OUT_DIR"
|
||||
FILE=$OUT_DIR/$(date +"%Y-%m-%dT%H:%M:%SZ").png
|
||||
|
||||
${my-deps.grim} -g "$(${my-deps.slurp} -o)" "$FILE"
|
||||
${my-deps.notify-send} "Screenshot Taken" "$FILE"
|
||||
|
||||
cat "$FILE" | wl-copy -t image/png
|
||||
'';
|
||||
hotkeys = [
|
||||
{
|
||||
modifier = "SUPER_SHIFT";
|
||||
key = "S";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "brightness-down";
|
||||
text = ''
|
||||
light -U $1
|
||||
${my-deps.notify-send} "Brightness" -h int:value:$(light) -a brightness-down -t 1000
|
||||
'';
|
||||
hotkeys = [
|
||||
{
|
||||
modifier = "";
|
||||
key = "XF86MonBrightnessDown";
|
||||
args = "10";
|
||||
}
|
||||
{
|
||||
modifier = "SHIFT";
|
||||
key = "XF86MonBrightnessDown";
|
||||
args = "1";
|
||||
}
|
||||
];
|
||||
install = false;
|
||||
}
|
||||
{
|
||||
name = "brightness-up";
|
||||
text = ''
|
||||
light -A $1
|
||||
${my-deps.notify-send} "Brightness" -h int:value:$(light) -a brightness-up -t 1000
|
||||
'';
|
||||
hotkeys = [
|
||||
{
|
||||
modifier = "";
|
||||
key = "XF86MonBrightnessUp";
|
||||
args = "10";
|
||||
}
|
||||
{
|
||||
modifier = "SHIFT";
|
||||
key = "XF86MonBrightnessUp";
|
||||
args = "1";
|
||||
}
|
||||
];
|
||||
install = false;
|
||||
}
|
||||
{
|
||||
name = "switch-window";
|
||||
text = ''
|
||||
${my-deps.hyprctl} clients -j | \
|
||||
${my-deps.jq} '.[] | .title' -r | \
|
||||
${my-deps.sed} '/^$/d' |
|
||||
${my-deps.menu} | \
|
||||
${my-deps.sed} 's/\([\[\(\)]\)/\\\\\1/g' | \
|
||||
${my-deps.xargs} -I_ ${my-deps.hyprctl} dispatch focuswindow title:"_"
|
||||
'';
|
||||
hotkeys = [
|
||||
{key = "TAB";}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "picker";
|
||||
text = ''
|
||||
${my-deps.hyprpicker} | wl-copy && notify-send "Copied Colour" "$(wl-paste)"
|
||||
'';
|
||||
hotkeys = [
|
||||
{
|
||||
key = "G";
|
||||
}
|
||||
];
|
||||
}
|
||||
(lib.mkIf config.roles.mpd.enable {
|
||||
name = "ncmpcpp";
|
||||
text = ''
|
||||
${termcmd} -e ncmpcpp
|
||||
'';
|
||||
hotkeys = [
|
||||
{
|
||||
key = "M";
|
||||
}
|
||||
];
|
||||
install = false;
|
||||
})
|
||||
{
|
||||
name = "menu";
|
||||
text = ''
|
||||
${my-deps.runmenu}
|
||||
'';
|
||||
hotkeys = [
|
||||
{
|
||||
key = "D";
|
||||
}
|
||||
];
|
||||
install = false;
|
||||
}
|
||||
{
|
||||
name = "zoom-in";
|
||||
text = ''
|
||||
hyprctl keyword misc:cursor_zoom_factor 2
|
||||
'';
|
||||
hotkeys = [
|
||||
{
|
||||
modifier = "SUPER";
|
||||
key = "EQUAL";
|
||||
}
|
||||
];
|
||||
install = false;
|
||||
}
|
||||
{
|
||||
name = "zoom-out";
|
||||
text = ''
|
||||
hyprctl keyword misc:cursor_zoom_factor 1
|
||||
'';
|
||||
hotkeys = [
|
||||
{
|
||||
modifier = "SUPER";
|
||||
key = "MINUS";
|
||||
}
|
||||
];
|
||||
install = false;
|
||||
}
|
||||
{
|
||||
name = "raise-volume";
|
||||
text = ''
|
||||
${my-deps.amixer} sset Master 5%+ && ${my-deps.amixer} sset Master unmute
|
||||
'';
|
||||
hotkeys = [
|
||||
{key = "bracketright";}
|
||||
{
|
||||
modifier = "";
|
||||
key = "XF86AudioRaiseVolume";
|
||||
}
|
||||
];
|
||||
install = false;
|
||||
}
|
||||
{
|
||||
name = "lower-volume";
|
||||
text = ''
|
||||
${my-deps.amixer} sset Master 5%-
|
||||
'';
|
||||
hotkeys = [
|
||||
{key = "bracketleft";}
|
||||
{
|
||||
modifier = "";
|
||||
key = "XF86AudioLowerVolume";
|
||||
}
|
||||
];
|
||||
install = false;
|
||||
}
|
||||
{
|
||||
name = "skip-track";
|
||||
text = ''
|
||||
${my-deps.playerctl} next
|
||||
'';
|
||||
hotkeys = [
|
||||
{
|
||||
modifier = "SUPER_SHIFT";
|
||||
key = "period";
|
||||
}
|
||||
{
|
||||
modifier = "";
|
||||
key = "XF86AudioNext";
|
||||
}
|
||||
];
|
||||
install = false;
|
||||
}
|
||||
{
|
||||
name = "skip-track-back";
|
||||
text = ''
|
||||
${my-deps.playerctl} previous
|
||||
'';
|
||||
hotkeys = [
|
||||
{
|
||||
modifier = "SUPER_SHIFT";
|
||||
key = "comma";
|
||||
}
|
||||
{
|
||||
modifier = "";
|
||||
key = "XF86AudioPrev";
|
||||
}
|
||||
];
|
||||
install = false;
|
||||
}
|
||||
{
|
||||
name = "terminal";
|
||||
text = termcmd;
|
||||
hotkeys = [
|
||||
{key = "RETURN";}
|
||||
];
|
||||
install = false;
|
||||
}
|
||||
{
|
||||
name = "fileman";
|
||||
text = my-deps.fileman;
|
||||
hotkeys = [
|
||||
{key = "O";}
|
||||
];
|
||||
install = false;
|
||||
}
|
||||
{
|
||||
name = "lock";
|
||||
text = ''
|
||||
res=$(echo "lock
|
||||
sleep
|
||||
hibernate" | ${my-deps.menu})
|
||||
case $res in
|
||||
lock) swaylock;;
|
||||
sleep) systemctl suspend;;
|
||||
hibernate) systemctl hibernate;;
|
||||
esac
|
||||
'';
|
||||
hotkeys = [
|
||||
{key = "Z";}
|
||||
];
|
||||
install = false;
|
||||
}
|
||||
{
|
||||
name = "git clone";
|
||||
text = ''
|
||||
url=$(wl-paste)
|
||||
${my-deps.notify-send} "Cloning $url"
|
||||
${termcmd} -e -- git clone "$url"
|
||||
${my-deps.notify-send} "Finished cloning $url"
|
||||
'';
|
||||
install = true;
|
||||
hotkeys = [
|
||||
{
|
||||
key = "C";
|
||||
modifier = "SUPER_SHIFT";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
26
home/programs/swayidle.nix
Normal file
26
home/programs/swayidle.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{pkgs, ...}: {
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
systemdTarget = "graphical-session.target";
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${pkgs.swaylock-effects}/bin/swaylock";
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = "${pkgs.swaylock-effects}/bin/swaylock";
|
||||
}
|
||||
];
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 300;
|
||||
command = "${pkgs.swaylock-effects}/bin/swaylock -f";
|
||||
}
|
||||
{
|
||||
timeout = 600;
|
||||
command = "systemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
13
home/programs/swaylock.nix
Normal file
13
home/programs/swaylock.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{pkgs, ...}: {
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
package = pkgs.swaylock-effects;
|
||||
settings = {
|
||||
clock = true;
|
||||
screenshots = true;
|
||||
effect-scale = 0.5;
|
||||
effect-blur = "10x10";
|
||||
grace = 5;
|
||||
};
|
||||
};
|
||||
}
|
||||
47
home/programs/waybar.nix
Normal file
47
home/programs/waybar.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{pkgs, ...}: {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 36;
|
||||
modules-right = ["mpris" "pulseaudio" "clock" "tray" "battery"];
|
||||
clock = {
|
||||
format = "📅 {:%a %b-%d %I:%M %p}";
|
||||
};
|
||||
pulseaudio = {
|
||||
format-muted = "🔇 {volume}";
|
||||
format = "{icon} {volume}";
|
||||
format-icons.default = ["🔈" "🔉" "🔊"];
|
||||
on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
};
|
||||
mpris = {
|
||||
format = "{player_icon} {artist} - {title}";
|
||||
format-paused = "{status_icon} {player_icon} {artist} - {title}";
|
||||
player-icons = {
|
||||
default = "▶️";
|
||||
mpd = "🎵";
|
||||
kdeconnect = "☎️";
|
||||
};
|
||||
status-icons = {
|
||||
paused = "⏸️";
|
||||
};
|
||||
};
|
||||
battery = {
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = ["🤏" "🪫" "🔋" "🔋"];
|
||||
format-charging = "🔌 {capacity}%";
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd = {
|
||||
enable = true;
|
||||
target = "graphical-session.target";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue