misc cleanups
This commit is contained in:
parent
9d612dc9cc
commit
749f79c4b6
10 changed files with 63 additions and 73 deletions
|
|
@ -13,54 +13,46 @@ function _G.bmap(mapping, opts)
|
|||
_G.map(mapping, vim.tbl_extend('force', opts or {}, { buffer = 0 }))
|
||||
end
|
||||
|
||||
local disabled_plugins = {
|
||||
'2html_plugin',
|
||||
'bugreport',
|
||||
'getscript',
|
||||
'getscriptPlugin',
|
||||
'gzip',
|
||||
'logipat',
|
||||
'netrw',
|
||||
'netrwFileHandlers',
|
||||
'netrwPlugin',
|
||||
'netrwSettings',
|
||||
'optwin',
|
||||
'rplugin',
|
||||
'rrhelper',
|
||||
'synmenu',
|
||||
'tar',
|
||||
'tarPlugin',
|
||||
'tohtml',
|
||||
'tutor',
|
||||
'vimball',
|
||||
'vimballPlugin',
|
||||
'zip',
|
||||
'zipPlugin',
|
||||
}
|
||||
|
||||
for _, plugin in ipairs(disabled_plugins) do
|
||||
vim.g['loaded_' .. plugin] = 1
|
||||
end
|
||||
|
||||
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
|
||||
if not vim.uv.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
'git',
|
||||
'clone',
|
||||
'git@github.com:folke/lazy.nvim.git',
|
||||
'https://github.com/folke/lazy.nvim.git',
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
require('lazy').setup('plugins', {
|
||||
git = { url_format = 'git@github.com:%s.git' },
|
||||
change_detection = { enabled = false },
|
||||
performance = {
|
||||
cache = {
|
||||
enabled = true,
|
||||
},
|
||||
reset_packpath = true,
|
||||
rtp = {
|
||||
reset = true,
|
||||
disabled_plugins = {
|
||||
'gzip',
|
||||
'netrwPlugin',
|
||||
'tarPlugin',
|
||||
'tohtml',
|
||||
'tutor',
|
||||
'zipPlugin',
|
||||
'2html_plugin',
|
||||
'getscript',
|
||||
'getscriptPlugin',
|
||||
'logipat',
|
||||
'netrw',
|
||||
'netrwSettings',
|
||||
'netrwFileHandlers',
|
||||
'tar',
|
||||
'tarPlugin',
|
||||
'rrhelper',
|
||||
'vimball',
|
||||
'vimballPlugin',
|
||||
'zip',
|
||||
'zipPlugin',
|
||||
'tutor',
|
||||
'rplugin',
|
||||
'synmenu',
|
||||
'optwin',
|
||||
'bugreport',
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ return {
|
|||
{ '<leader>fr', '<cmd>FzfLua resume<cr>' },
|
||||
{
|
||||
'<leader>fs',
|
||||
'<cmd>FzfLua files cwd=~/.local/bin/scripts<cr>',
|
||||
'<cmd>FzfLua files cwd=~/.config/nix/scripts<cr>',
|
||||
},
|
||||
{ '<leader>GB', '<cmd>FzfLua git_branches<cr>' },
|
||||
{ '<leader>Gb', '<cmd>FzfLua git_worktrees<cr>' },
|
||||
|
|
|
|||
1
fonts
1
fonts
|
|
@ -1 +0,0 @@
|
|||
/nix/store/sp0mz2yc3344ncbnaphfsapx67ankmn8-home-manager-files/.local/share/fonts
|
||||
|
|
@ -43,6 +43,9 @@
|
|||
# runtime/tools
|
||||
nodejs
|
||||
websocat
|
||||
luarocks
|
||||
tree-sitter
|
||||
(texlive.combine { inherit (texlive) scheme-small latexindent; })
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,6 @@ in
|
|||
|
||||
home.sessionPath = [
|
||||
"${config.home.homeDirectory}/.local/bin"
|
||||
"${config.home.homeDirectory}/.local/bin/scripts"
|
||||
]
|
||||
++ lib.optionals rust [ "${config.xdg.dataHome}/cargo/bin" ]
|
||||
++ lib.optionals go [ "${config.xdg.dataHome}/go/bin" ]
|
||||
|
|
@ -169,10 +168,6 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
home.file.".zshenv".text = ''
|
||||
export THEME="${config.theme}"
|
||||
'';
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
dotDir = "${config.xdg.configHome}/zsh";
|
||||
|
|
|
|||
|
|
@ -537,7 +537,7 @@ in
|
|||
|
||||
home.activation.linkWaybarTheme = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
target="${config.xdg.configHome}/waybar/themes/theme.css"
|
||||
[ -L "$target" ] || $DRY_RUN_CMD ln -sf "${config.xdg.configHome}/waybar/themes/${config.theme}.css" "$target"
|
||||
$DRY_RUN_CMD ln -sf "${config.xdg.configHome}/waybar/themes/${config.theme}.css" "$target"
|
||||
'';
|
||||
|
||||
xdg.configFile."X11".source =
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@
|
|||
enable = true;
|
||||
shellInit = ''
|
||||
export ZDOTDIR="$HOME/.config/zsh"
|
||||
export THEME="midnight"
|
||||
'';
|
||||
};
|
||||
programs.hyprland.enable = true;
|
||||
|
|
|
|||
20
scripts/ctl
20
scripts/ctl
|
|
@ -72,29 +72,27 @@ keyboard)
|
|||
esac
|
||||
;;
|
||||
audio)
|
||||
require pactl
|
||||
require wpctl pw-dump jq
|
||||
case "$2" in
|
||||
out)
|
||||
sinks="$(pactl list short sinks | awk '{print $1": "$2}')"
|
||||
sinks="$(pw-dump | jq -r '.[] | select(.info.props."media.class" == "Audio/Sink") | "\(.id)\t\(.info.props."node.description" // .info.props."node.name" // "unknown")"')"
|
||||
[ -z "$sinks" ] && exit 0
|
||||
count="$(printf "%s\n" "$sinks" | wc -l)"
|
||||
if [ "$XDG_SESSION_TYPE" = x11 ]; then
|
||||
choice="$(printf "%s\n" "$sinks" | dmenu -i -l "$count" -p "select sink:" | cut -d: -f1)"
|
||||
choice="$(printf "%s\n" "$sinks" | awk -F'\t' '{print $1": "$2}' | dmenu -i -p "select sink:" | cut -d: -f1)"
|
||||
else
|
||||
choice="$(printf "%s\n" "$sinks" | rofi -dmenu -i -lines "$count" -p "select sink" | cut -d: -f1)"
|
||||
choice="$(printf "%s\n" "$sinks" | awk -F'\t' '{print $1": "$2}' | rofi -dmenu -i -p "select sink" | cut -d: -f1)"
|
||||
fi
|
||||
[ "$choice" ] && pactl set-default-sink "$choice"
|
||||
[ "$choice" ] && wpctl set-default "$choice"
|
||||
;;
|
||||
in)
|
||||
sources="$(pactl list short sources | awk '{print $1": "$2}')"
|
||||
sources="$(pw-dump | jq -r '.[] | select(.info.props."media.class" == "Audio/Source") | "\(.id)\t\(.info.props."node.description" // .info.props."node.name" // "unknown")"')"
|
||||
[ -z "$sources" ] && exit 0
|
||||
count="$(printf "%s\n" "$sources" | wc -l)"
|
||||
if [ "$XDG_SESSION_TYPE" = x11 ]; then
|
||||
choice="$(printf "%s\n" "$sources" | dmenu -i -l "$count" -p "select source:" | cut -d: -f1)"
|
||||
choice="$(printf "%s\n" "$sources" | awk -F'\t' '{print $1": "$2}' | dmenu -i -p "select source:" | cut -d: -f1)"
|
||||
else
|
||||
choice="$(printf "%s\n" "$sources" | rofi -dmenu -i -lines "$count" -p "select source" | cut -d: -f1)"
|
||||
choice="$(printf "%s\n" "$sources" | awk -F'\t' '{print $1": "$2}' | rofi -dmenu -i -p "select source" | cut -d: -f1)"
|
||||
fi
|
||||
[ "$choice" ] && pactl set-default-source "$choice"
|
||||
[ "$choice" ] && wpctl set-default "$choice"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: ctl audio {in|out}" >&2
|
||||
|
|
|
|||
23
scripts/hypr
23
scripts/hypr
|
|
@ -66,26 +66,20 @@ brightness)
|
|||
esac
|
||||
;;
|
||||
volume)
|
||||
require pactl notify-send
|
||||
SINK="@DEFAULT_SINK@"
|
||||
require wpctl notify-send
|
||||
SINK="@DEFAULT_AUDIO_SINK@"
|
||||
VOL_STEP=5
|
||||
get_vol() { pactl get-sink-volume "$SINK" | awk 'NR==1{print $5+0}'; }
|
||||
get_vol() { wpctl get-volume "$SINK" | awk '{printf "%d", $2 * 100}'; }
|
||||
|
||||
case "$1" in
|
||||
up)
|
||||
vol=$(get_vol)
|
||||
[ "$vol" -lt 100 ] && vol=$((vol + VOL_STEP))
|
||||
[ "$vol" -gt 100 ] && vol=100
|
||||
pactl set-sink-volume "$SINK" "${vol}%"
|
||||
wpctl set-volume "$SINK" "${VOL_STEP}%+" --limit 1.0
|
||||
;;
|
||||
down)
|
||||
vol=$(get_vol)
|
||||
vol=$((vol - VOL_STEP))
|
||||
[ "$vol" -lt 0 ] && vol=0
|
||||
pactl set-sink-volume "$SINK" "${vol}%"
|
||||
wpctl set-volume "$SINK" "${VOL_STEP}%-"
|
||||
;;
|
||||
toggle)
|
||||
pactl set-sink-mute "$SINK" toggle
|
||||
wpctl set-mute "$SINK" toggle
|
||||
;;
|
||||
*)
|
||||
echo "Invalid subcommand: $1" >&2
|
||||
|
|
@ -93,11 +87,8 @@ volume)
|
|||
;;
|
||||
esac
|
||||
|
||||
muted=$(pactl get-sink-mute "$SINK" | awk '{print $2}')
|
||||
vol=$(get_vol)
|
||||
[ "$vol" -gt 100 ] && vol=100
|
||||
|
||||
if [ "$muted" = "yes" ]; then
|
||||
if wpctl get-volume "$SINK" | grep -q MUTED; then
|
||||
notify-send -u low -t 2500 -r 5556 "volume: ${vol}% (muted)"
|
||||
else
|
||||
notify-send -u low -t 2500 -r 5556 "volume: ${vol}%"
|
||||
|
|
|
|||
11
todo.md
Normal file
11
todo.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# todo
|
||||
|
||||
tmux colorschemes
|
||||
|
||||
everything else
|
||||
|
||||
auto setup
|
||||
|
||||
using nix shell
|
||||
|
||||
audio
|
||||
Loading…
Add table
Add a link
Reference in a new issue