Update some more configs
This commit is contained in:
parent
0a24ffcef1
commit
a33392537c
6 changed files with 114 additions and 10 deletions
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
home/neovim/neovim/spell/en_us
|
||||||
|
home/neovim/neovim/spell/wordlist
|
||||||
|
home/neovim/neovim/spell/wordlist.utf-8.spl
|
||||||
|
home/aselimov/firefox/sanitize-exceptions.nix
|
||||||
|
|
@ -1,8 +1,21 @@
|
||||||
{config, pkgs, ... }:
|
{config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
sanitizeExceptionsFile = ./sanitize-exceptions.nix;
|
||||||
|
sanitizeExceptions =
|
||||||
|
if builtins.pathExists sanitizeExceptionsFile
|
||||||
|
then import sanitizeExceptionsFile
|
||||||
|
else [ ];
|
||||||
|
in
|
||||||
{
|
{
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
policies = {
|
||||||
|
SanitizeOnShutdown = {
|
||||||
|
Cookies = true;
|
||||||
|
|
||||||
|
Exceptions = sanitizeExceptions;
|
||||||
|
};
|
||||||
|
};
|
||||||
profiles.default = {
|
profiles.default = {
|
||||||
id = 0;
|
id = 0;
|
||||||
isDefault = true;
|
isDefault = true;
|
||||||
|
|
@ -14,7 +27,6 @@
|
||||||
"sidebar.verticalTabs" = true;
|
"sidebar.verticalTabs" = true;
|
||||||
"sidebar.revamp" = true;
|
"sidebar.revamp" = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
userChrome = builtins.readFile ./userChrome.css;
|
userChrome = builtins.readFile ./userChrome.css;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,8 @@ in
|
||||||
yt-dlp
|
yt-dlp
|
||||||
pass
|
pass
|
||||||
dino
|
dino
|
||||||
|
wtype
|
||||||
|
libnotify
|
||||||
];
|
];
|
||||||
home.pointerCursor = {
|
home.pointerCursor = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -122,4 +124,24 @@ in
|
||||||
maxCacheTtl = 86400;
|
maxCacheTtl = 86400;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.file."bin/passmenu" = {
|
||||||
|
executable= true;
|
||||||
|
text = ''
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
prefix="$HOME/.password-store"
|
||||||
|
|
||||||
|
password_file="$(
|
||||||
|
find "$prefix" -type f -name '*.gpg' |
|
||||||
|
sed "s|^$prefix/||; s|\.gpg$||" |
|
||||||
|
fuzzel --dmenu
|
||||||
|
)"
|
||||||
|
|
||||||
|
[ -n "$password_file" ] || exit
|
||||||
|
|
||||||
|
pass show "$password_file" | head -n1 | wtype -
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file."bin/volume.sh".source = ./scripts/volume.sh;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -370,22 +370,19 @@ binds {
|
||||||
// Most actions that you can bind here can also be invoked programmatically with
|
// Most actions that you can bind here can also be invoked programmatically with
|
||||||
// `niri msg action do-something`.
|
// `niri msg action do-something`.
|
||||||
|
|
||||||
// Mod-Shift-/, which is usually the same as Mod-?,
|
|
||||||
// shows a list of important hotkeys.
|
|
||||||
Mod+Shift+Slash { show-hotkey-overlay; }
|
|
||||||
|
|
||||||
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||||
Mod+Shift+Return hotkey-overlay-title="Open a Terminal: ghostty" { spawn "ghostty"; }
|
Mod+Shift+Return hotkey-overlay-title="Open a Terminal: ghostty" { spawn "ghostty"; }
|
||||||
Mod+P hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; }
|
Mod+P hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; }
|
||||||
|
Mod+Shift+P { spawn "passmenu"; }
|
||||||
Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
|
Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
|
||||||
|
|
||||||
// Example volume keys mappings for PipeWire & WirePlumber.
|
// Example volume keys mappings for PipeWire & WirePlumber.
|
||||||
// The allow-when-locked=true property makes them work even when the session is locked.
|
// The allow-when-locked=true property makes them work even when the session is locked.
|
||||||
// Using spawn-sh allows to pass multiple arguments together with the command.
|
// Using spawn-sh allows to pass multiple arguments together with the command.
|
||||||
// "-l 1.0" limits the volume to 100%.
|
// "-l 1.0" limits the volume to 100%.
|
||||||
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+ -l 1.0"; }
|
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "/home/aselimov/bin/volume.sh up"; }
|
||||||
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; }
|
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "/home/aselimov/bin/volume.sh down"; }
|
||||||
XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
|
XF86AudioMute allow-when-locked=true { spawn-sh "/home/aselimov/bin/volume.sh mute"; }
|
||||||
XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
|
XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
|
||||||
|
|
||||||
// Example media keys mapping using playerctl.
|
// Example media keys mapping using playerctl.
|
||||||
|
|
|
||||||
51
home/aselimov/scripts/volume.sh
Executable file
51
home/aselimov/scripts/volume.sh
Executable file
|
|
@ -0,0 +1,51 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
up)
|
||||||
|
wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+
|
||||||
|
;;
|
||||||
|
down)
|
||||||
|
wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||||
|
;;
|
||||||
|
mute)
|
||||||
|
wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
status="$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
||||||
|
volume="$(awk '{printf "%.0f", $2 * 100}' <<< "$status")"
|
||||||
|
|
||||||
|
make_bar() {
|
||||||
|
local value="$1"
|
||||||
|
local width=36
|
||||||
|
local filled=$(( value * width / 100 ))
|
||||||
|
local empty=$(( width - filled ))
|
||||||
|
local bar=""
|
||||||
|
|
||||||
|
for ((i = 0; i < filled; i++)); do
|
||||||
|
bar+="█"
|
||||||
|
done
|
||||||
|
|
||||||
|
for ((i = 0; i < empty; i++)); do
|
||||||
|
bar+="░"
|
||||||
|
done
|
||||||
|
|
||||||
|
printf '%s' "$bar"
|
||||||
|
}
|
||||||
|
|
||||||
|
if grep -q MUTED <<< "$status"; then
|
||||||
|
title="Muted"
|
||||||
|
bar=""
|
||||||
|
else
|
||||||
|
title="${volume}%"
|
||||||
|
bar="$(make_bar "$volume")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
notify-send \
|
||||||
|
--app-name="Volume" \
|
||||||
|
--hint="string:x-canonical-private-synchronous:volume" \
|
||||||
|
"$title" \
|
||||||
|
"$bar"
|
||||||
|
|
@ -13,7 +13,8 @@
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
"pulseaudio",
|
"pulseaudio",
|
||||||
"network",
|
"network",
|
||||||
"battery",
|
"battery#bat0",
|
||||||
|
"battery#bat1",
|
||||||
"tray"
|
"tray"
|
||||||
],
|
],
|
||||||
"niri/workspaces": {
|
"niri/workspaces": {
|
||||||
|
|
@ -43,7 +44,24 @@
|
||||||
"format-disconnected": "",
|
"format-disconnected": "",
|
||||||
"tooltip-format-wifi": "{essid}"
|
"tooltip-format-wifi": "{essid}"
|
||||||
},
|
},
|
||||||
"battery": {
|
"battery#bat0": {
|
||||||
|
"bat": "BAT0",
|
||||||
|
"format": "{capacity}% {icon}",
|
||||||
|
"format-charging": "{capacity}% ",
|
||||||
|
"format-icons": [
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"states": {
|
||||||
|
"warning": 25,
|
||||||
|
"critical": 10
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"battery#bat1": {
|
||||||
|
"bat": "BAT1",
|
||||||
"format": "{capacity}% {icon}",
|
"format": "{capacity}% {icon}",
|
||||||
"format-charging": "{capacity}% ",
|
"format-charging": "{capacity}% ",
|
||||||
"format-icons": [
|
"format-icons": [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue