wip: dnsc-machine setup
This commit is contained in:
parent
ffead91f28
commit
dfc586c85e
8 changed files with 158 additions and 57 deletions
7
modules/wm/awww/default.nix
Normal file
7
modules/wm/awww/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile."awww/bin" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/wm/awww/scripts";
|
||||
};
|
||||
}
|
||||
28
modules/wm/awww/scripts/random-bg.sh
Executable file
28
modules/wm/awww/scripts/random-bg.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/sh
|
||||
# Changes the wallpaper to a randomly chosen image in a given directory
|
||||
# at a set interval.
|
||||
|
||||
DEFAULT_INTERVAL=300 # In seconds
|
||||
|
||||
if [ $# -lt 1 ] || [ ! -d "$1" ]; then
|
||||
printf "Usage:\n\t\e[1m%s\e[0m \e[4mDIRECTORY\e[0m [\e[4mINTERVAL\e[0m]\n" "$0"
|
||||
printf "\tChanges the wallpaper to a randomly chosen image in DIRECTORY every\n\tINTERVAL seconds (or every %d seconds if unspecified)." "$DEFAULT_INTERVAL"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# See awww-img(1)
|
||||
RESIZE_TYPE="fit"
|
||||
export AWWW_TRANSITION_FPS="${AWWW_TRANSITION_FPS:-60}"
|
||||
export AWWW_TRANSITION_STEP="${AWWW_TRANSITION_STEP:-2}"
|
||||
|
||||
while true; do
|
||||
find "$1" -type f \
|
||||
| while read -r img; do
|
||||
echo "$(</dev/urandom tr -dc a-zA-Z0-9 | head -c 8):$img"
|
||||
done \
|
||||
| sort -n | cut -d':' -f2- \
|
||||
| while read -r img; do
|
||||
awww img --resize="$RESIZE_TYPE" "$img"
|
||||
sleep "${2:-$DEFAULT_INTERVAL}"
|
||||
done
|
||||
done
|
||||
|
|
@ -69,7 +69,7 @@ cursor {
|
|||
xcursor-theme "Bibata-Modern-Ice"
|
||||
xcursor-size 24
|
||||
hide-when-typing
|
||||
hide-after-inactive-ms 1000
|
||||
hide-after-inactive-ms 5000
|
||||
}
|
||||
|
||||
layout {
|
||||
|
|
@ -183,7 +183,7 @@ layout {
|
|||
}
|
||||
|
||||
// STARTUP
|
||||
// spawn-at-startup ""
|
||||
spawn-at-startup "swww-daemon" // Wallpaper
|
||||
// spawn-sh-at-startup ""
|
||||
|
||||
hotkey-overlay {
|
||||
|
|
@ -275,8 +275,9 @@ binds {
|
|||
Mod+Return hotkey-overlay-title="Open a terminal" { spawn "wezterm"; }
|
||||
Mod+Space hotkey-overlay-title="Launcher" { spawn "fuzzel"; }
|
||||
Mod+B hotkey-overlay-title="Browser" { spawn "firefox"; }
|
||||
Mod+M hotkey-overlay-title="System Monitor" { spawn "wezterm start -- btop"; }
|
||||
Mod+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
|
||||
Mod+M hotkey-overlay-title="System Monitor" { spawn-sh "wezterm start -- btop"; }
|
||||
Mod+N hotkey-overlay-title="File Manager" { spawn "pcmanfm"; }
|
||||
Mod+Alt+L hotkey-overlay-title="Lock the Screen: hyprlock" { spawn "hyprlock"; }
|
||||
|
||||
// Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc.
|
||||
// Note: the entire command goes as a single argument. It's passed verbatim to `sh -c`.
|
||||
|
|
@ -321,10 +322,10 @@ binds {
|
|||
Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
|
||||
Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
|
||||
|
||||
Mod+Home { focus-column-first; }
|
||||
Mod+End { focus-column-last; }
|
||||
Mod+Ctrl+Home { move-column-to-first; }
|
||||
Mod+Ctrl+End { move-column-to-last; }
|
||||
Mod+A { focus-column-first; }
|
||||
Mod+E { focus-column-last; }
|
||||
Mod+Ctrl+A { move-column-to-first; }
|
||||
Mod+Ctrl+E { move-column-to-last; }
|
||||
|
||||
Mod+Shift+Left { focus-monitor-left; }
|
||||
Mod+Shift+Down { focus-monitor-down; }
|
||||
|
|
@ -335,31 +336,25 @@ binds {
|
|||
Mod+Shift+K { focus-monitor-up; }
|
||||
Mod+Shift+L { focus-monitor-right; }
|
||||
|
||||
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
|
||||
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
||||
|
||||
// Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
|
||||
// Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
|
||||
// Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
|
||||
// Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
|
||||
// Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
||||
// Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
|
||||
// Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
||||
// Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
|
||||
// ...
|
||||
|
||||
// And you can also move a whole workspace to another monitor:
|
||||
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
|
||||
// ...
|
||||
|
||||
Mod+Page_Down { focus-workspace-down; }
|
||||
Mod+Page_Up { focus-workspace-up; }
|
||||
Mod+U { focus-workspace-down; }
|
||||
Mod+I { focus-workspace-up; }
|
||||
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
|
||||
Mod+Ctrl+U { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+I { move-column-to-workspace-up; }
|
||||
Mod+D { focus-workspace-down; }
|
||||
Mod+U { focus-workspace-up; }
|
||||
Mod+Ctrl+D { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+U { move-column-to-workspace-up; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
|
||||
|
|
@ -485,7 +480,7 @@ binds {
|
|||
// Toggle tabbed column display mode.
|
||||
// Windows in this column will appear as vertical tabs,
|
||||
// rather than stacked on top of each other.
|
||||
Mod+W { toggle-column-tabbed-display; }
|
||||
// Mod+W { toggle-column-tabbed-display; }
|
||||
|
||||
// Actions to switch layouts.
|
||||
// Note: if you uncomment these, make sure you do NOT have
|
||||
|
|
@ -495,9 +490,9 @@ binds {
|
|||
// Mod+Space { switch-layout "next"; }
|
||||
// Mod+Shift+Space { switch-layout "prev"; }
|
||||
|
||||
Print { screenshot; }
|
||||
Ctrl+Print { screenshot-screen; }
|
||||
Alt+Print { screenshot-window; }
|
||||
Mod+P { screenshot; }
|
||||
Mod+Ctrl+P { screenshot-screen; }
|
||||
Mod+Alt+P { screenshot-window; }
|
||||
|
||||
// Applications such as remote-desktop clients and software KVM switches may
|
||||
// request that niri stops processing the keyboard shortcuts defined here
|
||||
|
|
@ -506,11 +501,8 @@ binds {
|
|||
// so a buggy application can't hold your session hostage.
|
||||
//
|
||||
// The allow-inhibiting=false property can be applied to other binds as well,
|
||||
// which ensures niri always processes them, even when an inhibitor is active.
|
||||
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
|
||||
|
||||
// The quit action will show a confirmation dialog to avoid accidental exits.
|
||||
Mod+Shift+E { quit; }
|
||||
Ctrl+Alt+Delete { quit; }
|
||||
|
||||
// Powers off the monitors. To turn them back on, do any input like
|
||||
|
|
|
|||
|
|
@ -10,8 +10,9 @@
|
|||
services.polkit-gnome.enable = true;
|
||||
|
||||
# WM Utilities (split out if they need additional config)
|
||||
# TODO configure ironbar
|
||||
programs.hyprlock.enable = true;
|
||||
programs.fuzzel.enable = true; # TODO switch to anyrun
|
||||
programs.waybar.enable = true; # TODO switch to ironbar
|
||||
programs.swaylock.enable = true;
|
||||
services.swayidle.enable = true;
|
||||
|
||||
# TODO: Install idle manager
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue