Remove existing config to embrace chezmoi, add ssh config but it might not work because it's a symlink
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,4 +0,0 @@
|
|||||||
default-timeout=5000
|
|
||||||
|
|
||||||
[urgency=high]
|
|
||||||
ignore-timeout=1
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
set runtimepath^=~/.vim runtimepath+=~/.vim/after
|
|
||||||
let &packpath = &runtimepath
|
|
||||||
source ~/.config/nvim/plugged/plugins.vim
|
|
||||||
source ~/.config/nvim/plugged/pluginsettings.vim
|
|
||||||
source ~/.config/nvim/keybindings.vim
|
|
||||||
|
|
||||||
:set number
|
|
||||||
:set tabstop=2
|
|
||||||
:set expandtab
|
|
||||||
:set shiftwidth=2
|
|
||||||
:set shiftround
|
|
||||||
|
|
||||||
set backupcopy=yes
|
|
||||||
colorscheme dracula
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
|
|
||||||
let mapleader = ","
|
|
||||||
nmap <silent> <leader>fed :e $VIMHOME/init.vim<cr>
|
|
||||||
|
|
||||||
nmap <silent> <leader>ex :NERDTree<cr>
|
|
||||||
nmap <silent> <leader>exc :NERDTreeClose<cr>
|
|
||||||
|
|
||||||
" ncm2 autocomplete
|
|
||||||
"
|
|
||||||
" CTRL-C doesn't trigger the InsertLeave autocmd . map to <ESC> instead.
|
|
||||||
" inoremap <c-c> <ESC>
|
|
||||||
|
|
||||||
" " When the <Enter> key is pressed while the popup menu is visible, it only
|
|
||||||
" " hides the menu. Use this mapping to close the menu and also start a new
|
|
||||||
" " line.
|
|
||||||
" inoremap <expr> <CR> (pumvisible() ? "\<c-y>\<cr>" : "\<CR>")
|
|
||||||
|
|
||||||
" " Use <TAB> to select the popup menu:
|
|
||||||
" inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
|
||||||
" inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
|
||||||
|
|
||||||
nnoremap <C-p> :Files<space>
|
|
||||||
nnoremap <leader>amd :Files $CODE_DIR/auditManager<cr>
|
|
||||||
nnoremap <leader>a :Rg<space>
|
|
||||||
nnoremap <leader>A :exec "Rg ".expand("<cword>")<cr>
|
|
||||||
nmap <leader>to :tabnew<cr>
|
|
||||||
nmap <leader>tn :tabnext<cr>
|
|
||||||
nmap <leader>tp :tabprevious<cr>
|
|
||||||
nmap <leader>tc :tabclose<cr>
|
|
||||||
nmap <leader>ob :OpenBookmark<space>
|
|
||||||
|
|
||||||
command! -bang -nargs=* Rg
|
|
||||||
\ call fzf#vim#grep(
|
|
||||||
\ 'rg --column --line-number --no-heading --color=always --smart-case -- '.shellescape(<q-args>), 1,
|
|
||||||
\ fzf#vim#with_preview(), <bang>0)
|
|
||||||
|
|
||||||
|
|
||||||
autocmd! bufwritepost keybindings.vim source %
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
call plug#begin('~/.local/share/nvim/plugged')
|
|
||||||
" Theme
|
|
||||||
Plug 'dracula/vim', { 'as': 'dracula' }
|
|
||||||
|
|
||||||
" pretty start page
|
|
||||||
Plug 'mhinz/vim-startify'
|
|
||||||
|
|
||||||
Plug 'ap/vim-css-color'
|
|
||||||
" Include Phpactor
|
|
||||||
Plug 'phpactor/phpactor' , {'do': 'composer install', 'for': 'php'}
|
|
||||||
|
|
||||||
" autocomplete
|
|
||||||
"Plug 'ncm2/ncm2'
|
|
||||||
Plug 'roxma/nvim-yarp'
|
|
||||||
|
|
||||||
Plug 'leafgarland/typescript-vim'
|
|
||||||
|
|
||||||
" enable ncm2 for all buffers
|
|
||||||
"autocmd BufEnter * call ncm2#enable_for_buffer()
|
|
||||||
|
|
||||||
" IMPORTANT: :help Ncm2PopupOpen for more information
|
|
||||||
"set completeopt=noinsert,menuone,noselect
|
|
||||||
|
|
||||||
" Php
|
|
||||||
Plug 'StanAngeloff/php.vim'
|
|
||||||
Plug 'prettier/plugin-php', { 'branch': 'main' }
|
|
||||||
Plug 'phpactor/ncm2-phpactor'
|
|
||||||
|
|
||||||
" Go
|
|
||||||
" Plug 'ncm2/ncm2-go'
|
|
||||||
|
|
||||||
Plug 'prettier/vim-prettier'
|
|
||||||
|
|
||||||
" Svelte
|
|
||||||
Plug 'othree/html5.vim'
|
|
||||||
Plug 'pangloss/vim-javascript'
|
|
||||||
Plug 'evanleck/vim-svelte', {'branch': 'main'}
|
|
||||||
|
|
||||||
" git
|
|
||||||
Plug 'tpope/vim-fugitive'
|
|
||||||
Plug 'airblade/vim-gitgutter'
|
|
||||||
|
|
||||||
|
|
||||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
|
||||||
|
|
||||||
|
|
||||||
" Explorer
|
|
||||||
Plug 'scrooloose/nerdtree'
|
|
||||||
Plug 'Xuyuanp/nerdtree-git-plugin'
|
|
||||||
|
|
||||||
" Nice footer
|
|
||||||
Plug 'itchyny/lightline.vim'
|
|
||||||
|
|
||||||
" Search
|
|
||||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
|
||||||
Plug 'junegunn/fzf.vim'
|
|
||||||
|
|
||||||
" Commenting
|
|
||||||
Plug 'tpope/vim-commentary'
|
|
||||||
|
|
||||||
call plug#end()
|
|
||||||
|
|
||||||
autocmd! bufwritepost plugins.vim source %
|
|
||||||
@@ -1,203 +0,0 @@
|
|||||||
let g:lightline = {
|
|
||||||
\ 'colorscheme': 'nord'
|
|
||||||
\ }
|
|
||||||
|
|
||||||
let g:svelte_indent_script = 0
|
|
||||||
let g:svelte_indent_style = 0
|
|
||||||
|
|
||||||
let g:coc_global_extensions = ['coc-json', 'coc-sh', 'coc-css', 'coc-emmet', 'coc-highlight', 'coc-go', 'coc-prettier', 'coc-pairs', 'coc-html', 'coc-tsserver', 'coc-phpls']
|
|
||||||
|
|
||||||
|
|
||||||
" Prettier
|
|
||||||
" let g:prettier#exec_cmd_path = "~/.yarn/bin/prettier"
|
|
||||||
" let g:prettier#autoformat = 1
|
|
||||||
" let g:prettier#autoformat_require_pragma = 0
|
|
||||||
" Max line length that prettier will wrap on: a number or 'auto' (use
|
|
||||||
" textwidth).
|
|
||||||
" default: 'auto'
|
|
||||||
" let g:prettier#config#print_width = 'auto'
|
|
||||||
|
|
||||||
" number of spaces per indentation level: a number or 'auto' (use
|
|
||||||
" softtabstop)
|
|
||||||
" default: 'auto'
|
|
||||||
" let g:prettier#config#tab_width = '2'
|
|
||||||
|
|
||||||
" use tabs instead of spaces: true, false, or auto (use the expandtab setting).
|
|
||||||
" default: 'auto'
|
|
||||||
" let g:prettier#config#use_tabs = 'false'
|
|
||||||
|
|
||||||
" flow|babylon|typescript|css|less|scss|json|graphql|markdown or empty string
|
|
||||||
" (" let prettier choose).
|
|
||||||
" default: ''
|
|
||||||
" let g:prettier#config#parser = ''
|
|
||||||
|
|
||||||
" cli-override|file-override|prefer-file
|
|
||||||
" default: 'file-override'
|
|
||||||
" let g:prettier#config#config_precedence = 'file-override'
|
|
||||||
|
|
||||||
" always|never|preserve
|
|
||||||
" default: 'preserve'
|
|
||||||
" let g:prettier#config#prose_wrap = 'preserve'
|
|
||||||
|
|
||||||
" css|strict|ignore
|
|
||||||
" default: 'css'
|
|
||||||
" let g:prettier#config#html_whitespace_sensitivity = 'css'
|
|
||||||
|
|
||||||
" false|true
|
|
||||||
" default: 'false'
|
|
||||||
" let g:prettier#config#require_pragma = 'false'
|
|
||||||
|
|
||||||
" Define the flavor of line endings
|
|
||||||
" lf|crlf|cr|all
|
|
||||||
" defaut: 'lf'
|
|
||||||
" let g:prettier#config#end_of_line = get(g:, 'prettier#config#end_of_line', 'lf')
|
|
||||||
" Some servers have issues with backup files, see #649.
|
|
||||||
set nobackup
|
|
||||||
set nowritebackup
|
|
||||||
|
|
||||||
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
|
|
||||||
" delays and poor user experience.
|
|
||||||
set updatetime=300
|
|
||||||
|
|
||||||
" Always show the signcolumn, otherwise it would shift the text each time
|
|
||||||
" diagnostics appear/become resolved.
|
|
||||||
set signcolumn=yes
|
|
||||||
|
|
||||||
" Use tab for trigger completion with characters ahead and navigate.
|
|
||||||
" NOTE: There's always complete item selected by default, you may want to enable
|
|
||||||
" no select by `"suggest.noselect": true` in your configuration file.
|
|
||||||
" 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>
|
|
||||||
\ coc#pum#visible() ? coc#pum#next(1) :
|
|
||||||
\ CheckBackspace() ? "\<Tab>" :
|
|
||||||
\ coc#refresh()
|
|
||||||
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
|
|
||||||
|
|
||||||
" Make <CR> to accept selected completion item or notify coc.nvim to format
|
|
||||||
" <C-g>u breaks current undo, please make your own choice.
|
|
||||||
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
|
|
||||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
|
||||||
|
|
||||||
function! CheckBackspace() 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
|
|
||||||
|
|
||||||
" 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 ShowDocumentation()<CR>
|
|
||||||
|
|
||||||
function! ShowDocumentation()
|
|
||||||
if CocAction('hasProvider', 'hover')
|
|
||||||
call CocActionAsync('doHover')
|
|
||||||
else
|
|
||||||
call feedkeys('K', 'in')
|
|
||||||
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)
|
|
||||||
|
|
||||||
" Run the Code Lens action on the current line.
|
|
||||||
nmap <leader>cl <Plug>(coc-codelens-action)
|
|
||||||
|
|
||||||
" 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 CocActionAsync('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 CocActionAsync('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>
|
|
||||||
@@ -1,234 +0,0 @@
|
|||||||
### Variables
|
|
||||||
#
|
|
||||||
set $mod Mod4
|
|
||||||
set $left h
|
|
||||||
set $down j
|
|
||||||
set $up k
|
|
||||||
set $right l
|
|
||||||
set $term /home/jared-kling/.local/bin/kitty
|
|
||||||
# Your preferred application launcher
|
|
||||||
# Note: pass the final command to swaymsg so that the resulting window can be opened
|
|
||||||
# on the original workspace that the command was run on.
|
|
||||||
#set $menu wofi | xargs swaymsg exec --
|
|
||||||
set $menu exec $term --class=launcher -e bash -c 'compgen -c | grep -v fzf | sort -u | fzf --layout=reverse | xargs -r swaymsg -t command exec'
|
|
||||||
|
|
||||||
gaps top 20
|
|
||||||
gaps bottom 10
|
|
||||||
gaps left 15
|
|
||||||
gaps right 15
|
|
||||||
gaps inner 20
|
|
||||||
|
|
||||||
include /etc/sway/config-vars.d/*
|
|
||||||
|
|
||||||
### Output configuration
|
|
||||||
#
|
|
||||||
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
|
||||||
output * bg /home/jared-kling/Pictures/misty-hogwarts.jpeg fill
|
|
||||||
#
|
|
||||||
# Example configuration:
|
|
||||||
#
|
|
||||||
# output HDMI-A-1 resolution 1920x1080 position 1920,0
|
|
||||||
#
|
|
||||||
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
|
||||||
|
|
||||||
exec /home/jared-kling/.local/bin/insync.sh
|
|
||||||
exec /home/jared-kling/.local/bin/allow-screenshare.sh
|
|
||||||
# Notification daemon
|
|
||||||
exec mako
|
|
||||||
|
|
||||||
### Idle configuration
|
|
||||||
# This will lock your screen after 10 minutes of inactivity, then turn off
|
|
||||||
# your displays after another 20 minutes, and turn your screens back on when
|
|
||||||
# resumed. It will also lock your screen before your computer goes to sleep.
|
|
||||||
exec swayidle -w \
|
|
||||||
timeout 600 '~/.local/bin/create_lock_image.sh && swaylock -f' \
|
|
||||||
timeout 1800 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
|
|
||||||
before-sleep 'swaylock -f'
|
|
||||||
|
|
||||||
### Input configuration
|
|
||||||
input "1133:45081:MX_Master_2S_Mouse" {
|
|
||||||
natural_scroll "enabled"
|
|
||||||
}
|
|
||||||
|
|
||||||
input "1267:12572:VEN_04F3:00_04F3:311C_Touchpad" {
|
|
||||||
natural_scroll "enabled"
|
|
||||||
}
|
|
||||||
|
|
||||||
### Window Rules
|
|
||||||
assign [class="Slack"] 1
|
|
||||||
assign [class="firefox"] 3
|
|
||||||
assign [class="jetbrains-datagrip"] 4
|
|
||||||
assign [class="obsidian"] 6
|
|
||||||
assign [class="Spotify"] 8
|
|
||||||
assign [class="KeePassXC"] 10
|
|
||||||
|
|
||||||
# Auto float
|
|
||||||
for_window [app_id="^keepassxc"] floating enable
|
|
||||||
for_window [app_id="^launcher$"] floating enable, border none, opacity 0.8
|
|
||||||
for_window [title="\ -\ Sharing\ Indicator$"] floating enable, sticky enable
|
|
||||||
|
|
||||||
### Key bindings
|
|
||||||
#
|
|
||||||
# Basics:
|
|
||||||
#
|
|
||||||
bindsym $mod+Return exec $term
|
|
||||||
|
|
||||||
# Kill focused window
|
|
||||||
bindsym $mod+Shift+q kill
|
|
||||||
|
|
||||||
# Start your launcher
|
|
||||||
bindsym $mod+d exec $menu
|
|
||||||
|
|
||||||
|
|
||||||
# Drag floating windows by holding down $mod and left mouse button.
|
|
||||||
# Resize them with right mouse button + $mod.
|
|
||||||
# Despite the name, also works for non-floating windows.
|
|
||||||
# Change normal to inverse to use left mouse button for resizing and right
|
|
||||||
# mouse button for dragging.
|
|
||||||
floating_modifier $mod normal
|
|
||||||
|
|
||||||
# Reload the configuration file
|
|
||||||
bindsym $mod+Shift+c reload
|
|
||||||
|
|
||||||
# Exit sway (logs you out of your Wayland session)
|
|
||||||
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
|
||||||
|
|
||||||
bindsym $mod+Shift+a exec /home/jared-kling/.local/bin/power-menu.sh
|
|
||||||
bindsym $mod+Shift+s exec grimshot --notify save area
|
|
||||||
bindsym $mod+n exec makoctl dismiss
|
|
||||||
bindsym $mod+Shift+n exec makoctl dismiss -a
|
|
||||||
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
|
||||||
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
|
||||||
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
|
||||||
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
|
||||||
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
|
|
||||||
bindsym XF86MonBrightnessUp exec brightnessctl set +5%
|
|
||||||
bindsym XF86AudioPlay exec playerctl play-pause
|
|
||||||
bindsym XF86AudioNext exec playerctl next
|
|
||||||
bindsym XF86AudioPrev exec playerctl previous
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Moving around:
|
|
||||||
#
|
|
||||||
# Move your focus around
|
|
||||||
bindsym $mod+$left focus left
|
|
||||||
bindsym $mod+$down focus down
|
|
||||||
bindsym $mod+$up focus up
|
|
||||||
bindsym $mod+$right focus right
|
|
||||||
# Or use $mod+[up|down|left|right]
|
|
||||||
bindsym $mod+Left focus left
|
|
||||||
bindsym $mod+Down focus down
|
|
||||||
bindsym $mod+Up focus up
|
|
||||||
bindsym $mod+Right focus right
|
|
||||||
|
|
||||||
# Move the focused window with the same, but add Shift
|
|
||||||
bindsym $mod+Shift+$left move left
|
|
||||||
bindsym $mod+Shift+$down move down
|
|
||||||
bindsym $mod+Shift+$up move up
|
|
||||||
bindsym $mod+Shift+$right move right
|
|
||||||
# Ditto, with arrow keys
|
|
||||||
bindsym $mod+Shift+Left move left
|
|
||||||
bindsym $mod+Shift+Down move down
|
|
||||||
bindsym $mod+Shift+Up move up
|
|
||||||
bindsym $mod+Shift+Right move right
|
|
||||||
#
|
|
||||||
# Workspaces:
|
|
||||||
#
|
|
||||||
# Switch to workspace
|
|
||||||
bindsym $mod+1 workspace number 1
|
|
||||||
bindsym $mod+2 workspace number 2
|
|
||||||
bindsym $mod+3 workspace number 3
|
|
||||||
bindsym $mod+4 workspace number 4
|
|
||||||
bindsym $mod+5 workspace number 5
|
|
||||||
bindsym $mod+6 workspace number 6
|
|
||||||
bindsym $mod+7 workspace number 7
|
|
||||||
bindsym $mod+8 workspace number 8
|
|
||||||
bindsym $mod+9 workspace number 9
|
|
||||||
bindsym $mod+0 workspace number 10
|
|
||||||
# Move focused container to workspace
|
|
||||||
bindsym $mod+Shift+1 move container to workspace number 1
|
|
||||||
bindsym $mod+Shift+2 move container to workspace number 2
|
|
||||||
bindsym $mod+Shift+3 move container to workspace number 3
|
|
||||||
bindsym $mod+Shift+4 move container to workspace number 4
|
|
||||||
bindsym $mod+Shift+5 move container to workspace number 5
|
|
||||||
bindsym $mod+Shift+6 move container to workspace number 6
|
|
||||||
bindsym $mod+Shift+7 move container to workspace number 7
|
|
||||||
bindsym $mod+Shift+8 move container to workspace number 8
|
|
||||||
bindsym $mod+Shift+9 move container to workspace number 9
|
|
||||||
bindsym $mod+Shift+0 move container to workspace number 10
|
|
||||||
# Note: workspaces can have any name you want, not just numbers.
|
|
||||||
# We just use 1-10 as the default.
|
|
||||||
#
|
|
||||||
# Layout stuff:
|
|
||||||
#
|
|
||||||
# You can "split" the current object of your focus with
|
|
||||||
# $mod+b or $mod+v, for horizontal and vertical splits
|
|
||||||
# respectively.
|
|
||||||
bindsym $mod+b splith
|
|
||||||
bindsym $mod+v splitv
|
|
||||||
|
|
||||||
# Switch the current container between different layout styles
|
|
||||||
bindsym $mod+s layout stacking
|
|
||||||
bindsym $mod+w layout tabbed
|
|
||||||
bindsym $mod+e layout toggle split
|
|
||||||
|
|
||||||
# Make the current focus fullscreen
|
|
||||||
bindsym $mod+f fullscreen
|
|
||||||
|
|
||||||
# Toggle the current focus between tiling and floating mode
|
|
||||||
bindsym $mod+Shift+space floating toggle
|
|
||||||
|
|
||||||
# Swap focus between the tiling area and the floating area
|
|
||||||
bindsym $mod+space focus mode_toggle
|
|
||||||
|
|
||||||
# Move focus to the parent container
|
|
||||||
bindsym $mod+a focus parent
|
|
||||||
#
|
|
||||||
# Scratchpad:
|
|
||||||
#
|
|
||||||
# Sway has a "scratchpad", which is a bag of holding for windows.
|
|
||||||
# You can send windows there and get them back later.
|
|
||||||
|
|
||||||
# Move the currently focused window to the scratchpad
|
|
||||||
bindsym $mod+Shift+minus move scratchpad
|
|
||||||
|
|
||||||
# Show the next scratchpad window or hide the focused scratchpad window.
|
|
||||||
# If there are multiple scratchpad windows, this command cycles through them.
|
|
||||||
bindsym $mod+minus scratchpad show
|
|
||||||
#
|
|
||||||
# Resizing containers:
|
|
||||||
#
|
|
||||||
mode "resize" {
|
|
||||||
# left will shrink the containers width
|
|
||||||
# right will grow the containers width
|
|
||||||
# up will shrink the containers height
|
|
||||||
# down will grow the containers height
|
|
||||||
bindsym $left resize shrink width 10px
|
|
||||||
bindsym $down resize grow height 10px
|
|
||||||
bindsym $up resize shrink height 10px
|
|
||||||
bindsym $right resize grow width 10px
|
|
||||||
|
|
||||||
# Ditto, with arrow keys
|
|
||||||
bindsym Left resize shrink width 10px
|
|
||||||
bindsym Down resize grow height 10px
|
|
||||||
bindsym Up resize shrink height 10px
|
|
||||||
bindsym Right resize grow width 10px
|
|
||||||
|
|
||||||
# Return to default mode
|
|
||||||
bindsym Return mode "default"
|
|
||||||
bindsym Escape mode "default"
|
|
||||||
}
|
|
||||||
bindsym $mod+r mode "resize"
|
|
||||||
|
|
||||||
bar {
|
|
||||||
swaybar_command waybar
|
|
||||||
}
|
|
||||||
|
|
||||||
set $laptop "eDP-1"
|
|
||||||
bindswitch --reload --locked lid:on output $laptop disable
|
|
||||||
bindswitch --reload --locked lid:off output $laptop enable
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
include /etc/sway/config.d/*
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
image=/tmp/sway_lock_image.png
|
|
||||||
show-keyboard-layout
|
|
||||||
font=JetBrains Mono
|
|
||||||
285
.config/waybar/2
285
.config/waybar/2
@@ -1,285 +0,0 @@
|
|||||||
@import "colors.css";
|
|
||||||
* {
|
|
||||||
/* `otf-font-awesome` is required to be installed for icons */
|
|
||||||
font-family: "JetBrains Mono", FontAwesome, Roboto, Helvetica, Arial, sans-serif;
|
|
||||||
font-size: 18px;
|
|
||||||
border: none;
|
|
||||||
border-radius: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar {
|
|
||||||
background-color: rgba(43, 48, 59, 0.2);
|
|
||||||
/*border-bottom: 6px solid rgba(100, 114, 125, 0.1);*/
|
|
||||||
border-bottom: shade(alpha(#24273a, 0.9), 1.0);
|
|
||||||
color: #ffffff;
|
|
||||||
transition-property: background-color;
|
|
||||||
transition-duration: .5s;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar.hidden {
|
|
||||||
opacity: 0.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
window#waybar.empty {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
window#waybar.solo {
|
|
||||||
background-color: #FFFFFF;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
window#waybar.termite {
|
|
||||||
background-color: #3F3F3F;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar.chromium {
|
|
||||||
background-color: #000000;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
/* Use box-shadow instead of border so the text isn't offset */
|
|
||||||
box-shadow: inset 0 -6px transparent;
|
|
||||||
/* Avoid rounded borders under each button name */
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
|
||||||
button:hover {
|
|
||||||
background: inherit;
|
|
||||||
box-shadow: inset 0 -6px #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button {
|
|
||||||
padding: 5px 5px;
|
|
||||||
background-color: transparent;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button:hover {
|
|
||||||
background: rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.focused {
|
|
||||||
background-color: rgba(255, 184, 108, 0.8);
|
|
||||||
color: black;
|
|
||||||
box-shadow: inset 0 -6px rgba(255, 184, 108, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.urgent {
|
|
||||||
background-color: #eb4d4b;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mode {
|
|
||||||
background-color: #64727D;
|
|
||||||
border-bottom: 6px solid #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock,
|
|
||||||
#battery,
|
|
||||||
#cpu,
|
|
||||||
#memory,
|
|
||||||
#disk,
|
|
||||||
#temperature,
|
|
||||||
#backlight,
|
|
||||||
#network,
|
|
||||||
#pulseaudio,
|
|
||||||
#custom-media,
|
|
||||||
#tray,
|
|
||||||
#mode,
|
|
||||||
#idle_inhibitor,
|
|
||||||
#scratchpad,
|
|
||||||
#mpd {
|
|
||||||
padding: 0 10px;
|
|
||||||
color: #ffffff;
|
|
||||||
margin: 3px 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#window,
|
|
||||||
#workspaces {
|
|
||||||
margin: 0 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If workspaces is the leftmost module, omit left margin */
|
|
||||||
.modules-left > widget:first-child > #workspaces {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If workspaces is the rightmost module, omit right margin */
|
|
||||||
.modules-right > widget:last-child > #workspaces {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock {
|
|
||||||
background-color: #64727D;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery {
|
|
||||||
background-color: rgba(248, 248, 242, 1);
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.charging, #battery.plugged {
|
|
||||||
color: #ffffff;
|
|
||||||
background-color: #26A65B;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes blink {
|
|
||||||
to {
|
|
||||||
background-color: #ffffff;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.critical:not(.charging) {
|
|
||||||
background-color: #f53c3c;
|
|
||||||
color: #ffffff;
|
|
||||||
animation-name: blink;
|
|
||||||
animation-duration: 0.5s;
|
|
||||||
animation-timing-function: linear;
|
|
||||||
animation-iteration-count: infinite;
|
|
||||||
animation-direction: alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
label:focus {
|
|
||||||
background-color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#cpu {
|
|
||||||
background-color: rgba(80, 250, 123, 1);
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#memory {
|
|
||||||
background-color: rgba(189, 147, 249, 1);
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#disk {
|
|
||||||
background-color: #964B00;
|
|
||||||
}
|
|
||||||
|
|
||||||
#backlight {
|
|
||||||
background-color: #90b1b1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#network {
|
|
||||||
background-color: rgba(139, 233, 253, 1);
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#network.disconnected {
|
|
||||||
background-color: #f53c3c;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio {
|
|
||||||
background-color: #f1c40f;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio.muted {
|
|
||||||
background-color: #90b1b1;
|
|
||||||
color: #2a5c45;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-power {
|
|
||||||
margin-right: 20px;
|
|
||||||
padding: 0 10px;
|
|
||||||
background-color: #eb4d4b;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-media {
|
|
||||||
background-color: #1ed760;
|
|
||||||
color: black;
|
|
||||||
min-width: 100px;
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-media.custom-spotify {
|
|
||||||
background-color: #1ed760;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-media.custom-vlc {
|
|
||||||
background-color: #ffa000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#temperature {
|
|
||||||
background-color: #f0932b;
|
|
||||||
}
|
|
||||||
|
|
||||||
#temperature.critical {
|
|
||||||
background-color: #eb4d4b;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray {
|
|
||||||
background-color: #2980b9;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray > .passive {
|
|
||||||
-gtk-icon-effect: dim;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray > .needs-attention {
|
|
||||||
-gtk-icon-effect: highlight;
|
|
||||||
background-color: #eb4d4b;
|
|
||||||
}
|
|
||||||
|
|
||||||
#idle_inhibitor {
|
|
||||||
background-color: #2d3436;
|
|
||||||
}
|
|
||||||
|
|
||||||
#idle_inhibitor.activated {
|
|
||||||
background-color: #ecf0f1;
|
|
||||||
color: #2d3436;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mpd {
|
|
||||||
background-color: #66cc99;
|
|
||||||
color: #2a5c45;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mpd.disconnected {
|
|
||||||
background-color: #f53c3c;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mpd.stopped {
|
|
||||||
background-color: #90b1b1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mpd.paused {
|
|
||||||
background-color: #51a37a;
|
|
||||||
}
|
|
||||||
|
|
||||||
#language {
|
|
||||||
background: #00b093;
|
|
||||||
color: #740864;
|
|
||||||
padding: 0 5px;
|
|
||||||
margin: 0 5px;
|
|
||||||
min-width: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#keyboard-state {
|
|
||||||
background: #97e1ad;
|
|
||||||
color: #000000;
|
|
||||||
padding: 0 0px;
|
|
||||||
margin: 0 5px;
|
|
||||||
min-width: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#keyboard-state > label {
|
|
||||||
padding: 0 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#keyboard-state > label.locked {
|
|
||||||
background: rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
#scratchpad {
|
|
||||||
background: rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
#scratchpad.empty {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
@define-color base #24273a;
|
|
||||||
@define-color mantle #1e2030;
|
|
||||||
@define-color crust #181926;
|
|
||||||
|
|
||||||
@define-color text #cad3f5;
|
|
||||||
@define-color subtext0 #a5adcb;
|
|
||||||
@define-color subtext1 #b8c0e0;
|
|
||||||
|
|
||||||
@define-color surface0 #363a4f;
|
|
||||||
@define-color surface1 #494d64;
|
|
||||||
@define-color surface2 #5b6078;
|
|
||||||
|
|
||||||
@define-color overlay0 #6e738d;
|
|
||||||
@define-color overlay1 #8087a2;
|
|
||||||
@define-color overlay2 #939ab7;
|
|
||||||
|
|
||||||
@define-color blue #8aadf4;
|
|
||||||
@define-color lavender #b7bdf8;
|
|
||||||
@define-color sapphire #7dc4e4;
|
|
||||||
@define-color sky #91d7e3;
|
|
||||||
@define-color teal #8bd5ca;
|
|
||||||
@define-color green #a6da95;
|
|
||||||
@define-color yellow #eed49f;
|
|
||||||
@define-color peach #f5a97f;
|
|
||||||
@define-color maroon #ee99a0;
|
|
||||||
@define-color red #ed8796;
|
|
||||||
@define-color mauve #c6a0f6;
|
|
||||||
@define-color pink #f5bde6;
|
|
||||||
@define-color flamingo #f0c6c6;
|
|
||||||
@define-color rosewater #f4dbd6;
|
|
||||||
@@ -1,145 +0,0 @@
|
|||||||
{
|
|
||||||
// "layer": "top", // Waybar at top layer
|
|
||||||
"position": "top", // Waybar position (top|bottom|left|right)
|
|
||||||
"height": 20, // Waybar height (to be removed for auto height)
|
|
||||||
"min-height": 20,
|
|
||||||
// "width": 1280, // Waybar width
|
|
||||||
// Choose the order of the modules
|
|
||||||
"modules-left": [ "custom/media", "tray" ],
|
|
||||||
"modules-center": [ "sway/workspaces" ],
|
|
||||||
"modules-right": [ "pulseaudio#sound", "network", "cpu", "memory", "battery", "clock" /*, "custom/power"*/],
|
|
||||||
"sway/mode": {
|
|
||||||
"format": "<span style=\"italic\">{}</span>"
|
|
||||||
},
|
|
||||||
"idle_inhibitor": {
|
|
||||||
"format": "{icon}",
|
|
||||||
"format-icons": {
|
|
||||||
"activated": "",
|
|
||||||
"deactivated": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tray": {
|
|
||||||
"icon-size": 10,
|
|
||||||
"spacing": 10
|
|
||||||
},
|
|
||||||
"calendar":{
|
|
||||||
|
|
||||||
},
|
|
||||||
"clock": {
|
|
||||||
// "timezone": "America/New_York",
|
|
||||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
|
||||||
"format-alt": "{:%Y-%m-%d}"
|
|
||||||
},
|
|
||||||
"cpu": {
|
|
||||||
"format": "{usage}% ",
|
|
||||||
"tooltip": false
|
|
||||||
},
|
|
||||||
"memory": {
|
|
||||||
"format": "{}% "
|
|
||||||
},
|
|
||||||
"custom/weather": {
|
|
||||||
"format": "<span color='#22dfda'>{}</span>",
|
|
||||||
"interval": 18000,
|
|
||||||
"exec": "sb-forecast",
|
|
||||||
//ansiweather -l shiraz,IR -u metric -s true -f 1 -a false | cut -d' ' -f2,8-
|
|
||||||
"exec-if": "ping openweathermap.org -c1",
|
|
||||||
"tooltip": "false"
|
|
||||||
},
|
|
||||||
"temperature": {
|
|
||||||
// "thermal-zone": 2,
|
|
||||||
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
|
|
||||||
"critical-threshold": 80,
|
|
||||||
// "format-critical": "{temperatureC}°C {icon}",
|
|
||||||
"format": "{temperatureC}°C {icon}",
|
|
||||||
"format-icons": ["", "", ""]
|
|
||||||
},
|
|
||||||
"backlight#icon": {
|
|
||||||
// "device": "acpi_video1",
|
|
||||||
"format": "{icon}",
|
|
||||||
"format-icons": ["", ""],
|
|
||||||
"on-click": "ctl-backlight.waybar.sh down"
|
|
||||||
},
|
|
||||||
"backlight#value": {
|
|
||||||
// "device": "acpi_video1",
|
|
||||||
"format": "{percent}",
|
|
||||||
"on-click": "ctl-backlight.waybar.sh up"
|
|
||||||
},
|
|
||||||
"battery": {
|
|
||||||
"states": {
|
|
||||||
// "good": 95,
|
|
||||||
"warning": 30,
|
|
||||||
"critical": 15
|
|
||||||
},
|
|
||||||
"max-length": 40,
|
|
||||||
"format": "{capacity}% {icon}",
|
|
||||||
"format-charging": "{capacity}% ",
|
|
||||||
"format-plugged": "{capacity}% ",
|
|
||||||
"format-alt": "{time} {icon}",
|
|
||||||
// "format-good": "", // An empty format will hide the module
|
|
||||||
// "format-full": "",
|
|
||||||
"format-icons": ["", "", "", "", ""]
|
|
||||||
},
|
|
||||||
"custom/power": {
|
|
||||||
"format": "⏻",
|
|
||||||
"on-click": "swaynag -t warning -m 'Power Menu Options' -b 'Logout' 'swaymsg exit' -b 'Restart' 'shutdown -r now' -b 'Shutdown' 'shutdown -h now' --background=#005566 --button-background=#009999 --button-border=#002b33 --border-bottom=#002b33"
|
|
||||||
},
|
|
||||||
"network": {
|
|
||||||
"format-wifi": "{essid} ({signalStrength}%) ",
|
|
||||||
"format-ethernet": "{ifname} ",
|
|
||||||
"format-disconnected": "",
|
|
||||||
"max-length": 50,
|
|
||||||
"on-click": "urxvt -e 'nmtui'"
|
|
||||||
},
|
|
||||||
"pulseaudio#sound": {
|
|
||||||
"format": "{volume}",
|
|
||||||
"format-icons": {
|
|
||||||
"headphone": "",
|
|
||||||
"hands-free": "",
|
|
||||||
"headset": "",
|
|
||||||
"phone": "",
|
|
||||||
"portable": "",
|
|
||||||
"car": "",
|
|
||||||
"default": ["", "", ""]
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"pulseaudio#icon": {
|
|
||||||
// "scroll-step": 1, // %, can be a float
|
|
||||||
"format": "{icon}",
|
|
||||||
"format-bluetooth": "{icon}",
|
|
||||||
"format-bluetooth-muted": " {icon}",
|
|
||||||
"format-muted": "",
|
|
||||||
"format-source-muted": "",
|
|
||||||
"on-click": "pactl set-sink-mute 0 toggle",
|
|
||||||
"format-icons": {
|
|
||||||
"headphone": "",
|
|
||||||
"hands-free": "",
|
|
||||||
"headset": "",
|
|
||||||
"phone": "",
|
|
||||||
"portable": "",
|
|
||||||
"car": "",
|
|
||||||
"default": ["", "", ""]
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"custom/media": {
|
|
||||||
"format": "{icon} {}",
|
|
||||||
"return-type": "json",
|
|
||||||
"max-length": 40,
|
|
||||||
"format-icons": {
|
|
||||||
"spotify": "",
|
|
||||||
"default": "🎜"
|
|
||||||
},
|
|
||||||
"escape": true,
|
|
||||||
"exec": "/usr/bin/python3 $HOME/.config/waybar/mediaplayer.py --player spotify",
|
|
||||||
"on-click": "playerctl play-pause",
|
|
||||||
"on-scroll-up": "playerctl next",
|
|
||||||
"on-scroll-down": "playerctl previous"
|
|
||||||
},
|
|
||||||
|
|
||||||
"custom/logo": {
|
|
||||||
"format": ""
|
|
||||||
},
|
|
||||||
|
|
||||||
"custom/icon-cube": {
|
|
||||||
"format": ""
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,129 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
import argparse
|
|
||||||
import logging
|
|
||||||
import sys
|
|
||||||
import signal
|
|
||||||
import gi
|
|
||||||
import json
|
|
||||||
gi.require_version('Playerctl', '2.0')
|
|
||||||
from gi.repository import Playerctl, GLib
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
def write_output(text, player):
|
|
||||||
logger.info('Writing output')
|
|
||||||
|
|
||||||
output = {'text': text,
|
|
||||||
'class': 'custom-' + player.props.player_name,
|
|
||||||
'alt': player.props.player_name}
|
|
||||||
|
|
||||||
sys.stdout.write(json.dumps(output) + '\n')
|
|
||||||
sys.stdout.flush()
|
|
||||||
|
|
||||||
|
|
||||||
def on_play(player, status, manager):
|
|
||||||
logger.info('Received new playback status')
|
|
||||||
on_metadata(player, player.props.metadata, manager)
|
|
||||||
|
|
||||||
|
|
||||||
def on_metadata(player, metadata, manager):
|
|
||||||
logger.info('Received new metadata')
|
|
||||||
track_info = ''
|
|
||||||
|
|
||||||
if player.props.player_name == 'spotify' and \
|
|
||||||
'mpris:trackid' in metadata.keys() and \
|
|
||||||
':ad:' in player.props.metadata['mpris:trackid']:
|
|
||||||
track_info = 'AD PLAYING'
|
|
||||||
elif player.get_artist() != '' and player.get_title() != '':
|
|
||||||
track_info = '{artist} - {title}'.format(artist=player.get_artist(),
|
|
||||||
title=player.get_title())
|
|
||||||
else:
|
|
||||||
track_info = player.get_title()
|
|
||||||
|
|
||||||
if player.props.status != 'Playing' and track_info:
|
|
||||||
track_info = ' ' + track_info
|
|
||||||
write_output(track_info, player)
|
|
||||||
|
|
||||||
|
|
||||||
def on_player_appeared(manager, player, selected_player=None):
|
|
||||||
if player is not None and (selected_player is None or player.name == selected_player):
|
|
||||||
init_player(manager, player)
|
|
||||||
else:
|
|
||||||
logger.debug("New player appeared, but it's not the selected player, skipping")
|
|
||||||
|
|
||||||
|
|
||||||
def on_player_vanished(manager, player):
|
|
||||||
logger.info('Player has vanished')
|
|
||||||
sys.stdout.write('\n')
|
|
||||||
sys.stdout.flush()
|
|
||||||
|
|
||||||
|
|
||||||
def init_player(manager, name):
|
|
||||||
logger.debug('Initialize player: {player}'.format(player=name.name))
|
|
||||||
player = Playerctl.Player.new_from_name(name)
|
|
||||||
player.connect('playback-status', on_play, manager)
|
|
||||||
player.connect('metadata', on_metadata, manager)
|
|
||||||
manager.manage_player(player)
|
|
||||||
on_metadata(player, player.props.metadata, manager)
|
|
||||||
|
|
||||||
|
|
||||||
def signal_handler(sig, frame):
|
|
||||||
logger.debug('Received signal to stop, exiting')
|
|
||||||
sys.stdout.write('\n')
|
|
||||||
sys.stdout.flush()
|
|
||||||
# loop.quit()
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
|
|
||||||
def parse_arguments():
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
|
|
||||||
# Increase verbosity with every occurrence of -v
|
|
||||||
parser.add_argument('-v', '--verbose', action='count', default=0)
|
|
||||||
|
|
||||||
# Define for which player we're listening
|
|
||||||
parser.add_argument('--player')
|
|
||||||
|
|
||||||
return parser.parse_args()
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
arguments = parse_arguments()
|
|
||||||
|
|
||||||
# Initialize logging
|
|
||||||
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG,
|
|
||||||
format='%(name)s %(levelname)s %(message)s')
|
|
||||||
|
|
||||||
# Logging is set by default to WARN and higher.
|
|
||||||
# With every occurrence of -v it's lowered by one
|
|
||||||
logger.setLevel(max((3 - arguments.verbose) * 10, 0))
|
|
||||||
|
|
||||||
# Log the sent command line arguments
|
|
||||||
logger.debug('Arguments received {}'.format(vars(arguments)))
|
|
||||||
|
|
||||||
manager = Playerctl.PlayerManager()
|
|
||||||
loop = GLib.MainLoop()
|
|
||||||
|
|
||||||
manager.connect('name-appeared', lambda *args: on_player_appeared(*args, arguments.player))
|
|
||||||
manager.connect('player-vanished', on_player_vanished)
|
|
||||||
|
|
||||||
signal.signal(signal.SIGINT, signal_handler)
|
|
||||||
signal.signal(signal.SIGTERM, signal_handler)
|
|
||||||
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
|
|
||||||
|
|
||||||
for player in manager.props.player_names:
|
|
||||||
if arguments.player is not None and arguments.player != player.name:
|
|
||||||
logger.debug('{player} is not the filtered player, skipping it'
|
|
||||||
.format(player=player.name)
|
|
||||||
)
|
|
||||||
continue
|
|
||||||
|
|
||||||
init_player(manager, player)
|
|
||||||
|
|
||||||
loop.run()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
|
|
||||||
@@ -1,285 +0,0 @@
|
|||||||
@import "colors.css";
|
|
||||||
* {
|
|
||||||
/* `otf-font-awesome` is required to be installed for icons */
|
|
||||||
font-family: "JetBrains Mono", FontAwesome, Roboto, Helvetica, Arial, sans-serif;
|
|
||||||
font-size: 18px;
|
|
||||||
border: none;
|
|
||||||
border-radius: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar {
|
|
||||||
background-color: rgba(43, 48, 59, 0.2);
|
|
||||||
/*border-bottom: 6px solid rgba(100, 114, 125, 0.1);*/
|
|
||||||
border-bottom: shade(alpha(#24273a, 0.9), 1.0);
|
|
||||||
color: #ffffff;
|
|
||||||
transition-property: background-color;
|
|
||||||
transition-duration: .5s;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar.hidden {
|
|
||||||
opacity: 0.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
window#waybar.empty {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
window#waybar.solo {
|
|
||||||
background-color: #FFFFFF;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
window#waybar.termite {
|
|
||||||
background-color: #3F3F3F;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar.chromium {
|
|
||||||
background-color: #000000;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
/* Use box-shadow instead of border so the text isn't offset */
|
|
||||||
box-shadow: inset 0 -6px transparent;
|
|
||||||
/* Avoid rounded borders under each button name */
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
|
||||||
button:hover {
|
|
||||||
background: inherit;
|
|
||||||
box-shadow: inset 0 -6px #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button {
|
|
||||||
padding: 5px 5px;
|
|
||||||
background-color: transparent;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button:hover {
|
|
||||||
background: rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.focused {
|
|
||||||
background-color: rgba(255, 184, 108, 0.8);
|
|
||||||
color: black;
|
|
||||||
box-shadow: inset 0 -6px rgba(255, 184, 108, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.urgent {
|
|
||||||
background-color: #eb4d4b;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mode {
|
|
||||||
background-color: #64727D;
|
|
||||||
border-bottom: 6px solid #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock,
|
|
||||||
#battery,
|
|
||||||
#cpu,
|
|
||||||
#memory,
|
|
||||||
#disk,
|
|
||||||
#temperature,
|
|
||||||
#backlight,
|
|
||||||
#network,
|
|
||||||
#pulseaudio,
|
|
||||||
#custom-media,
|
|
||||||
#tray,
|
|
||||||
#mode,
|
|
||||||
#idle_inhibitor,
|
|
||||||
#scratchpad,
|
|
||||||
#mpd {
|
|
||||||
padding: 0 10px;
|
|
||||||
color: #ffffff;
|
|
||||||
margin: 3px 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#window,
|
|
||||||
#workspaces {
|
|
||||||
margin: 0 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If workspaces is the leftmost module, omit left margin */
|
|
||||||
.modules-left > widget:first-child > #workspaces {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If workspaces is the rightmost module, omit right margin */
|
|
||||||
.modules-right > widget:last-child > #workspaces {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock {
|
|
||||||
background-color: #64727D;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery {
|
|
||||||
background-color: rgba(248, 248, 242, 1);
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.charging, #battery.plugged {
|
|
||||||
color: #ffffff;
|
|
||||||
background-color: #26A65B;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes blink {
|
|
||||||
to {
|
|
||||||
background-color: #ffffff;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.critical:not(.charging) {
|
|
||||||
background-color: #f53c3c;
|
|
||||||
color: #ffffff;
|
|
||||||
animation-name: blink;
|
|
||||||
animation-duration: 0.5s;
|
|
||||||
animation-timing-function: linear;
|
|
||||||
animation-iteration-count: infinite;
|
|
||||||
animation-direction: alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
label:focus {
|
|
||||||
background-color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#cpu {
|
|
||||||
background-color: rgba(80, 250, 123, 1);
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#memory {
|
|
||||||
background-color: rgba(189, 147, 249, 1);
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#disk {
|
|
||||||
background-color: #964B00;
|
|
||||||
}
|
|
||||||
|
|
||||||
#backlight {
|
|
||||||
background-color: #90b1b1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#network {
|
|
||||||
background-color: rgba(139, 233, 253, 1);
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#network.disconnected {
|
|
||||||
background-color: #f53c3c;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio {
|
|
||||||
background-color: #f1c40f;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio.muted {
|
|
||||||
background-color: #90b1b1;
|
|
||||||
color: #2a5c45;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-power {
|
|
||||||
margin-right: 20px;
|
|
||||||
padding: 0 10px;
|
|
||||||
background-color: #eb4d4b;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-media {
|
|
||||||
background-color: #1ed760;
|
|
||||||
color: black;
|
|
||||||
min-width: 100px;
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-media.custom-spotify {
|
|
||||||
background-color: #1ed760;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-media.custom-vlc {
|
|
||||||
background-color: #ffa000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#temperature {
|
|
||||||
background-color: #f0932b;
|
|
||||||
}
|
|
||||||
|
|
||||||
#temperature.critical {
|
|
||||||
background-color: #eb4d4b;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray {
|
|
||||||
background-color: #2980b9;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray > .passive {
|
|
||||||
-gtk-icon-effect: dim;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray > .needs-attention {
|
|
||||||
-gtk-icon-effect: highlight;
|
|
||||||
background-color: #eb4d4b;
|
|
||||||
}
|
|
||||||
|
|
||||||
#idle_inhibitor {
|
|
||||||
background-color: #2d3436;
|
|
||||||
}
|
|
||||||
|
|
||||||
#idle_inhibitor.activated {
|
|
||||||
background-color: #ecf0f1;
|
|
||||||
color: #2d3436;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mpd {
|
|
||||||
background-color: #66cc99;
|
|
||||||
color: #2a5c45;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mpd.disconnected {
|
|
||||||
background-color: #f53c3c;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mpd.stopped {
|
|
||||||
background-color: #90b1b1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mpd.paused {
|
|
||||||
background-color: #51a37a;
|
|
||||||
}
|
|
||||||
|
|
||||||
#language {
|
|
||||||
background: #00b093;
|
|
||||||
color: #740864;
|
|
||||||
padding: 0 5px;
|
|
||||||
margin: 0 5px;
|
|
||||||
min-width: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#keyboard-state {
|
|
||||||
background: #97e1ad;
|
|
||||||
color: #000000;
|
|
||||||
padding: 0 0px;
|
|
||||||
margin: 0 5px;
|
|
||||||
min-width: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#keyboard-state > label {
|
|
||||||
padding: 0 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#keyboard-state > label.locked {
|
|
||||||
background: rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
#scratchpad {
|
|
||||||
background: rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
#scratchpad.empty {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
style=/home/jared-kling/.config/wofi/style.css
|
|
||||||
xoffset=760
|
|
||||||
yoffset=290
|
|
||||||
show=drun
|
|
||||||
width=400
|
|
||||||
height=400
|
|
||||||
always_parse_args=true
|
|
||||||
show_all=true
|
|
||||||
print_command=true
|
|
||||||
layer=overlay
|
|
||||||
insensitive=true
|
|
||||||
prompt=
|
|
||||||
content_halign=center
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
window {
|
|
||||||
margin: 40px;
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
window {
|
|
||||||
border: 2px solid black;
|
|
||||||
background-color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
#input {
|
|
||||||
border: 2px solid black;
|
|
||||||
background-color: #555555;
|
|
||||||
font-size: 18px;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#inner-box {}
|
|
||||||
|
|
||||||
#outer-box {
|
|
||||||
margin: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#scroll {
|
|
||||||
margin: 5px 0px;
|
|
||||||
font-size: 16px;
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
#scroll label {
|
|
||||||
margin: 2px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#entry:selected {
|
|
||||||
border-radius: 4px;
|
|
||||||
background-color: rgb(105, 105, 105);
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
#text {
|
|
||||||
border: 0px;
|
|
||||||
}
|
|
||||||
30
private_dot_ssh/symlink_config.tmpl
Normal file
30
private_dot_ssh/symlink_config.tmpl
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{{- if eq .device "work-laptop" }}
|
||||||
|
/home/jared-kling/Code/dotfiles/.ssh/config
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if not (eq .device "work-laptop") }}
|
||||||
|
Host kling.linode
|
||||||
|
IdentityFile ~/.ssh/suralink_rsa
|
||||||
|
User jared
|
||||||
|
HostName 66.228.42.141
|
||||||
|
|
||||||
|
Host kling.gcloud
|
||||||
|
IdentityFile ~/.ssh/suralink_rsa
|
||||||
|
User jared
|
||||||
|
HostName 34.70.80.218
|
||||||
|
|
||||||
|
Host kling.ocean
|
||||||
|
IdentityFile ~/.ssh/suralink_rsa
|
||||||
|
User jared
|
||||||
|
HostName 104.131.173.22
|
||||||
|
|
||||||
|
Host home.orangepi
|
||||||
|
IdentityFile ~/.ssh/suralink_rsa
|
||||||
|
User jared
|
||||||
|
HostName 192.168.1.14
|
||||||
|
|
||||||
|
Host home.dockerpi
|
||||||
|
IdentityFile ~/.ssh/suralink_rsa
|
||||||
|
User jared
|
||||||
|
HostName 192.168.1.31
|
||||||
|
{{- end }}
|
||||||
Reference in New Issue
Block a user