Added some vim-go funcs and added a little sound utility script
parent
737e6e1374
commit
978482a94c
|
@ -133,9 +133,9 @@ bindsym XF86MonBrightnessUp exec "xbacklight -inc 10; a=$(xbacklight | cut -d\.
|
|||
bindsym XF86MonBrightnessDown exec "xbacklight -dec 10; a=$(xbacklight | cut -d\. -f1)%; dunstify -r 1 'brightness down'\ \($a\)"
|
||||
|
||||
# Pulse Audio controls
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id "pactl set-sink-volume $(pactl info | grep 'Default Sink' | cut -d' ' -f3) -5%; b=$(amixer sget Master | grep -o \[0-9\]\\+% -m 1); dunstify -r 2 'sound down'\ \($b\)"
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id "pactl set-sink-volume $(pactl info | grep 'Default Sink' | cut -d' ' -f3) +5%; b=$(amixer sget Master | grep -o \[0-9\]\\+% -m 1); dunstify -r 2 'sound up'\ \($b\)"
|
||||
bindsym XF86AudioMute exec --no-startup-id "pactl set-sink-mute $(pactl info | grep 'Default Sink' | cut -d' ' -f3) toggle; dunstify -r 2 'sound muted'"
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id ~/.scripts/sound.sh down
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id ~/.scripts/sound.sh up
|
||||
bindsym XF86AudioMute exec --no-startup-id ~/.scripts/sound.sh toggle
|
||||
bindsym XF86AudioPlay exec "playerctl play-pause; cmus-remote -u"
|
||||
bindsym XF86AudioStop exec "playerctl stop; cmus-remote -s"
|
||||
bindsym XF86AudioNext exec "playerctl next; cmus-remote -n"
|
||||
|
|
|
@ -7,6 +7,6 @@ l:/home/tuan/Local
|
|||
c:/home/tuan/Documents/CTF/picoCTF
|
||||
t:/home/tuan/Templates
|
||||
w:/home/tuan/workspace_l/Projects
|
||||
k:/home/tuan/Documents/Fachschaft/Berufungskomission
|
||||
k:/home/tuan/Documents/Protokolle/FSE
|
||||
q:/home/tuan/.nextcloud/Quick Drop
|
||||
':/home/tuan
|
||||
':/home/tuan/.scripts
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
defaultsink=$(pactl info | grep 'Default Sink' | cut -d' ' -f3);
|
||||
curVolume=$(amixer get Master | grep -o \[0-9\]\\+% -m 1);
|
||||
|
||||
case $1 in
|
||||
"up"*)
|
||||
pactl set-sink-volume $defaultsink +5%;
|
||||
dunstify -r 2 'sound up'\ \($curVolume\);
|
||||
;;
|
||||
"down"*)
|
||||
pactl set-sink-volume $defaultsink -5%;
|
||||
dunstify -r 2 'sound up'\ \($curVolume\);
|
||||
;;
|
||||
"toggle"*)
|
||||
msg='muted';
|
||||
if amixer get Master | grep -q off; then
|
||||
msg='unmuted';
|
||||
fi
|
||||
pactl set-sink-mute $defaultsink toggle;
|
||||
dunstify -r 2 'sound'\ $msg;
|
||||
echo $msg
|
||||
;;
|
||||
esac
|
|
@ -1,18 +1,19 @@
|
|||
" Basics
|
||||
set autoindent noexpandtab tabstop=4 shiftwidth=4
|
||||
" Shortcuts
|
||||
imap ;main package main<CR><CR>import (<CR>"fmt"<CR>)<CR><CR>func main() {<CR>}<Esc>O
|
||||
|
||||
|
||||
" Compiling
|
||||
map <C-i> <Esc>:GoImport
|
||||
map <C-c><C-c> <Esc>:!clear<CR><CR>:GoRun<CR>
|
||||
map <C-c><C-b> <Esc>:!clear<CR><CR>:GoBuild<CR>
|
||||
map <C-c><C-t> <Esc>:!clear<CR><CR>:GoTest<CR>
|
||||
map <C-c><C-f> <Esc>:!clear<CR><CR>:GoTestFunc<CR>
|
||||
map <C-c><C-d> <Esc>:!clear<CR><CR>:GoDebugStart<CR>
|
||||
nnoremap <C-c><C-f> <Esc>:GoFmt<CR>
|
||||
nnoremap <C-c><C-c> <Esc>:!clear<CR><CR>:GoRun<CR>
|
||||
nnoremap <C-c><C-b> <Esc>:!clear<CR><CR>:GoBuild<CR>
|
||||
nnoremap <C-c><C-t> <Esc>:!clear<CR><CR>:GoTest<CR>
|
||||
nnoremap <C-c><C-f> <Esc>:!clear<CR><CR>:GoTestFunc<CR>
|
||||
nnoremap <C-c><C-d> <Esc>:!clear<CR><CR>:GoDebugStart<CR>
|
||||
nnoremap gd <Esc>:GoDef
|
||||
nnoremap <F1> <Esc>:GoDoc<CR>
|
||||
|
||||
|
||||
map <C-c><C-w> <Esc>:!clear; GOOS=windows GOARCH=386 go build -o %<.exe %<CR><CR>
|
||||
|
||||
abbrev funct func<Space>Test(t<Space>*testing.T)<Space>{<CR>}<Esc>kwwi
|
||||
abbrev trun t.Run("", func(t *testing.T)<Space>{<CR>})<Esc>%la
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
" setlocal spell spelllang=de_de
|
||||
" set nospell
|
||||
|
||||
|
||||
|
||||
" Begin Shortcuts
|
||||
|
||||
" Compilation
|
||||
|
|
Loading…
Reference in New Issue