diff --git a/.config/i3/config b/.config/i3/config index 770c62cc..6e50e012 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -58,6 +58,16 @@ exec --no-startup-id unclutter ###---Audio and Music Definitions---### +##For spotify +set $music spotify +set $pause dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause +set $trupause dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause +set $play dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play +set $next dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next +set $prev dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous +#set $lilfor dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Seek +#set $bigfor dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Seek( + ##For mpc: set $music urxvt -e ncmpcpp set $pause --no-startup-id mpc toggle @@ -462,8 +472,8 @@ bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 15 bindsym XF86AudioMedia exec $music bindsym XF86Display exec --no-startup-id arandr #bindsym XF86KbdLightOnOff exec -bindsym XF86KbdBrightnessDown exec --no-startup-id xbacklight -dec 15 -bindsym XF86KbdBrightnessUp exec --no-startup-id xbacklight -inc 15 +bindsym XF86KbdBrightnessDown exec --no-startup-id python3.6 ~/.i3/kb-lights.py - +bindsym XF86KbdBrightnessUp exec --no-startup-id python3.6 ~/.i3/kb-lights.py + #bindsym XF86Reply exec #bindsym XF86MailForward exec #bindsym XF86Save exec diff --git a/.config/i3/i3_guide.md b/.config/i3/i3_guide.md index d00f0a23..4b52a4ec 100644 --- a/.config/i3/i3_guide.md +++ b/.config/i3/i3_guide.md @@ -10,7 +10,7 @@ Questions or suggestions? Email me at [luke@lukesmith.xyz](mailto:luke@lukesmith ## Basic goals and principles of my rice: + Naturalness -- I want the number of keypresses I have to make to get what I want to be as little as possible. -+ Economy -- All the basic programs I use should be simple and light on system resources. Because of this, many are terminal or ncurses programsj ++ Economy -- All the basic programs I use should be simple and light on system resources. Because of this, many are terminal or ncurses programs. + Keyboard/vim-centrality -- All my terminal apps (and other programs) use vim keys when possible. My hands never need leave the home row or thereabout. + Lots of color -- Many rices stick to one general color palatte. I like my system to be very vibrant. If you disagree, you can easily change it. diff --git a/.config/i3/kb-lights.py b/.config/i3/kb-lights.py new file mode 100755 index 00000000..f492de0a --- /dev/null +++ b/.config/i3/kb-lights.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +from sys import argv +import dbus + + +def kb_light_set(delta): + bus = dbus.SystemBus() + kbd_backlight_proxy = bus.get_object('org.freedesktop.UPower', '/org/freedesktop/UPower/KbdBacklight') + kbd_backlight = dbus.Interface(kbd_backlight_proxy, 'org.freedesktop.UPower.KbdBacklight') + + current = kbd_backlight.GetBrightness() + maximum = kbd_backlight.GetMaxBrightness() + new = max(0, current + delta) + + if 0 <= new <= maximum: + current = new + kbd_backlight.SetBrightness(current) + + # Return current backlight level percentage + return 100 * current / maximum + +if __name__ == '__main__': + if len(argv[1:]) == 1: + if argv[1] == "--up" or argv[1] == "+": + # ./kb-light.py (+|--up) to increment + print(kb_light_set(1)) + elif argv[1] == "--down" or argv[1] == "-": + # ./kb-light.py (-|--down) to decrement + print(kb_light_set(-1)) + else: + print("Unknown argument:", argv[1]) + else: + print("Script takes exactly one argument.", len(argv[1:]), "arguments provided.") diff --git a/.config/mutt/gmailrc b/.config/mutt/gmailrc index 68b6ff9d..3e878363 100644 --- a/.config/mutt/gmailrc +++ b/.config/mutt/gmailrc @@ -1,4 +1,5 @@ # vim: filetype=muttrc +# Gmail app password should be generated for this configuration file. Never use your proper password in a standard text field. set imap_user = "YOURNAME@gmail.com" set smtp_url = "smtp://YOURNAME@smtp.gmail.com:587/" set from = "YOURNAME@gmail.com" diff --git a/.vimrc b/.vimrc index 64fdf22f..7a51bd97 100644 --- a/.vimrc +++ b/.vimrc @@ -7,7 +7,7 @@ set relativenumber "let didit = 0 "autocmd! InsertEnter * if ! didit | call feedkeys("\\:nohlsearch|let didit = 1\", 'n') | endif "autocmd! InsertLeave * let didit = 0 - +#set spell vnoremap "*y nnoremap :tabnew @@ -43,7 +43,8 @@ autocmd BufRead,BufNewFile ~/.calcurse/notes/* set filetype=markdown autocmd FileType tex inoremap :!xelatex%i autocmd FileType tex nnoremap :!xelatex% autocmd FileType tex inoremap ;fr \begin{frame}\frametitle{}<++>\end{frame}<++>6kf}i -autocmd FileType tex inoremap ;fi \begin{fitch}\end{fitch}<++>3kA +autocmd FileType tex inoremap ;fit \begin{fitch}\end{fitch}<++>3kA +autocmd FileType tex inoremap ;fig \begin{figure}\end{figure}<++>3kA autocmd FileType tex inoremap ;exe \begin{exe}\ex\end{exe}<++>3kA autocmd FileType tex inoremap ;em \emph{}<++>T{i autocmd FileType tex inoremap ;bf \textbf{}<++>T{i @@ -176,6 +177,8 @@ autocmd FileType php,html inoremap ;rd F>a autocmd FileType php,html inoremap ;yl F>a autocmd FileType php,html inoremap ;dt
<++>
<++>2kcit autocmd FileType php,html inoremap ;dl
<++>3kcc +autocmd FileType php,html inoremap ;tag <++><++>4k0fR:MultipleCursorsFindDELRNc + """END