1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

Changes :)

This commit is contained in:
Joe Groocock 2019-12-14 22:22:38 +00:00
parent 5759872bbd
commit 7edc0c5789
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86
13 changed files with 87 additions and 46 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# Graphical-specific environment variables # Graphical-specific environment variables
export TERMINAL="termite" export TERMINAL="alacritty"
export BROWSER="chromium" export BROWSER="chromium"
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel" export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
export QT_QPA_PLATFORMTHEME=gtk2 export QT_QPA_PLATFORMTHEME=gtk2

View File

@ -1,19 +0,0 @@
#!/bin/bash
# ================================================================================== #
# Focus the next window on the current workspace in i3, e.g. for binding to Alt+Tab #
# Depends: jq, awk, i3wm (obviously) #
# Author: Nervengift <dev@nerven.gift> #
# License: Don't think this deserves a license, Public Domain #
# Known bugs: doesn't work with non-window container focused #
# ================================================================================== #
ws=$(i3-msg -t get_workspaces|jq "map(select(.focused))[]|.name")
echo $ws
windows=$(i3-msg -t get_tree|jq ".nodes|map(.nodes[])|map(.nodes[])|map(select(.type==\"workspace\" and .name==$ws))[0].nodes|map(recurse(.nodes[]))|map(.window)|.[]|values")
echo $windows
current=$(i3-msg -t get_tree|jq "recurse(.nodes[])|select(.focused)|.window")
echo $current
if [ "x$current" != "xnull" ]; then
next=$(echo $windows | awk "BEGIN {RS=\" \";FS=\" \"};NR == 1 {w=\$1};{if (f == 1){w=\$1;f=0}else if (\$1 == \"$current\") f=1};END {print w}")
i3-msg [id=$next] focus > /dev/null
fi

View File

@ -6,6 +6,8 @@ set $mod Mod4
set $alt Mod1 set $alt Mod1
floating_modifier $mod floating_modifier $mod
bindsym $mod+Shift+l debuglog toggle; shmlog on
font pango:sans 9 font pango:sans 9
# kill focused window # kill focused window
@ -114,10 +116,9 @@ exec_always --no-startup-id feh --no-fehbg --no-xinerama --bg-fill $DOTFILES/lak
for_window [class="Pinentry"] floating enable for_window [class="Pinentry"] floating enable
for_window [class="Pavucontrol"] floating enable for_window [class="Pavucontrol"] floating enable
for_window [class="Blueman-manager"] floating enable for_window [class="Blueman-manager"] floating enable
for_window [class="floating-term" instance="termite"] floating enable
for_window [class="Alacritty" instance="floating-term"] floating enable
for_window [window_role="floating-term"] floating enable for_window [window_role="floating-term"] floating enable
for_window [window_role="pop-up"] floating enable
for_window [window_role="i3blocks-update-term"] floating enable
for_window [window_role="i3blocks-clock-term"] floating enable
for_window [title="^rofi$"] floating enable for_window [title="^rofi$"] floating enable
new_window none new_window none
@ -126,18 +127,19 @@ new_float none
gaps inner 20 gaps inner 20
gaps outer 4 gaps outer 4
mouse_warping none
focus_follows_mouse yes focus_follows_mouse yes
popup_during_fullscreen smart
# keybindings # keybindings
bindsym $mod+Shift+j reload bindsym $mod+Shift+j reload
bindsym $mod+c exec chromium bindsym $mod+c exec chromium
bindsym $mod+v exec "i3-sensible-terminal -e \\"$SHELL -c vim;$SHELL\\" bindsym $mod+v exec "i3-sensible-terminal -e sh -c \\"($SHELL -c $EDITOR || :) && $SHELL\\"
bindsym $mod+Ctrl+v exec "i3-sensible-terminal -r floating-term -e \\"$SHELL -c vim;$SHELL\\" bindsym $mod+Ctrl+v exec "i3-sensible-terminal --class floating-term -e sh -c \\"($SHELL -c $EDITOR || : ) && $SHELL\\"
bindsym Mod1+Tab exec ~/.config/i3/alt-tab.sh
bindsym $mod+Return exec i3-sensible-terminal bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Ctrl+Return exec i3-sensible-terminal -r floating-term bindsym $mod+Ctrl+Return exec i3-sensible-terminal --class floating-term
bindsym $mod+Shift+Return exec i3-sensible-terminal -d "`xcwd`" bindsym $mod+Shift+Return exec i3-sensible-terminal --working-directory "$(xcwd)"
bindsym $mod+Ctrl+Shift+Return exec i3-sensible-terminal -r floating-term -d "`xcwd`" bindsym $mod+Ctrl+Shift+Return exec i3-sensible-terminal --class floating-term --working-directory "$(xcwd)"
bindsym $mod+l exec dm-tool switch-to-greeter bindsym $mod+l exec dm-tool switch-to-greeter
bindsym $mod+space exec "pkill rofi; rofi -show run -sidebar-mode -terminal i3-sensible-terminal -normal-window" bindsym $mod+space exec "pkill rofi; rofi -show run -sidebar-mode -terminal i3-sensible-terminal -normal-window"
bindsym $mod+Shift+p exec rofi-pass --root $(grep path ~/.config/gopass/config.yml | sed -E 's|^.*fs\+file://||g' | tr '\n' ':') | sed 's/:$//g' bindsym $mod+Shift+p exec rofi-pass --root $(grep path ~/.config/gopass/config.yml | sed -E 's|^.*fs\+file://||g' | tr '\n' ':') | sed 's/:$//g'
@ -179,9 +181,5 @@ exec --no-startup-id pullover
exec --no-startup-id mailnag exec --no-startup-id mailnag
exec --no-startup-id picom -b --experimental-backends exec --no-startup-id picom -b --experimental-backends
exec --no-startup-id chromium --no-startup-window exec --no-startup-id chromium --no-startup-window
exec --no-startup-id thunderbird
exec i3-msg 'workspace 1; exec sleep 2 && chromium'
exec i3-msg 'workspace 2; exec i3-sensible-terminal'
# vim:ft=i3 # vim:ft=i3

