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

47 Commits

Author SHA1 Message Date
fa79deeb05 gitignore: exclude gopass logo
Annoyingly this file is auto-generated in the config directory, even though it's definitely not configuration 🤷
2020-03-22 23:17:45 +00:00
90fc09e1a9 scripts/fontawesome: simplify subshell calls 2020-03-22 23:09:04 +00:00
7017703cab i3: kill any rofi instances before starting
Rofi doesn't allow starting without creating/checking a pidfile, for some strange reason, so we work around it like this
2020-03-22 23:00:17 +00:00
4a646b6573 aliases: scp is always recursive
This should be the default >.<
2020-03-22 12:46:26 +00:00
37ad234319 aliases: add ginit alias 2020-03-22 12:46:07 +00:00
5547ec844c i3/powermenu: add pretty icons 2020-03-22 12:44:57 +00:00
934944d248 i3: don't stop desktop on restart
This allows restarting the i3 process without killing the session
2020-03-22 12:36:50 +00:00
ec0b562960 picom: log info; reduce excessive log spam 2020-03-22 12:36:06 +00:00
028c549ea9 polybar: delay before closing yay window
To give the user enough time to actually read the output
2020-03-22 12:35:49 +00:00
96902aee6b X11: don't fail xprofile when xmodmap is absent 2020-03-22 12:35:16 +00:00
c495293fb7 i3/powermenu: exit systemd session on logout 2020-03-22 12:34:05 +00:00
9aeeee58d0 i3: launch i3 programs with systemd
This parents each program within it's own service/scope to the systemd user session, independent of i3
2020-03-22 12:33:26 +00:00
8e86599372 i3/powermenu: fix rebooting when non-interactive 2020-03-22 12:32:00 +00:00
4b52c21ac9 alacritty: set alacritty as default terminal 2020-03-22 11:10:14 +00:00
d985ba7b12 alacritty: increase background opacity for visual 2020-03-22 10:54:27 +00:00
fb68f77812 alacritty: increase history buffer 10x 2020-03-22 10:47:49 +00:00
7deef0edfc browser: set default browser to Firefox 2020-03-22 10:47:30 +00:00
82d7d0409f X11: add gtk2 config to X11 profile 2020-03-22 10:47:13 +00:00
133af4caf1 X11: enable pixel-accurate scrolling in firefox 2020-03-22 10:37:42 +00:00
b59f33a1f5 zsh: systemd: explicitly set pager with args
Sometimes systemd ignores the $LESS variable, so force it a little harder
2020-03-22 10:28:14 +00:00
6dc01ac2bd polybar: fix updates/weather clickable icons 2020-03-22 09:55:19 +00:00
ce2d5e267a polybar: fix gateway ping for v4-only networks 2020-03-22 09:54:42 +00:00
874e177b8f systemd: polybar wait for i3
This should ensure that the IPC socket to get i3 workspaces works on polybar startup

In reality this doesn't help because systemd marks the service as active before the socket file is created, so startup is still racy
2020-03-21 23:37:05 +00:00
7b193b1b99 zsh: less enable mouse support
Usually this works most of the time, but in some invocations mouse does not work without this,

e.g. systemctl status
2020-03-21 23:37:05 +00:00
16c629fc70 zsh: enable multibyte (unicode) support
I don't know why I had this disabled. Probably copy-paste when I had no idea what it meant or did
2020-03-21 23:37:05 +00:00
02041c3b27 picom: use ewmh active-window and render damage 2020-03-21 23:37:04 +00:00
18aa625eca picom: disable logging to file 2020-03-21 23:37:04 +00:00
a45ef24aff picom: update Firefox class to 'firefox' 2020-03-21 23:37:04 +00:00
d741e2e6fa zsh: fix backspacing across newlines in vi-mode 2020-03-21 23:37:04 +00:00
080e92b740 zsh: add Ctrl+W (emacs delete word) in Vi mode
Yes, I see the irony in this one, it's just too convenient to pass up
2020-03-21 23:37:04 +00:00
9e9ba8a76f zsh: add Ctrl+F for fuzzy file search 2020-03-21 23:37:04 +00:00
f2c67c19aa zsh: tty -s prints nothing
Remove redirection of stdout/stderr as they're pointless
2020-03-21 23:37:03 +00:00
8ceb3434a0 polybar: prefer 'systemd-run --no-block' over 'i3-msg exec' 2020-03-21 23:37:03 +00:00
1929a94ef4 i3: use light instead of xbacklight 2020-03-21 23:37:03 +00:00
ccce866b55 systemd: add & enable xsettingsd service
Update `dpi` script to interact with systemd units
2020-03-21 23:37:02 +00:00
bbfb8fff3f gtk2: remove include to non-existent file 2020-03-21 23:03:43 +00:00
ff0d449fa5 git: add 'git leaders' alias
Lists git committers in order of commit count, for a repo
2020-03-21 23:02:28 +00:00
936e8828c8 git: use absolute dates in git-log 2020-03-21 23:01:50 +00:00
fb480c73c5 git: prune deleted branches on fetch/pull 2020-03-21 23:01:01 +00:00
bc89989bbb polybar: use nct6775 cputemp hwmon module 2020-03-21 22:56:09 +00:00
2770fefefd polybar: add gputemp applet
rename temperature to cputemp for consistency
2020-03-21 22:56:09 +00:00
0256369cd6 scripts/screenshot: update screenshot scp path 2020-03-21 22:56:09 +00:00
1fdb93e356 scripts/gtav: add gtav/netsplit scripts 2020-03-21 22:56:09 +00:00
f379b758c9 systemd: add & enable nm-applet service 2020-03-21 22:51:42 +00:00
93a2899c7b i3: allow popups to interrupt fullscreen windows 2020-03-21 22:33:10 +00:00
df03d9062e systemd: enable xautolock service 2020-03-21 22:31:59 +00:00
ddf5a1d387 xautolock: add xorg dependency. timeout after 5min 2020-03-21 22:30:58 +00:00
30 changed files with 159 additions and 83 deletions

View File

@ -1,11 +1,15 @@
#!/bin/sh #!/bin/sh -u
# Graphical-specific environment variables # Graphical-specific environment variables
export TERMINAL="termite" export TERMINAL="alacritty"
export BROWSER="chromium" export BROWSER="firefox"
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 GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/settings.ini"
export QT_QPA_PLATFORMTHEME=gtk2 export QT_QPA_PLATFORMTHEME=gtk2
export QT_STYLE_OVERRIDE=gtk2 export QT_STYLE_OVERRIDE=gtk2
# https://www.reddit.com/r/linux/comments/72mfv8/psa_for_firefox_users_set_moz_use_xinput21_to/
export MOZ_USE_XINPUT2=1 # enable pixel-accurate scrolling in firefox
export XDG_CURRENT_DESKTOP="GNOME" # Fixes xdg-open export XDG_CURRENT_DESKTOP="GNOME" # Fixes xdg-open
@ -15,4 +19,6 @@ xrandr --dpi $(xrdb -query | grep -i xft.dpi | cut -d: -f2)
setxkbmap -option caps:none setxkbmap -option caps:none
xset r rate 200 18 xset r rate 200 18
test -f "$XDG_CONFIG_HOME"/X11/xmodmap && \
xmodmap "$XDG_CONFIG_HOME"/X11/xmodmap xmodmap "$XDG_CONFIG_HOME"/X11/xmodmap

View File

@ -69,7 +69,7 @@ urxvt.boldItalicFont: xft:Source Code Pro:style=bold,italic:size=9
urxvt.iso14755: false urxvt.iso14755: false
urxvt.iso14755_52: false urxvt.iso14755_52: false
urxvt.perl-ext-common: default,vtwheel,font-size urxvt.perl-ext-common: default,vtwheel,font-size
urxvt.url-launcher: /usr/bin/chromium urxvt.url-launcher: /usr/bin/firefox
urxvt.matcher.button: 1 urxvt.matcher.button: 1
urxvt.keysym.C-Up: font-size:increase urxvt.keysym.C-Up: font-size:increase

View File

@ -81,7 +81,7 @@ window:
scrolling: scrolling:
# Maximum number of lines in the scrollback buffer. # Maximum number of lines in the scrollback buffer.
# Specifying '0' will disable scrolling. # Specifying '0' will disable scrolling.
history: 10000 history: 100000
# Number of lines the viewport will move for every line scrolled when # Number of lines the viewport will move for every line scrolled when
# scrollback is enabled (history > 0). # scrollback is enabled (history > 0).
@ -286,7 +286,7 @@ colors:
# #
# Window opacity as a floating point number from `0.0` to `1.0`. # Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque. # The value `0.0` is completely transparent and `1.0` is opaque.
background_opacity: 0.85 background_opacity: 0.80
selection: selection:
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"

View File

@ -140,7 +140,7 @@
dmenu = /usr/bin/rofi -dmenu -i -p '' -config ~/.config/dunst/dunst-xresources dmenu = /usr/bin/rofi -dmenu -i -p '' -config ~/.config/dunst/dunst-xresources
# Browser for opening urls in context menu. # Browser for opening urls in context menu.
browser = /usr/bin/chromium browser = /usr/bin/firefox
# Align icons left/right/off # Align icons left/right/off
icon_position = left icon_position = left

View File

@ -10,14 +10,15 @@
diffFilter = diff-highlight diffFilter = diff-highlight
[commit] [commit]
gpgsign = true gpgsign = true
[fetch]
prune = true
[push] [push]
default = upstream default = upstream
[pull] [pull]
rebase = true rebase = true
prune = true
[rebase] [rebase]
autoStash = true autoStash = true
[log]
date = relative
[format] [format]
pretty = format:%h %Cblue%ad%Creset %ae %Cgreen%s%Creset pretty = format:%h %Cblue%ad%Creset %ae %Cgreen%s%Creset
[alias] [alias]
@ -25,6 +26,7 @@
pushall = !git remote | xargs -L1 git push pushall = !git remote | xargs -L1 git push
count = !echo $(pwd) && git rev-list HEAD --count count = !echo $(pwd) && git rev-list HEAD --count
unpushed = !git log --oneline @{u}..HEAD unpushed = !git log --oneline @{u}..HEAD
leaders = !git shortlog -s -n --all --no-merges
[advice] [advice]
statusHints = false statusHints = false
pushUpdateRejected = false pushUpdateRejected = false

View File

@ -1,7 +1,6 @@
# DO NOT EDIT! This file will be overwritten by LXAppearance. # DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead. # Any customization should be done in ~/.gtkrc-2.0.mine instead.
include "/home/frebib/.gtkrc-2.0.mine"
gtk-theme-name="Arc-Dark" gtk-theme-name="Arc-Dark"
gtk-icon-theme-name="Xenlism-Wildfire" gtk-icon-theme-name="Xenlism-Wildfire"
gtk-font-name="Noto Sans 9" gtk-font-name="Noto Sans 9"

View File

@ -113,10 +113,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,29 +125,31 @@ gaps inner 20
gaps outer 4 gaps outer 4
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 systemd-run --user --scope --slice=chromium.slice --no-block -- chromium bindsym $mod+c exec notify-send "Try again" "You meant \\\$mod+b"
bindsym $mod+b exec systemd-run --user --scope --slice=firefox.slice --no-block -- firefox bindsym $mod+b exec systemd-run-i3 -c -s firefox firefox
bindsym $mod+v exec "i3-sensible-terminal -e \\"$SHELL -c vim;$SHELL\\" bindsym $mod+v exec systemd-run-i3 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 systemd-run-i3 i3-sensible-terminal --class floating-term -e sh -c "($SHELL -c $EDITOR || : ) && $SHELL"
bindsym $mod+Return exec i3-sensible-terminal bindsym $mod+Return exec systemd-run-i3 i3-sensible-terminal
bindsym $mod+Ctrl+Return exec i3-sensible-terminal -r floating-term bindsym $mod+Ctrl+Return exec systemd-run-i3 i3-sensible-terminal --class floating-term
bindsym $mod+Shift+Return exec i3-sensible-terminal -d "`xcwd`" bindsym $mod+Shift+Return exec systemd-run-i3 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 systemd-run-i3 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 -run-command 'systemd-run-i3 -n {cmd}'"
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'
bindsym $mod+Shift+e exec rofi-emoji bindsym $mod+Shift+e exec systemd-run-i3 -n rofi-emoji
bindsym $mod+Shift+i exec rofi-fontawesome bindsym $mod+Shift+i exec systemd-run-i3 -n rofi-fontawesome
bindsym --release Print exec screenshot bindsym --release Print exec systemd-run-i3 -n screenshot
bindsym --release $mod+Print exec imgur-screenshot bindsym --release $mod+Print exec systemd-run-i3 -n imgur-screenshot
bindsym $mod+$alt+space exec --no-startup-id ~/.config/i3/cycleaudio.py && pkill -RTMIN+10 i3blocks bindsym $mod+x exec systemd-run-i3 -n i3-sensible-terminal --class floating-term --hold -e /bin/echo "$(xprop -id $(xdotool getactivewindow))"
bindsym $mod+numbersign exec "i3-sensible-terminal -e 'sh -c xclip\ -o\ |\ gpg\ --decrypt\ 2>&1\ \;\ $SHELL'" bindsym $mod+$alt+space exec systemd-run-i3 -n ~/.config/i3/cycleaudio.py && pkill -RTMIN+10 i3blocks
bindsym $mod+r exec "bash -c 'pwgen -nc 32 1 | tee >(xargs notify-send Generated\ password\:) | xclip -i'" bindsym $mod+numbersign exec systemd-run-i3 -n i3-sensible-terminal --hold -e sh -c 'xclip -o | gpg --decrypt 2>&1'
bindsym $mod+g exec "LINK=$(gist -PRpc); notify-send -c transfer \\"$LINK\\"" bindsym $mod+r exec systemd-run-i3 -n bash -c 'pwgen -nc 32 1 | tee >(xargs notify-send Generated\ password\:) | xclip -i'
bindsym --release $mod+i exec sh -c 'sleep 0.5 && xdotool type --delay 400 "$(xclip -o -selection clipboard)"' bindsym $mod+g exec systemd-run-i3 -n notify-send -c transfer "$(gist -PRpc)"
bindsym --release $mod+i exec systemd-run-i3 -n sh -c 'sleep 0.5 && xdotool type --delay 400 "$(xclip -o -selection clipboard)"'
# Media player controls # Media player controls
bindsym XF86AudioPlay exec --no-startup-id playerctl -a play-pause bindsym XF86AudioPlay exec --no-startup-id playerctl -a play-pause
@ -159,7 +160,7 @@ bindsym XF86AudioPrev exec --no-startup-id playerctl -a previous
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +1000 bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +1000
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -1000 bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -1000
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86MonBrightnessUp exec xbacklight -inc 5 && pkill -RTMIN+12 i3blocks bindsym XF86MonBrightnessUp exec light -A 5 && pkill -RTMIN+12 i3blocks
bindsym XF86MonBrightnessDown exec xbacklight -dec 5 && pkill -RTMIN+12 i3blocks bindsym XF86MonBrightnessDown exec light -U 5 && pkill -RTMIN+12 i3blocks
# vim:ft=i3 # vim:ft=i3

View File

@ -1,10 +1,11 @@
#!/bin/sh #!/bin/sh
option=$(echo "lock|logout|sleep|hibernate|power off|reboot|windows" | rofi -sep "|" -dmenu -i -p "" -auto-select -hide-scrollbar -monitor 0 -width 10 -lines 7 -location 3 -tokenize false -matching normal | xargs) option="$(echo "lock|logout|sleep|hibernate|power off|reboot| windows" | \
rofi -sep "|" -dmenu -i -p "" -auto-select -hide-scrollbar -monitor 0 -width 10 -lines 7 -location 3 -tokenize false -matching normal | cut -d' ' -f2- | xargs)"
case $option in case $option in
lock) dm-tool switch-to-greeter;; lock) dm-tool switch-to-greeter;;
logout) i3-msg exit;; logout) systemctl --user exit;;
sleep) systemctl suspend;; sleep) systemctl suspend;;
hibernate) systemctl hibernate;; hibernate) systemctl hibernate;;
power\ off) systemctl poweroff;; power\ off) systemctl poweroff;;
@ -12,7 +13,5 @@ case $option in
windows) windows)
windows=`efibootmgr | grep -Po -m1 'Boot\K(\d{4}).*Windows.*' | head -c4` windows=`efibootmgr | grep -Po -m1 'Boot\K(\d{4}).*Windows.*' | head -c4`
sudo efibootmgr -n $windows sudo efibootmgr -n $windows
sudo hibereboot;; reboot;;
esac esac
exit 0

View File

@ -30,11 +30,11 @@ text/plain=vim.desktop
text/x-makefile=vim.desktop text/x-makefile=vim.desktop
# Chromium for web/html # Chromium for web/html
text/html=chromium.desktop text/html=firefox.desktop
x-scheme-handler/about=chromium.desktop x-scheme-handler/about=firefox.desktop
x-scheme-handler/http=chromium.desktop x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=chromium.desktop x-scheme-handler/https=firefox.desktop
x-scheme-handler/unknown=chromium.desktop x-scheme-handler/unknown=firefox.desktop
# Various desktop applications # Various desktop applications
inode/directory=nautilus.desktop inode/directory=nautilus.desktop

View File

@ -1,6 +1,6 @@
# Logging # Logging
log-level = "debug"; log-level = "info";
log-file = "/home/frebib/.local/share/picom.log"; #log-file = "/home/frebib/.local/share/picom.log";
# Shadow # Shadow
shadow = true; shadow = true;
@ -16,6 +16,7 @@ shadow-exclude = [
"class_g = 'Conky'", "class_g = 'Conky'",
"class_g ?= 'Notify-osd'", "class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'", "class_g = 'Cairo-clock'",
"class_g = 'firefox' && argb",
"name = 'Notification'", "name = 'Notification'",
"_GTK_FRAME_EXTENTS@:c" "_GTK_FRAME_EXTENTS@:c"
]; ];
@ -47,6 +48,7 @@ blur-background-exclude = [
"class_g = 'Onboard'", "class_g = 'Onboard'",
"class_g = 'slop'", "class_g = 'slop'",
"class_g = 'Polybar'", "class_g = 'Polybar'",
"class_g = 'firefox' && argb",
"window_type = 'dock'", "window_type = 'dock'",
"window_type = 'desktop'", "window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c" "_GTK_FRAME_EXTENTS@:c"
@ -65,7 +67,7 @@ no-fading-destroyed-argb = false;
backend = "glx"; backend = "glx";
mark-wmwin-focused = true; mark-wmwin-focused = true;
mark-ovredir-focused = true; mark-ovredir-focused = true;
use-ewmh-active-win = false; use-ewmh-active-win = true;
detect-rounded-corners = true; detect-rounded-corners = true;
detect-client-opacity = true; detect-client-opacity = true;
refresh-rate = 0; refresh-rate = 0;
@ -76,7 +78,7 @@ vsync = true;
# unredir-if-possible-exclude = [ ]; # unredir-if-possible-exclude = [ ];
focus-exclude = [ focus-exclude = [
"i:ai:chromium", "i:ai:chromium",
"class_g = 'Firefox'", "class_g = 'firefox'",
]; ];
detect-transient = true; detect-transient = true;
detect-client-leader = true; detect-client-leader = true;
@ -87,7 +89,7 @@ invert-color-include = [ ];
glx-no-stencil = true; glx-no-stencil = true;
glx-no-rebind-pixmap = true; glx-no-rebind-pixmap = true;
xrender-sync-fence = true; xrender-sync-fence = true;
#use-damage = true; use-damage = true;
# Window type settings # Window type settings
wintypes: wintypes:

View File

@ -46,8 +46,8 @@ line-colour = #f00
modules-left = i3 modules-left = i3
modules-center = modules-center =
# modules-right = volume updates weather xkeyboard wlan gateway eth memory cpu xbacklight battery temperature date # modules-right = volume updates weather xkeyboard wlan gateway eth memory cpu xbacklight battery cputemp gputemp date
modules-right = volume updates weather wlan gateway eth memory cpu xbacklight battery temperature date modules-right = volume updates weather wlan gateway eth memory cpu xbacklight battery cputemp gputemp date
tray-position = right tray-position = right
tray-detached = false tray-detached = false
@ -68,17 +68,17 @@ 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 = systemd-run --user --no-block -- i3-sensible-terminal --class floating-term -e sh -c "yay; kill -USR1 %pid%; sleep 1"
[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 = systemd-run --user --no-block -- i3-sensible-terminal --class floating-term -d 125 40 --hold -e sh -c "curl wttr.in"
[module/gateway] [module/gateway]
type = custom/script type = custom/script
exec = for v in 4 6; do ip -$v r show default | xargs -l1 sh -c 'fping --retry=1 --quiet --iface "$4" "$2"'; done && echo  || echo '%{F#f41f1c}%{F-}' exec = for v in 4 6; do ip -$v r show default | xargs -rL1 sh -c 'fping --retry=1 --quiet --iface "$4" "$2"'; done && echo  || echo '%{F#f41f1c}%{F-}'
interval = 2 interval = 2
format-prefix = " " format-prefix = " "
format-prefix-foreground = ${colours.icon} format-prefix-foreground = ${colours.icon}
@ -208,7 +208,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:systemd-run --user --no-block -- i3-sensible-terminal --class floating-term -d 66 35 -qq --hold -e sh -c "cal -y $(date +%Y)":}%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
@ -221,8 +221,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:systemd-run --user --no-block -- pavucontrol:}<ramp-volume> <label-volume>%{A}
format-muted = %{A3:pavucontrol:}<label-muted>%{A} format-muted = %{A3:systemd-run --user --no-block -- pavucontrol:}<label-muted>%{A}
label-volume-foreground = ${root.foreground} label-volume-foreground = ${root.foreground}
format-muted-foreground = ${colours.icon} format-muted-foreground = ${colours.icon}
@ -267,10 +267,10 @@ ramp-capacity-0-foreground = ${colours.critical}
ramp-capacity-1-foreground = ${colours.warning} ramp-capacity-1-foreground = ${colours.warning}
[module/temperature] [module/cputemp]
type = internal/temperature type = internal/temperature
thermal-zone = 2 hwmon-path = /sys/devices/platform/nct6775.656/hwmon/hwmon1/temp2_input
warn-temperature = 70 base-temperature = 25
format = <ramp> <label> format = <ramp> <label>
format-warn = <ramp> <label-warn> format-warn = <ramp> <label-warn>
@ -287,6 +287,15 @@ ramp-4 = 
ramp-5 =  ramp-5 = 
ramp-foreground = ${colours.icon} ramp-foreground = ${colours.icon}
[module/gputemp]
type = custom/script
exec = nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits
interval = 10
label = %output%°C
format-prefix = " "
format-prefix-foreground = ${colours.icon}
[module/powermenu] [module/powermenu]
type = custom/menu type = custom/menu

View File

@ -0,0 +1 @@
/home/frebib/.config/systemd/user/networkmanager-applet.service

View File

@ -0,0 +1 @@
/home/frebib/.config/systemd/user/xautolock.service

View File

@ -0,0 +1 @@
/home/frebib/.config/systemd/user/xsettingsd.service

View File

@ -7,7 +7,6 @@ After=profile.service xprofile.service xorg.target
[Service] [Service]
ExecStart=/usr/bin/i3 ExecStart=/usr/bin/i3
ExecReload=/bin/sh -c 'i3-msg restart; systemctl is-active --user -q picom && systemctl --user restart picom' ExecReload=/bin/sh -c 'i3-msg restart; systemctl is-active --user -q picom && systemctl --user restart picom'
ExecStop=/bin/systemctl --user stop desktop.target
Restart=always Restart=always
[Install] [Install]

View File

@ -0,0 +1,12 @@
[Unit]
Description=NetworkManager Applet
After=graphical-session.target NetworkManager.service
Requires=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/nm-applet
Restart=on-failure
[Install]
WantedBy=desktop.target

View File

@ -1,7 +1,7 @@
[Unit] [Unit]
Description=Polybar Description=Polybar
Requires=graphical-session.target Requires=graphical-session.target
After=graphical-session.target pulseaudio.socket After=graphical-session.target pulseaudio.socket i3.service
[Service] [Service]
Type=simple Type=simple

View File

@ -1,8 +1,10 @@
[Unit] [Unit]
Description=XBindKeys Description=Lock desktop session after inactivity
Requires=xorg.target
After=xorg.target
[Service] [Service]
ExecStart=/usr/bin/xautolock -time 1 -locker 'dm-tool switch-to-greeter' -detectsleep -resetsaver -secure ExecStart=/usr/bin/xautolock -time 5 -locker 'dm-tool switch-to-greeter' -detectsleep -resetsaver -secure
KillMode=process KillMode=process
Restart=on-failure Restart=on-failure

View File

@ -7,7 +7,7 @@ After=xorg.target profile.service
[Service] [Service]
Type=oneshot Type=oneshot
RemainAfterExit=yes RemainAfterExit=yes
ExecStart=/usr/bin/bash -cx '. $XDG_CONFIG_HOME/X11/xprofile && systemctl --user import-environment' ExecStart=/usr/bin/bash -c '. $XDG_CONFIG_HOME/X11/xprofile; systemctl --user import-environment'
[Install] [Install]
WantedBy=xorg.target WantedBy=xorg.target

View File

@ -0,0 +1,12 @@
[Unit]
Description=xsettingsd - provide settings to X11 applications
Requires=xorg.target
After=xorg.target profile.service
[Service]
ExecStart=/bin/sh -c 'xsettingsd -c $XDG_CONFIG_HOME/xsettingsd/xsettingsd.local'
ExecReload=/bin/kill -s HUP $MAINPID
Restart=always
[Install]
WantedBy=graphical-session.target

View File

@ -1,5 +1,3 @@
unsetopt MULTIBYTE
# Config and cache directory paths # Config and cache directory paths
CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}" CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}"
ZSH_DIR="$CONFIG_DIR/zsh" ZSH_DIR="$CONFIG_DIR/zsh"
@ -13,15 +11,16 @@ SAVEHIST=999999
exists() { which $@ 0<&- 1>/dev/null 2>/dev/null; } exists() { which $@ 0<&- 1>/dev/null 2>/dev/null; }
# Only set tty if running interactively # Only set tty if running interactively
if exists tty && tty -s 1>/dev/null 2>/dev/null; then if exists tty && tty -s; then
# Resolve at shell runtime # Resolve at shell runtime
export GPG_TTY="$(tty)" export GPG_TTY="$(tty)"
fi fi
# Configure less and add colours # Configure less and add colours
export LESS="-RI" export LESS="-RI --mouse --wheel-lines=3"
export PAGER="less" export PAGER="less"
export MANPAGER="less -+N" export MANPAGER="less -+N"
export SYSTEMD_PAGER="less $LESS"
# Disable histfile # Disable histfile
export LESSHISTFILE=- export LESSHISTFILE=-
@ -104,8 +103,10 @@ bindkey '^[[A' fzf-history-widget # Up (fzf)
bindkey '^[[B' fzf-history-widget # Down (fzf) bindkey '^[[B' fzf-history-widget # Down (fzf)
bindkey '^F' fzf-file-widget # Ctrl+F file search (fzf) bindkey '^F' fzf-file-widget # Ctrl+F file search (fzf)
bindkey "^F" fzf-file-widget
bindkey "^V" edit-command-line bindkey "^V" edit-command-line
bindkey -M vicmd "^V" edit-command-line bindkey -M vicmd "^V" edit-command-line
bindkey -M vicmd "^W" backward-delete-word
bindkey -M vicmd d vi-backward-char bindkey -M vicmd d vi-backward-char
bindkey -M vicmd h vi-down-line-or-history bindkey -M vicmd h vi-down-line-or-history
@ -116,6 +117,8 @@ bindkey -M vicmd K vi-kill-eol
bindkey -M vicmd j vi-find-next-char-skip bindkey -M vicmd j vi-find-next-char-skip
bindkey -M vicmd l vi-repeat-search bindkey -M vicmd l vi-repeat-search
# Backspace across newlines when in vi-mode
bindkey -v '^?' backward-delete-char
ZSH_AUTOSUGGEST_USE_ASYNC=true ZSH_AUTOSUGGEST_USE_ASYNC=true
ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=128 ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=128

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
bookmarks bookmarks
.config/secrets .config/secrets
.config/gopass/gopass-logo-small.png
.config/gtk-2.0/gtkfilechooser.ini .config/gtk-2.0/gtkfilechooser.ini
.config/imgur-screenshot/credentials.conf .config/imgur-screenshot/credentials.conf
.config/mailnag/mailnag.dat .config/mailnag/mailnag.dat

