moar modules
This commit is contained in:
parent
a1175ba492
commit
011009d22f
17 changed files with 556 additions and 240 deletions
|
|
@ -15,61 +15,10 @@ let
|
|||
jq = "${pkgs.jq}/bin/jq";
|
||||
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
|
||||
xargs = "${pkgs.findutils}/bin/xargs";
|
||||
menu = "${pkgs.wofi}/bin/wofi --dmenu";
|
||||
menu = "${config.programs.menu.package}${config.programs.menu.dmenuCommand}";
|
||||
fileman = "${pkgs.pcmanfm}/bin/pcmanfm";
|
||||
gawk = "${pkgs.gawk}/bin/awk";
|
||||
};
|
||||
my-scripts = {
|
||||
play-pause = (pkgs.writeShellScriptBin "play-pause" ''
|
||||
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 } | ${pkgs.gawk}/bin/awk '{print $1}' | \
|
||||
${ my-deps.xargs } -I _ ${ my-deps.playerctl } --player _ play-pause
|
||||
fi
|
||||
'');
|
||||
|
||||
bwotpmenu = (pkgs.writeShellScriptBin "bwotpmenu" ''
|
||||
items="$(rbw list)"
|
||||
echo "$items" | ${ my-deps.menu } | xargs -I_ rbw code _ | wl-copy
|
||||
'');
|
||||
|
||||
bwmenu = (pkgs.writeShellScriptBin "bwmenu" ''
|
||||
items="$(rbw list)"
|
||||
echo "$items" | ${ my-deps.menu } | xargs -I_ rbw get _ | wl-copy
|
||||
'');
|
||||
|
||||
screenshot = (pkgs.writeShellScriptBin "screenshot" ''
|
||||
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
|
||||
'');
|
||||
|
||||
brightness-down = (pkgs.writeShellScriptBin "brightness-down" ''
|
||||
light -U $1
|
||||
${my-deps.notify-send} "Brightness" -h int:value:$(light) -a brightness-down -t 1000
|
||||
'');
|
||||
|
||||
brightness-up = (pkgs.writeShellScriptBin "brightness-up" ''
|
||||
light -A $1
|
||||
${my-deps.notify-send} "Brightness" -h int:value:$(light) -a brightness-up -t 1000
|
||||
'');
|
||||
|
||||
switch-window = (pkgs.writeShellScriptBin "switch-window" ''
|
||||
${my-deps.hyprctl} clients -j | \
|
||||
${my-deps.jq} '.[] | .title' -r | \
|
||||
${my-deps.menu} | \
|
||||
${my-deps.xargs} -I_ ${my-deps.hyprctl} dispatch focuswindow title:"_"
|
||||
'');
|
||||
};
|
||||
|
||||
lf-sixel = pkgs.callPackage ../../custom/lf-sixel/. { };
|
||||
in
|
||||
{
|
||||
|
|
@ -103,12 +52,13 @@ in
|
|||
quickemu
|
||||
bitwarden
|
||||
libsForQt5.kasts
|
||||
]) ++ (with my-scripts; [
|
||||
play-pause
|
||||
bwmenu
|
||||
screenshot
|
||||
brightness-up
|
||||
brightness-down
|
||||
libreoffice
|
||||
gimp
|
||||
(makeDesktopItem {
|
||||
name = "logseq";
|
||||
desktopName = "Logseq";
|
||||
exec = "${logseq}/bin/logseq --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --disable-gpu";
|
||||
})
|
||||
]);
|
||||
|
||||
programs.fish = {
|
||||
|
|
@ -168,17 +118,8 @@ in
|
|||
}
|
||||
}
|
||||
|
||||
bind = SUPER, RETURN, exec, ${ my-deps.terminal }
|
||||
bind = SUPER_SHIFT, Q, killactive,
|
||||
bind = SUPER_SHIFT, E, exit,
|
||||
bind = SUPER, d, exec, wofi --show drun
|
||||
bind = SUPER, Z, exec, ${pkgs.wlogout}/bin/wlogout
|
||||
bind = SUPER, M, exec, ${ my-deps.terminal } -e ncmpcpp
|
||||
bind = SUPER, O, exec, pcmanfm
|
||||
bind = SUPER, TAB, exec, ${ my-scripts.switch-window }/bin/switch-window
|
||||
bind = SUPER, G, exec, ${ pkgs.hyprpicker }/bin/hyprpicker | wl-copy && notify-send "Copied Colour" "$(wl-paste)"
|
||||
bind = SUPER, EQUAL, exec, hyprctl keyword misc:cursor_zoom_factor 2
|
||||
bind = SUPER, MINUS, exec, hyprctl keyword misc:cursor_zoom_factor 1
|
||||
bind = SUPER, SLASH, focuswindow, brave-browser
|
||||
bind = SUPER, n, focuswindow, Logseq
|
||||
|
||||
|
|
@ -202,20 +143,6 @@ in
|
|||
bind = SUPER, Y, togglespecialworkspace
|
||||
bind = SUPER_SHIFT, Y, movetoworkspace, special
|
||||
|
||||
bind = SUPER, P, exec,${ my-scripts.bwmenu }/bin/bwmenu
|
||||
bind = SUPER_SHIFT, P, exec,${ my-scripts.bwotpmenu }/bin/bwotpmenu
|
||||
bind = SUPER_SHIFT, S, exec,${ my-scripts.screenshot }/bin/screenshot
|
||||
|
||||
bind =,XF86AudioRaiseVolume, exec,${ my-deps.amixer } sset Master 5%+ && ${ my-deps.amixer } sset Master unmute
|
||||
bind =,XF86AudioLowerVolume, exec,${ my-deps.amixer } sset Master 5%-
|
||||
bind =,XF86AudioPlay, exec,${ my-scripts.play-pause }/bin/play-pause
|
||||
bind =,XF86AudioNext, exec,${ my-deps.playerctl } next
|
||||
bind =,XF86AudioPrev, exec,${ my-deps.playerctl } previous
|
||||
bind =,XF86MonBrightnessUp, exec,${ my-scripts.brightness-up }/bin/brightness-up 10
|
||||
bind =,XF86MonBrightnessDown, exec,${ my-scripts.brightness-down }/bin/brightness-down 10
|
||||
bind =SHIFT,XF86MonBrightnessUp, exec,${ my-scripts.brightness-up }/bin/brightness-up 1
|
||||
bind =SHIFT,XF86MonBrightnessDown, exec,${ my-scripts.brightness-down }/bin/brightness-down 1
|
||||
|
||||
bind = SUPER,1,workspace,1
|
||||
bind = SUPER,2,workspace,2
|
||||
bind = SUPER,3,workspace,3
|
||||
|
|
@ -310,7 +237,7 @@ in
|
|||
status-icons = {
|
||||
paused = "⏸️";
|
||||
};
|
||||
on-click = "${my-scripts.play-pause}/bin/play-pause";
|
||||
# on-click = "${my-scripts.play-pause}/bin/play-pause";
|
||||
};
|
||||
battery = {
|
||||
format = "{icon} {capacity}%";
|
||||
|
|
@ -397,8 +324,6 @@ in
|
|||
pkgs.mpvScripts.mpris
|
||||
];
|
||||
|
||||
programs.foot.enable = true;
|
||||
programs.foot.server.enable = true;
|
||||
programs.foot.settings = {
|
||||
main = {
|
||||
term = "xterm-256color";
|
||||
|
|
@ -568,24 +493,10 @@ in
|
|||
;;
|
||||
esac
|
||||
'';
|
||||
|
||||
programs.wofi = {
|
||||
enable = true;
|
||||
settings = {
|
||||
term = "foot";
|
||||
};
|
||||
};
|
||||
home.file.".icons/default".source = "${pkgs.vanilla-dmz}/share/icons/Vanilla-DMZ";
|
||||
|
||||
programs.librewolf.enable = true;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
aliases = {
|
||||
graph = "log --oneline --all --graph";
|
||||
amend = "commit --amend --no-edit";
|
||||
};
|
||||
};
|
||||
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
|
|
@ -891,14 +802,14 @@ color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-
|
|||
"${modifier}+o" = "exec ${my-deps.fileman}";
|
||||
XF86AudioRaiseVolume = "exec ${ my-deps.amixer } sset Master 5%+ && ${ my-deps.amixer } sset Master unmute";
|
||||
XF86AudioLowerVolume = "exec ${ my-deps.amixer } sset Master 5%-";
|
||||
XF86AudioPlay = "exec ${ my-scripts.play-pause }/bin/play-pause";
|
||||
# XF86AudioPlay = "exec ${ my-scripts.play-pause }/bin/play-pause";
|
||||
XF86AudioNext = "exec ${ my-deps.playerctl } next";
|
||||
XF86AudioPrev = "exec ${ my-deps.playerctl } previous";
|
||||
XF86MonBrightnessUp = "exec ${ my-scripts.brightness-up }/bin/brightness-up";
|
||||
XF86MonBrightnessDown = "exec ${ my-scripts.brightness-down }/bin/brightness-down";
|
||||
"${modifier}+P" = "exec ${ my-scripts.bwmenu }/bin/bwmenu";
|
||||
"${modifier}+SHIFT+P" = "exec ${ my-scripts.bwotpmenu }/bin/bwotpmenu";
|
||||
"${modifier}+SHIFT+S" = "exec ${ my-scripts.screenshot }/bin/screenshot";
|
||||
# XF86MonBrightnessUp = "exec ${ my-scripts.brightness-up }/bin/brightness-up";
|
||||
# XF86MonBrightnessDown = "exec ${ my-scripts.brightness-down }/bin/brightness-down";
|
||||
# "${modifier}+P" = "exec ${ my-scripts.bwmenu }/bin/bwmenu";
|
||||
# "${modifier}+SHIFT+P" = "exec ${ my-scripts.bwotpmenu }/bin/bwotpmenu";
|
||||
# "${modifier}+SHIFT+S" = "exec ${ my-scripts.screenshot }/bin/screenshot";
|
||||
"${modifier}+M" = "exec ${ my-deps.terminal } -e ncmpcpp";
|
||||
"${modifier}+Z" = "exec ${pkgs.swaylock-effects}/bin/swaylock -f";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,54 +3,4 @@
|
|||
{
|
||||
# don't change
|
||||
home.stateVersion = "22.05";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
sbctl
|
||||
gimp
|
||||
libreoffice
|
||||
(pkgs.makeDesktopItem {
|
||||
name = "logseq";
|
||||
desktopName = "Logseq";
|
||||
exec = "${logseq}/bin/logseq --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --disable-gpu";
|
||||
})
|
||||
];
|
||||
|
||||
programs.git = {
|
||||
userName = "Tristan Beedell";
|
||||
userEmail = "tristan.beedell@cryoserver.com";
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
extraConfig = ''
|
||||
## work laptop configuration
|
||||
exec-once = ${pkgs.swaybg}/bin/swaybg -o eDP-1 -i ~/Pictures/backgrounds/nix-soft.png &
|
||||
|
||||
general {
|
||||
gaps_out = 10
|
||||
border_size = 3
|
||||
}
|
||||
bind = SUPER, E, focuswindow, thunderbird
|
||||
bind = SUPER, t, focuswindow, brave-cifhbcnohmdccbgoicgdjpfamggdegmo-Profile_2
|
||||
'';
|
||||
};
|
||||
|
||||
programs.firefox.enable = true;
|
||||
|
||||
# wayland.windowManager.hyprland.enable = lib.mkForce false;
|
||||
# wayland.windowManager.sway.enable = true;
|
||||
# wayland.windowManager.sway.package = pkgs.swayfx;
|
||||
wayland.windowManager.sway.config = {
|
||||
input = {
|
||||
"type:keyboard" = {
|
||||
xkb_variant = "dvorak";
|
||||
};
|
||||
};
|
||||
output = {
|
||||
eDP-1 = {
|
||||
scale = "1.2";
|
||||
bg = "~/Pictures/backgrounds/nix-wallpaper-watersplash.png fill";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,53 +19,11 @@
|
|||
#gamer
|
||||
airshipper
|
||||
minetest
|
||||
|
||||
(pkgs.writeShellScriptBin "my-editor" ''
|
||||
codium $@
|
||||
'')
|
||||
];
|
||||
|
||||
services.nextcloud-client.enable = true;
|
||||
services.nextcloud-client.startInBackground = true;
|
||||
|
||||
programs.git = {
|
||||
userName = "tristan";
|
||||
userEmail = "tristan@tristans.cloud";
|
||||
};
|
||||
|
||||
accounts.email.accounts."tristan@tristans.cloud" = {
|
||||
notmuch.enable = true;
|
||||
neomutt.enable = true;
|
||||
aerc.enable = true;
|
||||
mbsync.enable = true;
|
||||
mbsync.create = "both";
|
||||
userName = "tristan@tristans.cloud";
|
||||
realName = "Tristan";
|
||||
address = "tristan@tristans.cloud";
|
||||
primary = true;
|
||||
passwordCommand = "${pkgs.rbw}/bin/rbw get privateemail";
|
||||
smtp = {
|
||||
host = "mail.privateemail.com";
|
||||
port = 465;
|
||||
tls.enable = true;
|
||||
};
|
||||
imap = {
|
||||
host = "mail.privateemail.com";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.notmuch.enable = true;
|
||||
programs.neomutt = {
|
||||
enable = true;
|
||||
vimKeys = true;
|
||||
sort = "reverse-date";
|
||||
sidebar.enable = true;
|
||||
};
|
||||
programs.mbsync.enable = true;
|
||||
services.mbsync.enable = true;
|
||||
programs.aerc.enable = true;
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
extraConfig = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue