i3 changes, tweaks

This commit is contained in:
Luke 2017-07-28 09:51:56 -07:00
parent aebd2b0fcf
commit 56d1e93b61
12 changed files with 214 additions and 148 deletions

24
.config/Scripts/audio_pa.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
#This is the ffmpeg command that the audio shortcut in i3 will run.
#Picks a file name for the output file based on availability:
if [[ -f ~/output.flac ]]
then
n=1
while [[ -f ~/output_$n.flac ]]
do
n=$((n+1))
done
filename="output_$n.flac"
else
filename="output.flac"
fi
#The actual ffmpeg command:
ffmpeg \
-f alsa -i default \
-c:a flac \
$filename

BIN
.config/Scripts/ding.opus Normal file

Binary file not shown.

View File

@ -1 +1 @@
keycode 135 = Super_R
keycode 135 = Super_R NoSymbol Super_R

24
.config/Scripts/screen.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
#Feed this script either:
# "l" for laptop screen only,
# "v" for vga screen only,
# or "d" for dual vga/laptop.
d() { if [[ $(xrandr -q | grep VGA1\ con) ]]
then param $1
else echo "No VGA input detected."
fi ;}
dual() { xrandr --output LVDS1 --auto --output VGA1 --auto --right-of LVDS1 ;}
laptop() { xrandr --output LVDS1 --auto --output VGA1 --off ;}
vga() { xrandr --output VGA1 --auto --output LVDS1 --off ;}
#mirror() { xrandr --addmode VGA1 $lapres && xrandr --output LVDS1 --mode $lapres --output VGA1 --mode $lapres ;}
param() {
case $1 in
d) dual ;;
v) vga ;;
l) laptop ;;
*) echo -e "Invalid parameter. Add one of the following:\n\"d\" for dualscreen laptop and VGA.\n\"l\" for laptop only\n\"v\" for VGA only." ;;
esac ;}
d $1

View File

@ -0,0 +1,27 @@
#!/bin/bash
#This is the ffmpeg command that the screencast shortcut in i3 will run.
#Picks a file name for the output file based on availability:
if [[ -f ~/output.mkv ]]
then
n=1
while [[ -f ~/output_$n.mkv ]]
do
n=$((n+1))
done
filename="output_$n.mkv"
else
filename="output.mkv"
fi
#The actual ffmpeg command:
ffmpeg -y \
-f x11grab \
-s $(xdpyinfo | grep dimensions | awk '{print $2;}') \
-i :0.0 \
-f pulse -ac 1 -ar 44100 -i alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone_REV8-00.analog-stereo \
-c:v libx264 -r 30 -c:a flac $filename
#-c:v ffvhuff -r 30 -c:a flac $filename

View File

@ -1,11 +0,0 @@
#!/bin/bash
tmux -f ~/.config/Scripts/tmux.conf new-session -s "status" -d
tmux split-window -v "htop"
tmux split-window -h "speedometer -r wlp2s0"
tmux split-window -v "speedometer -r enp0s25"
tmux select-pane -t 0
tmux split-window -h "bash ~/.config/Scripts/mailsyncloop.sh"
tmux select-pane -t 0
tmux resize-pane -R 30
tmux -2 attach-session -d

View File

@ -1,11 +0,0 @@
#!/bin/bash
ffmpeg \
-f pulse -ac 2 -ar 48000 -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor \
-f pulse -ac 1 -ar 44100 -i alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone_REV8-00.analog-stereo \
-filter_complex amix=inputs=2 \
-f x11grab -r 30 -s 1280x800 -i :0.0+0,0 \
-vcodec libx264 -preset fast -crf 18 \
-acodec libmp3lame -ar 44100 -q:a 1 \
-pix_fmt yuv420p \
this_output.mkv

252
.config/i3/config Executable file → Normal file
View File

@ -1,61 +1,72 @@
# vim: filetype=i3
#exec --no-startup-id xrdb ~/.Xresources;
#Basic settings
#This is Luke Smith's i3-gaps configuration file.
#Email me: http://lukesmith.xyz
#Email: luke@lukesmith.xyz
#YouTube Channel: https://youtube.com/c/LukeSmithxyz
###---Basic Definitions---###
#Needed for i3-gaps
hide_edge_borders both
for_window [class="^.*"] border pixel 0
gaps inner 15
gaps outer 15
font pango:hack 9
set $mod Mod4
floating_modifier $mod
set $term urxvt
set $screencast --no-startup-id bash ~/.config/Scripts/screencast.sh
set $screencast_sys --no-startup-id bash ~/.config/Scripts/screencast_sys.sh
set $video --no-startup-id bash ~/.config/Scripts/video.sh
set $audio --no-startup-id bash ~/.config/Scripts/audio.sh
set $stoprec --no-startup-id killall ffmpeg
font pango:hack 9
set $flash --no-startup-id bash ~/.config/Scripts/flash_win.sh
#The wifi manager applet:
#exec --no-startup-id nm-applet
#For transparency and shadows:
#exec --no-startup-id xcompmgr -slt
exec --no-startup-id compton
#This runs the script that renews the config shortcuts:
exec --no-startup-id python ~/.config/Scripts/shortcuts.py
###---Starting External Scripts---###
#Music player daemon:
exec --no-startup-id mpd
#Torrent daemon:
exec --no-startup-id transmission-daemon
#Wifi applet:
exec --no-startup-id nm-applet
#Mount other drives:
exec --no-startup-id sudo mount -a
#My background is always in ~/.config/wall.png. I have a shortcut in my file manager (ranger) that will automatically move a selected file here, so I can change by background on the go.
#Composite manager:
exec --no-startup-id compton
#Refresh bash/ranger shortcuts:
exec --no-startup-id python ~/.config/Scripts/shortcuts.py
#Remove any previous polybars
#exec --no-startup-id killall polybar
#Try to load VGA screen if available:
exec --no-startup-id ~/.config/Scripts/screen.sh v
#Launch Polybar where appropriate:
exec_always --no-startup-id ~/.config/polybar/launch.sh
#Add wallpaper:
exec --no-startup-id feh --bg-scale ~/.config/wall.png
#Remaps the caps lock button to escape and uses the US international keyboard without dead keys
#Remaps the caps lock button to escape and uses the US international keyboard with dead keys
exec --no-startup-id setxkbmap -layout us -variant altgr-intl -option caps:escape
exec --no-startup-id xmodmap ~/.config/Scripts/remaps
#exec --no-startup-id xmodmap ~/.Xmodmap
#Makes the mouse invisible after a brief period
#Remap Menu button to Super:
exec_always --no-startup-id xmodmap ~/.config/Scripts/remaps
#Unclutter makes the mouse invisible after a brief period
exec --no-startup-id unclutter
#Disables touchpad; you might like like this one! (I only use the ThinkPad trackpoint).
exec --no-startup-id exec synclient TouchpadOff=1
#Needed for i3-gaps
hide_edge_borders both
for_window [class="^.*"] border pixel 0
gaps inner 0
gaps outer 0
#MUSIC:
###---Audio and Music Definitions---###
##For mpc:
set $music ~/.config/Scripts/music.sh
set $music urxvt -e ncmpcpp
set $pause --no-startup-id mpc toggle
set $next --no-startup-id mpc next
set $prev --no-startup-id mpc prev
set $lilfor --no-startup-id mpc seek +10
set $bigfor --no-startup-id mpc seek +120
set $lilbak --no-startup-id mpc seek -10
set $bigbak --no-startup-id mpc seek +120
set $bigbak --no-startup-id mpc seek -120
set $beg --no-startup-id mpc seek 0%
##For moc:
#set $music urxvt -e mocp --config ~/.config/moc/config
#set $music urxvt -e mocp
#set $pause --no-startup-id mocp -G
#set $next --no-startup-id mocp -f
#set $prev --no-startup-id mocp -r
@ -93,24 +104,28 @@ set $bigdec --no-startup-id amixer sset Master 5%-
set $mute --no-startup-id amixer sset Master toggle
set $truemute --no-startup-id amixer sset Master mute
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
#bar {
#colors {
#focused_workspace #008080 #008080 #ffffff
#inactive_workspace #000000 #000000 #005050
#active_workspace #000000 #000000 #008080
#urgent_workspace #8B0000 #8B0000 #000000
#}
##status_command ~/.config/i3/bar/bumblebee-status -m amixer weather battery nic disk datetime -p disk.path=/home datetime.format="%a, %b %d, %Y at %I:%M %p" -t kulade
#status_command polybar example
##status_command ~/Downloads/bbs/bumblebee-status -m amixer battery nic disk datetime -p disk.path=/home datetime.format="%a, %b %d, %Y at %I:%M %p" -t kulade
#position top
#}
set $flash --no-startup-id bash ~/.config/Scripts/flash_win.sh
###---Dropdown/Scratchpad Windows---###
#First I have a tmux window used for background scripts.
#I'll later bind this to mod+u.
for_window [instance="dropdown"] floating enable
for_window [instance="dropdown"] resize set 625 400
for_window [instance="dropdown"] move position center
for_window [instance="dropdown"] move scratchpad
exec --no-startup-id $term -name dropdown -e tmux
#Then I have a window running R I use for basic arithmetic
#I'll later bind this to mod+a.
for_window [instance="math"] floating enable
for_window [instance="math"] resize set 800 300
for_window [instance="math"] move position center
for_window [instance="math"] move scratchpad
exec --no-startup-id $term -fn "xft:mono:pixelsize=24" -name math -e R -q
###---Basic Bindings---###
bindsym $mod+Return exec $term
bindsym $mod+Shift+Return exec $term -e tmux -f ~/.config/tmux.conf
bindsym $mod+Shift+Return exec $term -e tmux
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
@ -121,47 +136,30 @@ bindsym $mod+Shift+Escape exec i3-msg exit
bindsym $mod+BackSpace exec $flash
bindsym $mod+Shift+BackSpace exec sudo reboot
bindsym $mod+Tab workspace back_and_forth
bindsym $mod+grave exec $flash
#bindsym $mod+asciitilde
#bindsym $mod+XF86Back
#bindsym $mod+Shift+XF86Back
#bindsym $mod+XF86Forward
#bindsym $mod+Shift+XF86Forward
#END
#Letter Keys
###---Letter Key Bindings---###
bindsym $mod+q kill
bindsym $mod+Shift+q kill
bindsym $mod+w exec --no-startup-id urxvt -e w3m http://lukesmith.xyz
bindsym $mod+w exec --no-startup-id $term -e w3m http://lukesmith.xyz
bindsym $mod+Shift+w exec --no-startup-id $BROWSER
bindsym $mod+e exec $term -e mutt -F ~/.config/mutt/muttrc
bindsym $mod+Shift+e exec $EMAIL
bindsym $mod+e exec $term -e mutt
#bindsym $mod+Shift+e
bindsym $mod+r exec $term -e ranger
bindsym $mod+Shift+r restart; for_window [instance="dropdown"] move position center; for_window [instance="math"] move position center
bindsym $mod+Shift+r restart
bindsym $mod+t split toggle
bindsym $mod+Shift+t gaps inner current set 15; gaps outer current set 15
bindsym $mod+y exec $term -e calcurse -D $HOME/.config/calcurse/
bindsym $mod+y exec $term -e calcurse
bindsym $mod+Shift+y resize shrink width 10 px or 10ppt
for_window [instance="dropdown"] floating enable
for_window [instance="dropdown"] resize set 625 400
for_window [instance="dropdown"] move position center
for_window [instance="dropdown"] move scratchpad
exec --no-startup-id $term -name dropdown -e tmux -f ~/.config/Scripts/tmux.conf
bindsym $mod+u [instance="dropdown"] scratchpad show
bindsym $mod+u [instance="dropdown"] scratchpad show; move position center
bindsym $mod+Shift+u resize shrink height 10 px or 10 ppt
bindsym $mod+i exec $term -e htop
@ -173,14 +171,7 @@ bindsym $mod+Shift+o resize grow width 10 px or 10 ppt
bindsym $mod+p exec $pause
bindsym $mod+Shift+p exec mypaint
for_window [instance="math"] floating enable
for_window [instance="math"] resize set 800 300
for_window [instance="math"] move position center
for_window [instance="math"] move scratchpad
exec --no-startup-id $term -name math -e R -q
bindsym $mod+a [instance="math"] scratchpad show
bindsym $mod+a [instance="math"] scratchpad show; move position center
bindsym $mod+Shift+a exec $term -e alsamixer
bindsym $mod+s gaps inner current plus 5
@ -190,7 +181,7 @@ bindsym $mod+d exec rofi -show run
bindsym $mod+Shift+d gaps inner current set 0; gaps outer current set 0
bindsym $mod+f fullscreen toggle
bindsym $mod+Shift+f exec --no-startup-id syncthing -home="$HOME/.syncthing"
bindsym $mod+Shift+f exec --no-startup-id syncthing
bindsym $mod+g workspace prev
bindsym $mod+Shift+g exec --no-startup-id gimp; workspace $ws5
@ -213,11 +204,11 @@ bindsym $mod+Shift+z gaps outer current minus 5
bindsym $mod+x exec --no-startup-id ~/.config/i3/lock.sh
bindsym $mod+Shift+x exec sudo shutdown -h now
bindsym $mod+c exec $term -e weechat -d ~/.config/weechat
bindsym $mod+c exec $term -e weechat
bindsym $mod+Shift+c exec --no-startup-id audacity
bindsym $mod+v move position center
bindsym $mod+Shift+v exec --no-startup-id projectM-pulseaudio
bindsym $mod+v exec urxvt -e ncmpcpp -s visualizer
#bindsym $mod+Shift+v
bindsym $mod+b exec $prev
bindsym $mod+Shift+b exec --no-startup-id blender; workspace $ws6
@ -225,28 +216,51 @@ bindsym $mod+Shift+b exec --no-startup-id blender; workspace $ws6
bindsym $mod+n exec $next
bindsym $mod+Shift+n exec $term -e newsbeuter
bindsym $mod+m exec --no-startup-id $music
bindsym $mod+m exec $music
bindsym $mod+Shift+m exec $mute
###---Workspace Bindings---###
bindsym $mod+Home workspace $ws1
bindsym $mod+Shift+Home move container to workspace $ws1
bindsym $mod+End workspace $ws10
bindsym $mod+Shift+End move container to workspace $ws10
bindsym $mod+Prior workspace prev
bindsym $mod+Shift+Prior move container to workspace prev
bindsym $mod+Next workspace next
bindsym $mod+Shift+Next move container to workspace next
bindsym $mod+Tab workspace back_and_forth
bindsym $mod+XF86Back workspace prev
#bindsym $mod+Shift+XF86Back
bindsym $mod+XF86Forward workspace next
#bindsym $mod+Shift+XF86Forward
bindsym $mod+semicolon workspace next
bindsym $mod+apostrophe split horizontal ;; exec $term
bindsym $mod+slash split vertical ;; exec $term
bindsym $mod+Shift+slash kill
bindsym $mod+backslash workspace back_and_forth
#END
#Workspaces
#set $ws1 "1: "
#set $ws2 "2: "
#set $ws3 "3: "
#set $ws4 "4: "
#set $ws5 "5: "
#set $ws6 "6: "
#set $ws7 "7: "
#set $ws8 "8: "
#set $ws9 "9: "
#set $ws10 "10: "
set $ws1 "1: "
set $ws2 "2: "
set $ws3 "3: "
set $ws4 "4: "
set $ws5 "5: "
set $ws6 "6: "
set $ws7 "7: "
set $ws8 "8: "
set $ws9 "9: "
set $ws10 "10: "
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $mod+1 workspace $ws1
@ -282,7 +296,7 @@ for_window [window_role="gimp-dock"] floating disable; move left; resize shrink
for_window [window_role="gimp-toolbox"] floating disable; move right; resize grow width 30 px or 30ppt
for_window [window_role="tr-main"] move to workspace $ws8
#for_window [title="projectM"] exec --no-startup-id transset -a --dec .25
for_window [class="st"] exec --no-startup-id transset -a --dec .25
#for_window [class="st"] exec --no-startup-id transset -a --dec .25
for_window [window_role="GtkFileChooserDialog"] resize shrink height 10 px
workspace $ws6 gaps inner 0
@ -292,8 +306,9 @@ workspace $ws5 gaps outer 0
workspace $ws8 gaps inner 0
workspace $ws8 gaps outer 0
#Function Buttons
#bindsym F1 nop
###---Function Buttons---###
bindsym F1 nop
#bindsym F2
#bindsym F3
#bindsym F4
@ -303,7 +318,7 @@ workspace $ws8 gaps outer 0
#bindsym F8
#bindsym F9
#bindsym F10
#bindsym F11 fullscreen toggle
bindsym F11 fullscreen toggle
#bindsym F12
bindsym $mod+F1 exec --no-startup-id mupdf ~/.config/Scripts/luke_guide.pdf
@ -311,17 +326,16 @@ bindsym $mod+F2 exec --no-startup-id python ~/.config/Scripts/shortcuts.py
bindsym $mod+F3 exec --no-startup-id arandr
bindsym $mod+F4 exec --no-startup-id sudo zzz
bindsym $mod+F5 exec --no-startup-id sudo sv restart NetworkManager
bindsym $mod+F6 exec --no-startup-id ~/.config/Scripts/transmission.sh
#bindsym $mod+F6 exec --no-startup-id $term -e transmission-remote-cli
bindsym $mod+F6 exec --no-startup-id urxvt -e transmission-remote-cli
bindsym $mod+F7 exec transset -a --dec .15
bindsym $mod+F8 exec transset -a --inc .15
bindsym $mod+F9 exec --no-startup-id sudo mount -a
#bindsym $mod+F9 exec --no-startup-id bash ~/.config/i3/mount.sh
bindsym $mod+F10 exec --no-startup-id bash ~/.config/i3/unmount.sh
bindsym $mod+F11 exec $video
bindsym $mod+F12 exec $screencast_sys
bindsym $mod+F10 exec --no-startup-id ~/.config/Scripts/screen.sh l ;; exec --no-startup-id ~/.config/polybar/launch.sh
bindsym $mod+F11 exec --no-startup-id ~/.config/Scripts/screen.sh v ;; exec --no-startup-id ~/.config/polybar/launch.sh
bindsym $mod+F12 exec --no-startup-id ~/.config/Scripts/screen.sh d ;; exec --no-startup-id ~/.config/polybar/launch.sh
#Arrow Keys
###---Arrow Keys---###
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
@ -330,22 +344,9 @@ bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#END
#Quick Workspace Movement
bindsym $mod+Home workspace $ws1
bindsym $mod+Shift+Home move container to workspace $ws1
bindsym $mod+End workspace $ws10
bindsym $mod+Shift+End move container to workspace $ws10
bindsym $mod+Prior workspace prev
bindsym $mod+Shift+Prior move container to workspace prev
bindsym $mod+Next workspace next
bindsym $mod+Shift+Next move container to workspace next
#END
#Media
###---Media Keys---###
bindsym $mod+plus exec $inc
bindsym $mod+Shift+plus exec $biginc
@ -369,9 +370,13 @@ bindsym Shift+Print exec --no-startup-id scrot -u
bindsym Scroll_Lock exec $audio
bindsym Num_Lock exec $video
bindsym $mod+Scroll_Lock exec $stoprec
bindsym $mod+Scroll_Lock exec $audio
bindsym Pause exec $screencast
bindsym $mod+Insert exec $screencast
bindsym $mod+Shift+Insert exec $video
bindsym Pause exec $audio
bindsym Shift+Pause exec $screencast_sys
bindsym $mod+Pause exec $stoprec
@ -388,9 +393,10 @@ bindsym XF86AudioRaiseVolume exec $inc
bindsym XF86AudioLowerVolume exec $dec
bindsym XF86AudioMute exec $mute
bindsym XF86AudioMicMute exec $micmute
#END
bindsym XF86Mail exec $term -e mutt -F ~/.config/mutt/muttrc
###---Extra Keys---###
bindsym XF86Mail exec $term -e mutt
bindsym XF86MyComputer exec $term -e ranger /
#bindsym $mod+XF86MyComputer exec
bindsym XF86HomePage exec --no-startup-id $BROWSER lukesmith.xyz
@ -402,4 +408,4 @@ bindsym XF86Calculator exec $term -name math -e R -q
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 15
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 15
for_window [instance="status"] move container to workspace $ws8

0
.config/moc/keymap Executable file → Normal file
View File

View File

@ -1,6 +1,6 @@
# Luke's Void Linux Rice
![pic1](pic1.png)
![pic2](pic2.png)
These are the files to my Void Linux Rice.
@ -24,7 +24,8 @@ These are the files to my Void Linux Rice.
Check other config folders for more specific documentation. For example [config contains documentation on how to set up mutt with your email account.
[Email configuration](.config/mutt/email.md)
[ranger configuration](.config/ranger/)
[ranger configuration](.config/ranger/ranger.md)
## Dynamic Configuration Files
@ -68,3 +69,6 @@ As of now, I've listed most of the dependencies in a script in the main director
Feel free to add other suggestions and I may implement them.
I have a job, but every penny I get from followers or subscribers is more incentive to perfect what I'm doing. You can donate to me at [https://paypal.me/LukeMSmith](https://paypal.me/LukeMSmith). Donations are earmarked for whatever the donator wants, usually to go to funds for buying new equipment for the [YouTube channel](https://youtube.com/c/LukeSmithxyz).
With Bumblebee Status:
![pic1](pic1.png)

View File

@ -6,5 +6,8 @@ xbps-install xorg-minimal xorg-fonts xf86-input-synaptics xf86-video-intel base-
tlmgr info collections | grep -o 'collection-[A-Za-z]*' | zargs tlmgr install
mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
git clone https://github.com/ying17zi/vim-live-latex-preview.git
mv vim-live-latex-preview ~/.vim/bundle/

BIN
pic2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 922 KiB