View File

@ -27,3 +27,7 @@ ssl = 1
imap = 1 imap = 1
idle = 0 idle = 0
folder = INBOX, Spam folder = INBOX, Spam
[userscriptplugin]
script_file =

View File

@ -67,13 +67,13 @@ exec = $XDG_CONFIG_HOME/polybar/update.sh
tail = true tail = true
format-prefix = " " format-prefix = " "
format-prefix-foreground = ${colours.icon} format-prefix-foreground = ${colours.icon}
click-left = i3-msg exec -- i3-sensible-terminal -r i3blocks-update-term -e "yay && kill -USR1 %pid% || kill --USR1 %pid%" click-left = i3-msg exec "i3-sensible-terminal --class floating-term -e sh -c \"(yay || :) && kill -USR1 %pid%\""
[module/weather] [module/weather]
type = custom/script type = custom/script
exec = $XDG_CONFIG_HOME/polybar/weather.sh exec = $XDG_CONFIG_HOME/polybar/weather.sh
interval = 120 interval = 120
click-left = i3-msg exec "i3-sensible-terminal -r floating-term -e 'sh -c \"xdotool getactivewindow windowsize 910 680 && curl wttr.in && sleep infinity\"'" click-left = i3-msg exec "i3-sensible-terminal --class floating-term -d 125 40 -e sh -c \"(curl wttr.in || :) && stty -echo && read\""
[module/xkeyboard] [module/xkeyboard]
type = internal/xkeyboard type = internal/xkeyboard
@ -184,7 +184,7 @@ type = internal/network
interface = eth0 interface = eth0
interval = 3.0 interval = 3.0
label-connected = %local_ip% label-connected = %local_ip% & %local_ip6%
format-connected-prefix = " " format-connected-prefix = " "
format-connected-prefix-foreground = ${colours.icon} format-connected-prefix-foreground = ${colours.icon}
format-connected-underline = ${colours.background} format-connected-underline = ${colours.background}
@ -200,7 +200,7 @@ label-disconnected-foreground = ${colours.critical}
type = internal/date type = internal/date
interval = 1 interval = 1
label = %{A3:i3-sensible-terminal -r i3blocks-clock-term -e "sh -c \"xdotool getactivewindow windowsize 500 600; cal -y $(date +%Y); stty -echo; exec sleep infinity\"" &:}%date% %time%%{A} label = %{A3:i3-msg exec "i3-sensible-terminal --class floating-term -d 66 35 -qq -e sh -c \"cal -y $(date +%Y) && read\"":}%date% %time%%{A}
time = %H:%M time = %H:%M
time-alt = %a %e %b %Y %H:%M:%S time-alt = %a %e %b %Y %H:%M:%S
@ -213,8 +213,8 @@ format-prefix-foreground = ${colours.icon}
type = internal/pulseaudio type = internal/pulseaudio
label-volume = %percentage% label-volume = %percentage%
format-volume = %{A3:pavucontrol:}<ramp-volume> <label-volume>%{A} format-volume = %{A3:i3-msg exec pavucontrol:}<ramp-volume> <label-volume>%{A
format-muted = %{A3:pavucontrol:}<label-muted>%{A} format-muted = %{A3:i3-msg exec pavucontrol:}<label-muted>%{A}
label-volume-foreground = ${root.foreground} label-volume-foreground = ${root.foreground}
format-muted-foreground = ${colours.icon} format-muted-foreground = ${colours.icon}

37
.config/polybar/interface.sh Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh
set -e
# Use the provided interface, otherwise the device used for the default route.
if [[ -n $BLOCK_INSTANCE ]]; then
IF=$BLOCK_INSTANCE
else
IF=$(ip route | awk '/^default/ { print $5 ; exit }')
fi
[ -e /sys/class/net/${IF} ] || exit
if [ -z "$IF" ] || [ "$(cat /sys/class/net/$IF/operstate)" = 'down' ]; then
echo down
echo \#FF0000 # color
exit
fi
case $1 in
-4) AF=inet ;;
-6) AF=inet6 ;;
*) AF=inet6? ;;
esac
# if no interface is found, use the first device with a global scope
ip addr show $IF | sed -nE "s/.*$AF ([^\\/]+).* scope global.*/\\1/p"
# case $BLOCK_BUTTON in
# 1) curl -s https://api.ipify.org;
# break;;
# 2) curl -s https://api.ipify.org | tee >(xclip -i);
# break;;
# 0|3) echo "$LOCIP" | tee >(xclip -i);
# break;;
# esac

View File

@ -108,6 +108,7 @@ Plug 'vim-airline/vim-airline-themes'
Plug 'lervag/vimtex' Plug 'lervag/vimtex'
Plug 'JamshedVesuna/vim-markdown-preview' Plug 'JamshedVesuna/vim-markdown-preview'
Plug 'junegunn/fzf.vim' Plug 'junegunn/fzf.vim'
Plug 'junegunn/vim-easy-align'
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
" Syntax Highlighting " Syntax Highlighting

View File

@ -60,6 +60,7 @@ alias open=xdg-open
alias rm='rm -i' alias rm='rm -i'
alias mv='mv -i' alias mv='mv -i'
alias cp='cp -ir' alias cp='cp -ir'
alias scp='scp -r'
alias dd='dd status=progress' alias dd='dd status=progress'
alias ssh="ssh -tt" alias ssh="ssh -tt"
alias wget="wget --hsts-file=$XDG_DATA_HOME/wget/hsts-file" alias wget="wget --hsts-file=$XDG_DATA_HOME/wget/hsts-file"
@ -114,6 +115,7 @@ alias chx='chmod +x'
# Git Aliases # Git Aliases
alias g=git alias g=git
alias ginit='git init'
alias gignore='$EDITOR .gitignore' alias gignore='$EDITOR .gitignore'
alias gitc='$EDITOR $XDG_CONFIG_HOME/git/config' alias gitc='$EDITOR $XDG_CONFIG_HOME/git/config'
alias ggignore='$EDITOR $XDG_CONFIG_HOME/git/gitignore' alias ggignore='$EDITOR $XDG_CONFIG_HOME/git/gitignore'
@ -288,7 +290,7 @@ alias xresources="$EDITOR $XDG_CONFIG_HOME/X11/xresources ; xrdb merge $XDG_CONF
alias sshc="$EDITOR ~/.ssh/config" alias sshc="$EDITOR ~/.ssh/config"
alias dotfiles="cd $DOTFILES" alias dotfiles="cd $DOTFILES"
alias i3c="$EDITOR $XDG_CONFIG_HOME/i3/config ; i3-msg restart" alias i3c="$EDITOR $XDG_CONFIG_HOME/i3/config ; i3-msg restart"
alias polybarc="$EDITOR $XDG_CONFIG_HOME/polybar/config; killall -q polybar; while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done; exec polybar -r i3bar" alias polybarc="$EDITOR $XDG_CONFIG_HOME/polybar/config; killall -q polybar; while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done; nohup polybar -r i3bar <&- 2>&1 1>/dev/null & disown"
alias sf=screenfetch alias sf=screenfetch
alias nf=neofetch alias nf=neofetch

16
scripts/3screens Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
set -e
TOP_LEFT="DP-0.1"
TOP_RIGHT="DP-0.2.1"
BOTTOM_LEFT="HDMI-0"
BOTTOM_RIGHT="DP-0.2.2.1"
#--output $BOTTOM_LEFT --primary --mode 1920x1080 --pos 0x1080 --rotate normal \
xrandr \
--output $BOTTOM_LEFT --off \
--output $TOP_LEFT --mode 1920x1080 --pos 0x0 --rotate inverted \
--output $TOP_RIGHT --mode 1920x1080 --pos 1920x0 --rotate inverted \
--output $BOTTOM_RIGHT --mode 1920x1080 --pos 1920x1080 --rotate normal --primary
[ -e ~/.fehbg ] && ~/.fehbg

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
set -e set -ex
# Based on https://github.com/vincentbernat/awesome-configuration/blob/master/bin/xsettingsd-setup # Based on https://github.com/vincentbernat/awesome-configuration/blob/master/bin/xsettingsd-setup
@ -15,6 +15,8 @@ mkdir -p "$CONF_DIR"
# Build xsettingsd.local # Build xsettingsd.local
{ {
# echo Gdk/WindowScalingFactor $(echo "$dpi/96" | bc -l | xargs printf '%.f')
# echo Gdk/UnscaledDPI $(echo "($dpi*1024)/($dpi/96)" | bc -l | xargs printf '%.f')
cat $CONF_DIR/xsettingsd.conf 2>/dev/null || true cat $CONF_DIR/xsettingsd.conf 2>/dev/null || true
echo Xft/DPI $(( $dpi*1024 )) echo Xft/DPI $(( $dpi*1024 ))
echo Gdk/WindowScalingFactor $(( $dpi/96 )) echo Gdk/WindowScalingFactor $(( $dpi/96 ))

2
scripts/gtav Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec xdg-open steam://rungameid/271590

View File

@ -57,9 +57,8 @@ function notify() {
} }
function display() { function display() {
fontawesome=$(cat "$FONTAWESOME_FILE" | grep -v '#' | grep -v '^[[:space:]]*$') update=$'\tUpdate Font Awesome cache'
update=""$'\t'"Update Font Awesome cache" fontawesome=$(grep -v '#\|^[[:space:]]*$' "$FONTAWESOME_FILE"; printf "$update\n")
fontawesome=$(printf "$fontawesome\n$update")
line=$(echo "$fontawesome" | rofi -dmenu -i -p fontawesome -normal-window -kb-custom-1 Ctrl+c -kb-row-tab '' -kb-row-select Tab $@) line=$(echo "$fontawesome" | rofi -dmenu -i -p fontawesome -normal-window -kb-custom-1 Ctrl+c -kb-row-tab '' -kb-row-select Tab $@)
exit_code=$? exit_code=$?
@ -69,7 +68,6 @@ function display() {
return return
fi fi
#IFS=$'\t'
line=($line) line=($line)
last=${line[${#line[@]}-1]} last=${line[${#line[@]}-1]}

View File

@ -9,7 +9,7 @@ FILENAME="$(date '+%s%N' | sha256sum | head -c7).png"
DIRECTORY="$HOME/pictures/screenshots" DIRECTORY="$HOME/pictures/screenshots"
SCP_HOST=frebib@Poseidon.nerdhouse.io SCP_HOST=frebib@Poseidon.nerdhouse.io
SCP_PATH=/dave/www/frebib.net/s SCP_PATH=/services/www/files/frebib.net/s
URL_PATH=https://frebib.net/s URL_PATH=https://frebib.net/s
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~