mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
Music + GPG agent forwarding + all sorts.
This commit is contained in:
parent
2c6230dd63
commit
c548add318
24 changed files with 525 additions and 56 deletions
|
|
@ -16,7 +16,6 @@
|
|||
binaryCaches = [ "https://arc.cachix.org" ];
|
||||
binaryCachePublicKeys =
|
||||
[ "arc.cachix.org-1:DZmhclLkB6UO0rc0rBzNpwFbbaeLfyn+fYccuAy7YVY=" ];
|
||||
};
|
||||
gc.automatic = lib.mkDefault true;
|
||||
gc.options = lib.mkDefault "--delete-older-than 1w";
|
||||
trustedUsers = [ "root" "@wheel" ];
|
||||
|
|
|
|||
|
|
@ -8,5 +8,6 @@
|
|||
./nextcloud.nix
|
||||
./gpg.nix
|
||||
./gtk.nix
|
||||
./music.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ let
|
|||
"app.update.auto" = false;
|
||||
"identity.fxaccounts.account.device.name" = superConfig.networking.hostName;
|
||||
"signon.rememberSignons" = false;
|
||||
"browser.download.lastDir" = "/home/kat/downloads";
|
||||
"browser.urlbar.placeholderName" = "DuckDuckGo";
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"identity.sync.tokenserver.uri" =
|
||||
|
|
|
|||
|
|
@ -2,9 +2,22 @@
|
|||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.gui {
|
||||
home.file.".gnupg/gpg-agent.conf".text = ''
|
||||
enable-ssh-support
|
||||
pinentry-program ${pkgs.pinentry.gtk2}/bin/pinentry
|
||||
'';
|
||||
home.sessionVariables = {
|
||||
SSH_AUTH_SOCK =
|
||||
"\${SSH_AUTH_SOCK:-$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket)}";
|
||||
};
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableExtraSocket = true;
|
||||
enableSshSupport = false;
|
||||
pinentryFlavor = "gtk2";
|
||||
extraConfig = lib.mkMerge [
|
||||
"auto-expand-secmem 0x30000" # otherwise "gpg: public key decryption failed: Cannot allocate memory"
|
||||
"pinentry-timeout 30"
|
||||
"allow-loopback-pinentry"
|
||||
"enable-ssh-support"
|
||||
"no-allow-external-cache"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
settings = {
|
||||
font_size = witch.style.font.size;
|
||||
background = witch.style.base16.color0;
|
||||
background_opacity = "0.7";
|
||||
background_opacity = "0.9";
|
||||
foreground = witch.style.base16.color7;
|
||||
selection_background = witch.style.base16.color7;
|
||||
selection_foreground = witch.style.base16.color0;
|
||||
|
|
|
|||
35
config/profiles/gui/home/music.nix
Normal file
35
config/profiles/gui/home/music.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ config, lib, pkgs, witch, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.gui {
|
||||
programs.ncmpcpp = {
|
||||
enable = true;
|
||||
mpdMusicDir = "/home/kat/music";
|
||||
};
|
||||
programs.beets = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.beets;
|
||||
settings = {
|
||||
directory = "~/music";
|
||||
library = "~/.local/share/beets.db";
|
||||
plugins = lib.concatStringsSep " " [
|
||||
"mpdstats"
|
||||
"mpdupdate"
|
||||
"duplicates"
|
||||
"chroma"
|
||||
];
|
||||
};
|
||||
};
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.startWhenNeeded = true;
|
||||
musicDirectory = "/home/kat/music";
|
||||
extraConfig = ''
|
||||
audio_output {
|
||||
type "pulse"
|
||||
name "speaker"
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +1,12 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./shell.nix ./git.nix ./tmux.nix ./ssh.nix ./emacs ./packages.nix ];
|
||||
imports = [
|
||||
./shell.nix
|
||||
./neovim
|
||||
./git.nix
|
||||
./tmux.nix
|
||||
./ssh.nix
|
||||
./packages.nix
|
||||
]; # ./emacs bye emacs lol
|
||||
}
|
||||
|
|
|
|||
7
config/profiles/kat/home/neovim/coc-settings.json
Normal file
7
config/profiles/kat/home/neovim/coc-settings.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"python.formatting.provider": "black",
|
||||
"python.jediEnabled": true,
|
||||
"python.linting.flake8Enabled": true,
|
||||
"python.linting.enabled": true,
|
||||
"python.pythonPath": "nvim-python3"
|
||||
}
|
||||
32
config/profiles/kat/home/neovim/default.nix
Normal file
32
config/profiles/kat/home/neovim/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ config, lib, pkgs, witch, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.kat {
|
||||
home.sessionVariables.EDITOR = "nvim";
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
withPython3 = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
nerdtree
|
||||
vim-nix
|
||||
coc-nvim
|
||||
coc-yank
|
||||
coc-python
|
||||
coc-json
|
||||
coc-yaml
|
||||
coc-git
|
||||
vim-fugitive
|
||||
{
|
||||
plugin = vim-startify;
|
||||
config = "let g:startify_change_to_vcs_root = 0";
|
||||
}
|
||||
];
|
||||
extraPackages = with pkgs;
|
||||
[ (python3.withPackages (ps: with ps; [ black flake8])) ];
|
||||
extraPython3Packages = (ps: with ps; [ jedi pylint ]);
|
||||
extraConfig = import ./vimrc.nix { inherit pkgs; };
|
||||
};
|
||||
xdg.configFile."nvim/coc-settings.json".text =
|
||||
builtins.readFile ./coc-settings.json;
|
||||
};
|
||||
}
|
||||
177
config/profiles/kat/home/neovim/vimrc.nix
Normal file
177
config/profiles/kat/home/neovim/vimrc.nix
Normal file
|
|
@ -0,0 +1,177 @@
|
|||
{ pkgs }:
|
||||
|
||||
''
|
||||
" Set internal encoding of vim, not needed on neovim, since coc.nvim using some
|
||||
" unicode characters in the file autoload/float.vim
|
||||
set encoding=utf-8
|
||||
|
||||
" Enable mouse
|
||||
set mouse=a
|
||||
|
||||
" Open NERDTree at start
|
||||
autocmd VimEnter * NERDTree | wincmd p
|
||||
|
||||
let g:coc_node_path='${pkgs.nodejs}/bin/node'
|
||||
|
||||
" TextEdit might fail if hidden is not set.
|
||||
set hidden
|
||||
|
||||
" Some servers have issues with backup files, see #649.
|
||||
set nobackup
|
||||
set nowritebackup
|
||||
|
||||
" Give more space for displaying messages.
|
||||
" set cmdheight=2
|
||||
|
||||
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
|
||||
" delays and poor user experience.
|
||||
set updatetime=300
|
||||
|
||||
" Don't pass messages to |ins-completion-menu|.
|
||||
set shortmess+=c
|
||||
|
||||
" Always show the signcolumn, otherwise it would shift the text each time
|
||||
" diagnostics appear/become resolved.
|
||||
if has("patch-8.1.1564")
|
||||
" Recently vim can merge signcolumn and number column into one
|
||||
set signcolumn=number
|
||||
else
|
||||
set signcolumn=yes
|
||||
endif
|
||||
|
||||
" Use tab for trigger completion with characters ahead and navigate.
|
||||
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
|
||||
" other plugin before putting this into your config.
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
" Use <c-space> to trigger completion.
|
||||
if has('nvim')
|
||||
inoremap <silent><expr> <c-space> coc#refresh()
|
||||
else
|
||||
inoremap <silent><expr> <c-@> coc#refresh()
|
||||
endif
|
||||
|
||||
" Make <CR> auto-select the first completion item and notify coc.nvim to
|
||||
" format on enter, <cr> could be remapped by other vim plugin
|
||||
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
|
||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||
|
||||
" Use `[g` and `]g` to navigate diagnostics
|
||||
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
|
||||
nmap <silent> [g <Plug>(coc-diagnostic-prev)
|
||||
nmap <silent> ]g <Plug>(coc-diagnostic-next)
|
||||
|
||||
" GoTo code navigation.
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
nmap <silent> gy <Plug>(coc-type-definition)
|
||||
nmap <silent> gi <Plug>(coc-implementation)
|
||||
nmap <silent> gr <Plug>(coc-references)
|
||||
|
||||
" Use K to show documentation in preview window.
|
||||
nnoremap <silent> K :call <SID>show_documentation()<CR>
|
||||
|
||||
function! s:show_documentation()
|
||||
if (index(['vim','help'], &filetype) >= 0)
|
||||
execute 'h '.expand('<cword>')
|
||||
elseif (coc#rpc#ready())
|
||||
call CocActionAsync('doHover')
|
||||
else
|
||||
execute '!' . &keywordprg . " " . expand('<cword>')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Highlight the symbol and its references when holding the cursor.
|
||||
autocmd CursorHold * silent call CocActionAsync('highlight')
|
||||
|
||||
" Symbol renaming.
|
||||
nmap <leader>rn <Plug>(coc-rename)
|
||||
|
||||
" Formatting selected code.
|
||||
xmap <leader>f <Plug>(coc-format-selected)
|
||||
nmap <leader>f <Plug>(coc-format-selected)
|
||||
|
||||
augroup mygroup
|
||||
autocmd!
|
||||
" Setup formatexpr specified filetype(s).
|
||||
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
|
||||
" Update signature help on jump placeholder.
|
||||
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
|
||||
augroup end
|
||||
|
||||
" Applying codeAction to the selected region.
|
||||
" Example: `<leader>aap` for current paragraph
|
||||
xmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
nmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
|
||||
" Remap keys for applying codeAction to the current buffer.
|
||||
nmap <leader>ac <Plug>(coc-codeaction)
|
||||
" Apply AutoFix to problem on the current line.
|
||||
nmap <leader>qf <Plug>(coc-fix-current)
|
||||
|
||||
" Map function and class text objects
|
||||
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
|
||||
xmap if <Plug>(coc-funcobj-i)
|
||||
omap if <Plug>(coc-funcobj-i)
|
||||
xmap af <Plug>(coc-funcobj-a)
|
||||
omap af <Plug>(coc-funcobj-a)
|
||||
xmap ic <Plug>(coc-classobj-i)
|
||||
omap ic <Plug>(coc-classobj-i)
|
||||
xmap ac <Plug>(coc-classobj-a)
|
||||
omap ac <Plug>(coc-classobj-a)
|
||||
|
||||
" Remap <C-f> and <C-b> for scroll float windows/popups.
|
||||
if has('nvim-0.4.0') || has('patch-8.2.0750')
|
||||
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
|
||||
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
||||
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
|
||||
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
|
||||
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
|
||||
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
||||
endif
|
||||
|
||||
" Use CTRL-S for selections ranges.
|
||||
" Requires 'textDocument/selectionRange' support of language server.
|
||||
nmap <silent> <C-s> <Plug>(coc-range-select)
|
||||
xmap <silent> <C-s> <Plug>(coc-range-select)
|
||||
|
||||
" Add `:Format` command to format current buffer.
|
||||
command! -nargs=0 Format :call CocAction('format')
|
||||
|
||||
" Add `:Fold` command to fold current buffer.
|
||||
command! -nargs=? Fold :call CocAction('fold', <f-args>)
|
||||
|
||||
" Add `:OR` command for organize imports of the current buffer.
|
||||
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
|
||||
|
||||
" Add (Neo)Vim's native statusline support.
|
||||
" NOTE: Please see `:h coc-status` for integrations with external plugins that
|
||||
" provide custom statusline: lightline.vim, vim-airline.
|
||||
set statusline^=%{coc#status()}%{get(b:,'coc_current_function',''')}
|
||||
|
||||
" Mappings for CoCList
|
||||
" Show all diagnostics.
|
||||
nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr>
|
||||
" Manage extensions.
|
||||
nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr>
|
||||
" Show commands.
|
||||
nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr>
|
||||
" Find symbol of current document.
|
||||
nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr>
|
||||
" Search workspace symbols.
|
||||
nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr>
|
||||
" Do default action for next item.
|
||||
nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR>
|
||||
" Do default action for previous item.
|
||||
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
|
||||
" Resume latest coc list.
|
||||
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>
|
||||
''
|
||||
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.kat {
|
||||
home.packages = with pkgs; [
|
||||
kitty.terminfo
|
||||
];
|
||||
home.packages = with pkgs; [ kitty.terminfo ];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,6 @@
|
|||
programs.fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
${if (config.deploy.profile.gui) then
|
||||
"export SSH_AUTH_SOCK=(gpgconf --list-dirs agent-ssh-socket)"
|
||||
else
|
||||
""}
|
||||
fish_vi_key_bindings
|
||||
set -g fish_greeting ""
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
programs.fish.shellAliases = {
|
||||
tne = "tmux new -s";
|
||||
tat = "tmux attach -t";
|
||||
tren = "tmux new -AD -s";
|
||||
};
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
|
|
@ -37,6 +38,9 @@
|
|||
|
||||
# messages
|
||||
set -g message-style 'fg=colour232 bg=colour16 bold'
|
||||
|
||||
# mouse
|
||||
set -g mouse on
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
|||
151
config/profiles/sway/home/grimshot.sh
Executable file
151
config/profiles/sway/home/grimshot.sh
Executable file
|
|
@ -0,0 +1,151 @@
|
|||
#!/bin/sh
|
||||
|
||||
## Grimshot: a helper for screenshots within sway
|
||||
## Requirements:
|
||||
## - `grim`: screenshot utility for wayland
|
||||
## - `slurp`: to select an area
|
||||
## - `swaymsg`: to read properties of current window
|
||||
## - `wl-copy`: clipboard utility
|
||||
## - `jq`: json utility to parse swaymsg output
|
||||
## - `notify-send`: to show notifications
|
||||
## Those are needed to be installed, if unsure, run `grimshot check`
|
||||
##
|
||||
## See `man 1 grimshot` or `grimshot usage` for further details.
|
||||
|
||||
getTargetDirectory() {
|
||||
echo "/home/kat/media/Screenshots"
|
||||
}
|
||||
|
||||
if [ "$1" = "--notify" ]; then
|
||||
NOTIFY=yes
|
||||
shift 1
|
||||
else
|
||||
NOTIFY=no
|
||||
fi
|
||||
|
||||
ACTION=${1:-usage}
|
||||
SUBJECT=${2:-screen}
|
||||
FILE=${3:-$(getTargetDirectory)/$(date -Ins).png}
|
||||
|
||||
if [ "$ACTION" != "save" ] && [ "$ACTION" != "copy" ] && [ "$ACTION" != "check" ]; then
|
||||
echo "Usage:"
|
||||
echo " grimshot [--notify] (copy|save) [active|screen|output|area|window] [FILE]"
|
||||
echo " grimshot check"
|
||||
echo " grimshot usage"
|
||||
echo ""
|
||||
echo "Commands:"
|
||||
echo " copy: Copy the screenshot data into the clipboard."
|
||||
echo " save: Save the screenshot to a regular file."
|
||||
echo " check: Verify if required tools are installed and exit."
|
||||
echo " usage: Show this message and exit."
|
||||
echo ""
|
||||
echo "Targets:"
|
||||
echo " active: Currently active window."
|
||||
echo " screen: All visible outputs."
|
||||
echo " output: Currently active output."
|
||||
echo " area: Manually select a region."
|
||||
echo " window: Manually select a window."
|
||||
exit
|
||||
fi
|
||||
|
||||
notify() {
|
||||
notify-send -t 3000 -a grimshot "$@"
|
||||
}
|
||||
notifyOk() {
|
||||
[ "$NOTIFY" = "no" ] && return
|
||||
|
||||
TITLE=${2:-"Screenshot"}
|
||||
MESSAGE=${1:-"OK"}
|
||||
notify "$TITLE" "$MESSAGE"
|
||||
}
|
||||
notifyError() {
|
||||
if [ $NOTIFY = "yes" ]; then
|
||||
TITLE=${2:-"Screenshot"}
|
||||
MESSAGE=${1:-"Error taking screenshot with grim"}
|
||||
notify -u critical "$TITLE" "$MESSAGE"
|
||||
else
|
||||
echo $1
|
||||
fi
|
||||
}
|
||||
|
||||
die() {
|
||||
MSG=${1:-Bye}
|
||||
notifyError "Error: $MSG"
|
||||
exit 2
|
||||
}
|
||||
|
||||
check() {
|
||||
COMMAND=$1
|
||||
if command -v "$COMMAND" > /dev/null 2>&1; then
|
||||
RESULT="OK"
|
||||
else
|
||||
RESULT="NOT FOUND"
|
||||
fi
|
||||
echo " $COMMAND: $RESULT"
|
||||
}
|
||||
|
||||
takeScreenshot() {
|
||||
FILE=$1
|
||||
GEOM=$2
|
||||
OUTPUT=$3
|
||||
if [ ! -z "$OUTPUT" ]; then
|
||||
grim -o "$OUTPUT" "$FILE" || die "Unable to invoke grim"
|
||||
elif [ -z "$GEOM" ]; then
|
||||
grim "$FILE" || die "Unable to invoke grim"
|
||||
else
|
||||
grim -g "$GEOM" "$FILE" || die "Unable to invoke grim"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$ACTION" = "check" ] ; then
|
||||
echo "Checking if required tools are installed. If something is missing, install it to your system and make it available in PATH..."
|
||||
check grim
|
||||
check slurp
|
||||
check swaymsg
|
||||
check wl-copy
|
||||
check jq
|
||||
check notify-send
|
||||
exit
|
||||
elif [ "$SUBJECT" = "area" ] ; then
|
||||
GEOM=$(slurp -d)
|
||||
# Check if user exited slurp without selecting the area
|
||||
if [ -z "$GEOM" ]; then
|
||||
exit
|
||||
fi
|
||||
WHAT="Area"
|
||||
elif [ "$SUBJECT" = "active" ] ; then
|
||||
FOCUSED=$(swaymsg -t get_tree | jq -r 'recurse(.nodes[]?, .floating_nodes[]?) | select(.focused)')
|
||||
GEOM=$(echo "$FOCUSED" | jq -r '.rect | "\(.x),\(.y) \(.width)x\(.height)"')
|
||||
APP_ID=$(echo "$FOCUSED" | jq -r '.app_id')
|
||||
WHAT="$APP_ID window"
|
||||
elif [ "$SUBJECT" = "screen" ] ; then
|
||||
GEOM=""
|
||||
WHAT="Screen"
|
||||
elif [ "$SUBJECT" = "output" ] ; then
|
||||
GEOM=""
|
||||
OUTPUT=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused)' | jq -r '.name')
|
||||
WHAT="$OUTPUT"
|
||||
elif [ "$SUBJECT" = "window" ] ; then
|
||||
GEOM=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp)
|
||||
# Check if user exited slurp without selecting the area
|
||||
if [ -z "$GEOM" ]; then
|
||||
exit
|
||||
fi
|
||||
WHAT="Window"
|
||||
else
|
||||
die "Unknown subject to take a screen shot from" "$SUBJECT"
|
||||
fi
|
||||
|
||||
if [ "$ACTION" = "copy" ] ; then
|
||||
takeScreenshot - "$GEOM" "$OUTPUT" | wl-copy --type image/png || die "Clipboard error"
|
||||
notifyOk "$WHAT copied to buffer"
|
||||
else
|
||||
if takeScreenshot "$FILE" "$GEOM" "$OUTPUT"; then
|
||||
TITLE="Screenshot of $SUBJECT"
|
||||
MESSAGE=$(basename "$FILE")
|
||||
notifyOk "$MESSAGE" "$TITLE"
|
||||
echo $FILE
|
||||
else
|
||||
notifyError "Error taking screenshot with grim"
|
||||
fi
|
||||
fi
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
XDG_SESSION_TYPE = "wayland";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [ grim slurp ];
|
||||
home.packages = with pkgs; [ grim slurp wl-clipboard jq ];
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
|
|
@ -138,6 +138,13 @@
|
|||
"${cfg.modifier}+d" = "exec ${cfg.menu}";
|
||||
"${cfg.modifier}+x" = "exec ${lockCommand}";
|
||||
|
||||
"${cfg.modifier}+Print" =
|
||||
"exec ${./grimshot.sh} --notify save screen";
|
||||
"${cfg.modifier}+Shift+Print" =
|
||||
"exec ${./grimshot.sh} --notify save area";
|
||||
"${cfg.modifier}+Mod1+Print" =
|
||||
"exec ${./grimshot.sh} --notify save window";
|
||||
|
||||
"${cfg.modifier}+i" = "move workspace to output left";
|
||||
"${cfg.modifier}+o" = "move workspace to output left";
|
||||
"${cfg.modifier}+b" = "splith";
|
||||
|
|
@ -172,15 +179,15 @@
|
|||
colors = {
|
||||
focused = {
|
||||
border = witch.style.base16.color8;
|
||||
background = witch.style.base16.color4;
|
||||
background = witch.style.base16.color13;
|
||||
text = witch.style.base16.color0;
|
||||
indicator = witch.style.base16.color2;
|
||||
childBorder = witch.style.base16.color8;
|
||||
};
|
||||
focusedInactive = {
|
||||
border = witch.style.base16.color0;
|
||||
background = witch.style.base16.color11;
|
||||
text = witch.style.base16.color12;
|
||||
background = witch.style.base16.color10;
|
||||
text = witch.style.base16.color13;
|
||||
indicator = witch.style.base16.color2;
|
||||
childBorder = witch.style.base16.color8;
|
||||
};
|
||||
|
|
@ -192,7 +199,7 @@
|
|||
childBorder = witch.style.base16.color8;
|
||||
};
|
||||
urgent = {
|
||||
border = witch.style.base16.color8;
|
||||
border = witch.style.base16.color0;
|
||||
background = witch.style.base16.color9;
|
||||
text = witch.style.base16.color0;
|
||||
indicator = witch.style.base16.color1;
|
||||
|
|
|
|||
|
|
@ -10,15 +10,18 @@
|
|||
};
|
||||
settings = [{
|
||||
modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ];
|
||||
modules-center = [ "clock" "custom/weather" ];
|
||||
modules-center = [ ]; # "clock" "custom/weather"
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"network"
|
||||
"cpu"
|
||||
"memory"
|
||||
"temperature"
|
||||
"backlight"
|
||||
"battery"
|
||||
#"mpd"
|
||||
"network"
|
||||
"custom/weather"
|
||||
"clock"
|
||||
"tray"
|
||||
];
|
||||
|
||||
|
|
@ -33,9 +36,15 @@
|
|||
format = "{}";
|
||||
interval = 3600;
|
||||
on-click = "xdg-open 'https://google.com/search?q=weather'";
|
||||
exec = "${pkgs.kat-weather}/bin/kat-weather ${witch.secrets.profiles.sway.city} ${witch.secrets.profiles.sway.api_key}";
|
||||
exec =
|
||||
"${pkgs.kat-weather}/bin/kat-weather ${witch.secrets.profiles.sway.city} ${witch.secrets.profiles.sway.api_key}";
|
||||
};
|
||||
cpu = { format = " {usage}%"; };
|
||||
#mpd = {
|
||||
# format = " {album} - {artist} - {title}";
|
||||
# format-stopped = "ﱙ";
|
||||
# format-paused = " Paused";
|
||||
#};
|
||||
memory = { format = " {percentage}%"; };
|
||||
temperature = { format = "﨎 {temperatureC}°C"; };
|
||||
backlight = {
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@
|
|||
#workspaces { padding: 0px 4px 0px 4px }
|
||||
|
||||
#workspaces button {
|
||||
color: ${style.base16.color7};
|
||||
background: ${hextorgba style.base16.color11};
|
||||
color: ${style.base16.color13};
|
||||
background: ${hextorgba style.base16.color10};
|
||||
font-size: 16px;
|
||||
margin: 0px 4px 0px 4px;
|
||||
border-bottom: 2px solid transparent;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue