mirror of
https://github.com/frebib/dotfiles.git
synced 2024-06-14 12:57:23 +00:00
Changes :)
This commit is contained in:
parent
5759872bbd
commit
7edc0c5789
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Graphical-specific environment variables
|
||||
export TERMINAL="termite"
|
||||
export TERMINAL="alacritty"
|
||||
export BROWSER="chromium"
|
||||
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
|
||||
export QT_QPA_PLATFORMTHEME=gtk2
|
||||
|
@ -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
|
@ -6,6 +6,8 @@ set $mod Mod4
|
||||
set $alt Mod1
|
||||
floating_modifier $mod
|
||||
|
||||
bindsym $mod+Shift+l debuglog toggle; shmlog on
|
||||
|
||||
font pango:sans 9
|
||||
|
||||
# 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="Pavucontrol"] 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="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
|
||||
|
||||
new_window none
|
||||
@ -126,18 +127,19 @@ new_float none
|
||||
gaps inner 20
|
||||
gaps outer 4
|
||||
|
||||
mouse_warping none
|
||||
focus_follows_mouse yes
|
||||
popup_during_fullscreen smart
|
||||
|
||||
# keybindings
|
||||
bindsym $mod+Shift+j reload
|
||||
bindsym $mod+c exec chromium
|
||||
bindsym $mod+v exec "i3-sensible-terminal -e \\"$SHELL -c vim;$SHELL\\"
|
||||
bindsym $mod+Ctrl+v exec "i3-sensible-terminal -r floating-term -e \\"$SHELL -c vim;$SHELL\\"
|
||||
bindsym Mod1+Tab exec ~/.config/i3/alt-tab.sh
|
||||
bindsym $mod+v exec "i3-sensible-terminal -e sh -c \\"($SHELL -c $EDITOR || :) && $SHELL\\"
|
||||
bindsym $mod+Ctrl+v exec "i3-sensible-terminal --class floating-term -e sh -c \\"($SHELL -c $EDITOR || : ) && $SHELL\\"
|
||||
bindsym $mod+Return exec i3-sensible-terminal
|
||||
bindsym $mod+Ctrl+Return exec i3-sensible-terminal -r floating-term
|
||||
bindsym $mod+Shift+Return exec i3-sensible-terminal -d "`xcwd`"
|
||||
bindsym $mod+Ctrl+Shift+Return exec i3-sensible-terminal -r floating-term -d "`xcwd`"
|
||||
bindsym $mod+Ctrl+Return exec i3-sensible-terminal --class floating-term
|
||||
bindsym $mod+Shift+Return exec i3-sensible-terminal --working-directory "$(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+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'
|
||||
@ -179,9 +181,5 @@ exec --no-startup-id pullover
|
||||
exec --no-startup-id mailnag
|
||||
exec --no-startup-id picom -b --experimental-backends
|
||||
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
|
||||
|
@ -27,3 +27,7 @@ ssl = 1
|
||||
imap = 1
|
||||
idle = 0
|
||||
folder = INBOX, Spam
|
||||
|
||||
[userscriptplugin]
|
||||
script_file =
|
||||
|
||||
|
@ -67,13 +67,13 @@ exec = $XDG_CONFIG_HOME/polybar/update.sh
|
||||
tail = true
|
||||
format-prefix = " "
|
||||
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]
|
||||
type = custom/script
|
||||
exec = $XDG_CONFIG_HOME/polybar/weather.sh
|
||||
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]
|
||||
type = internal/xkeyboard
|
||||
@ -184,7 +184,7 @@ type = internal/network
|
||||
interface = eth0
|
||||
interval = 3.0
|
||||
|
||||
label-connected = %local_ip%
|
||||
label-connected = %local_ip% & %local_ip6%
|
||||
format-connected-prefix = " "
|
||||
format-connected-prefix-foreground = ${colours.icon}
|
||||
format-connected-underline = ${colours.background}
|
||||
@ -200,7 +200,7 @@ label-disconnected-foreground = ${colours.critical}
|
||||
type = internal/date
|
||||
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-alt = %a %e %b %Y %H:%M:%S
|
||||
@ -213,8 +213,8 @@ format-prefix-foreground = ${colours.icon}
|
||||
type = internal/pulseaudio
|
||||
|
||||
label-volume = %percentage%
|
||||
format-volume = %{A3:pavucontrol:}<ramp-volume> <label-volume>%{A}
|
||||
format-muted = %{A3:pavucontrol:}<label-muted>%{A}
|
||||
format-volume = %{A3:i3-msg exec pavucontrol:}<ramp-volume> <label-volume>%{A
|
||||
format-muted = %{A3:i3-msg exec pavucontrol:}<label-muted>%{A}
|
||||
|
||||
label-volume-foreground = ${root.foreground}
|
||||
format-muted-foreground = ${colours.icon}
|
||||
|
37
.config/polybar/interface.sh
Executable file
37
.config/polybar/interface.sh
Executable 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
|
||||
|
@ -108,6 +108,7 @@ Plug 'vim-airline/vim-airline-themes'
|
||||
Plug 'lervag/vimtex'
|
||||
Plug 'JamshedVesuna/vim-markdown-preview'
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'junegunn/vim-easy-align'
|
||||
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
|
||||
|
||||
" Syntax Highlighting
|
||||
|
4
aliases
4
aliases
@ -60,6 +60,7 @@ alias open=xdg-open
|
||||
alias rm='rm -i'
|
||||
alias mv='mv -i'
|
||||
alias cp='cp -ir'
|
||||
alias scp='scp -r'
|
||||
alias dd='dd status=progress'
|
||||
alias ssh="ssh -tt"
|
||||
alias wget="wget --hsts-file=$XDG_DATA_HOME/wget/hsts-file"
|
||||
@ -114,6 +115,7 @@ alias chx='chmod +x'
|
||||
|
||||
# Git Aliases
|
||||
alias g=git
|
||||
alias ginit='git init'
|
||||
alias gignore='$EDITOR .gitignore'
|
||||
alias gitc='$EDITOR $XDG_CONFIG_HOME/git/config'
|
||||
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 dotfiles="cd $DOTFILES"
|
||||
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 nf=neofetch
|
||||
|
16
scripts/3screens
Executable file
16
scripts/3screens
Executable 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
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
set -ex
|
||||
|
||||
# Based on https://github.com/vincentbernat/awesome-configuration/blob/master/bin/xsettingsd-setup
|
||||
|
||||
@ -15,6 +15,8 @@ mkdir -p "$CONF_DIR"
|
||||
|
||||
# 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
|
||||
echo Xft/DPI $(( $dpi*1024 ))
|
||||
echo Gdk/WindowScalingFactor $(( $dpi/96 ))
|
||||
|
2
scripts/gtav
Executable file
2
scripts/gtav
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec xdg-open steam://rungameid/271590
|
@ -57,9 +57,8 @@ function notify() {
|
||||
}
|
||||
|
||||
function display() {
|
||||
fontawesome=$(cat "$FONTAWESOME_FILE" | grep -v '#' | grep -v '^[[:space:]]*$')
|
||||
update=""$'\t'"Update Font Awesome cache"
|
||||
fontawesome=$(printf "$fontawesome\n$update")
|
||||
update=$'\tUpdate Font Awesome cache'
|
||||
fontawesome=$(grep -v '#\|^[[:space:]]*$' "$FONTAWESOME_FILE"; printf "$update\n")
|
||||
line=$(echo "$fontawesome" | rofi -dmenu -i -p fontawesome -normal-window -kb-custom-1 Ctrl+c -kb-row-tab '' -kb-row-select Tab $@)
|
||||
exit_code=$?
|
||||
|
||||
@ -69,7 +68,6 @@ function display() {
|
||||
return
|
||||
fi
|
||||
|
||||
#IFS=$'\t'
|
||||
line=($line)
|
||||
last=${line[${#line[@]}-1]}
|
||||
|
||||
|
@ -9,7 +9,7 @@ FILENAME="$(date '+%s%N' | sha256sum | head -c7).png"
|
||||
DIRECTORY="$HOME/pictures/screenshots"
|
||||
|
||||
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
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
Loading…
Reference in New Issue
Block a user