View File

@ -24,7 +24,6 @@ export VISUAL="vim"
export CARGO_HOME="$XDG_DATA_HOME/cargo" export CARGO_HOME="$XDG_DATA_HOME/cargo"
export GNUPGHOME="$XDG_CONFIG_HOME/gnupg" export GNUPGHOME="$XDG_CONFIG_HOME/gnupg"
export GOPATH="$XDG_DATA_HOME/go" export GOPATH="$XDG_DATA_HOME/go"
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/settings.ini"
export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc
export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass" export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass"
export PYTHONHISTFILE="$XDG_DATA_HOME/python/histfile" export PYTHONHISTFILE="$XDG_DATA_HOME/python/histfile"

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"
@ -116,6 +117,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'

View File

@ -21,11 +21,9 @@ mkdir -p "$CONF_DIR"
echo Gdk/UnscaledDPI $(( $dpi*1024/($dpi/96) )) echo Gdk/UnscaledDPI $(( $dpi*1024/($dpi/96) ))
} > $CONF_DIR/xsettingsd.local } > $CONF_DIR/xsettingsd.local
pid=$(xprop -name xsettingsd _NET_WM_PID 2> /dev/null | awk '{print $NF}')
if [ -z "$pid" ]; then
xsettingsd -c $CONF_DIR/xsettingsd.local &
else
kill -HUP $pid
fi
echo Xft.dpi: $dpi | xrdb -merge echo Xft.dpi: $dpi | xrdb -merge
xrandr --dpi $dpi
systemctl --user reload-or-restart xsettingsd
systemctl --user --no-block reload i3
systemctl --user --no-block restart polybar@i3bar dunst

2
scripts/gtav Executable file
View File

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

7
scripts/netsplit Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
PID="$(pidof GTA5.exe)"
kill -s STOP $PID
sleep 30
kill -s CONT $PID

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
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

20
scripts/systemd-run-i3 Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash -e
args=()
while getopts "u:s:e:d:cnw" opt
do case "$opt" in
u) args+=("--unit=$OPTARG");;
s) args+=("--slice=$OPTARG");;
e) args+=("--setenv=$OPTARG");;
d) args+=("--working-directory=$OPTARG");;
c) args+=("--scope");;
n) args+=("--no-block");;
w) args+=("--wait");;
*) shift;;
esac
done
shift $((OPTIND-1))
rand=$(tr -dc 'a-f0-9' < /dev/urandom | head -c 16)
exec systemd-run --user --collect ${args[@]} --unit="$1-$rand" -- "$@"