*: Wrap lines at 80 columns where appropriate
Wrap lines at 80 columns where appropriate and I had the energy to think about how/where to wrap. There are still lines longer than that, which I plan to wrap in the future. But that is enough for now.
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
# This file is based on the standard dircolors but with bright colors when using bold font
|
# This file is based on the standard dircolors but with bright colors when using
|
||||||
|
# bold font
|
||||||
|
|
||||||
TERM Eterm
|
TERM Eterm
|
||||||
TERM ansi
|
TERM ansi
|
||||||
|
|||||||
@@ -126,7 +126,12 @@ bindsym $mod+Shift+c reload
|
|||||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||||
bindsym $mod+Shift+r restart
|
bindsym $mod+Shift+r restart
|
||||||
# exit i3 (logs you out of your X session)
|
# exit i3 (logs you out of your X session)
|
||||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
|
bindsym $mod+Shift+e exec \
|
||||||
|
i3-nagbar \
|
||||||
|
-t warning \
|
||||||
|
-m 'Do you really want to exit i3? This will end your X session.' \
|
||||||
|
-b 'Yes' \
|
||||||
|
'i3-msg exit'
|
||||||
|
|
||||||
# resize window (you can also use the mouse for that)
|
# resize window (you can also use the mouse for that)
|
||||||
mode "resize" {
|
mode "resize" {
|
||||||
@@ -163,10 +168,14 @@ bindsym $mod+r mode "resize"
|
|||||||
bindsym XF86MonBrightnessDown exec xbacklight -dec 5
|
bindsym XF86MonBrightnessDown exec xbacklight -dec 5
|
||||||
bindsym XF86MonBrightnessUp exec xbacklight -inc 5
|
bindsym XF86MonBrightnessUp exec xbacklight -inc 5
|
||||||
|
|
||||||
# Volume controls (see https://faq.i3wm.org/question/125/how-to-change-the-systems-volume.1.html)
|
# Volume controls
|
||||||
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -q -D pulse sset Master 5%+ unmute
|
# See: https://faq.i3wm.org/question/125/how-to-change-the-systems-volume.1.html
|
||||||
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -q -D pulse sset Master 5%- unmute
|
bindsym XF86AudioRaiseVolume exec --no-startup-id \
|
||||||
bindsym XF86AudioMute exec --no-startup-id amixer -q -D pulse sset Master toggle-mute
|
amixer -q -D pulse sset Master 5%+ unmute
|
||||||
|
bindsym XF86AudioLowerVolume exec --no-startup-id \
|
||||||
|
amixer -q -D pulse sset Master 5%- unmute
|
||||||
|
bindsym XF86AudioMute exec --no-startup-id \
|
||||||
|
amixer -q -D pulse sset Master toggle-mute
|
||||||
|
|
||||||
# Lock
|
# Lock
|
||||||
bindsym $mod+mod1+l exec xset s activate
|
bindsym $mod+mod1+l exec xset s activate
|
||||||
@@ -188,22 +197,34 @@ for_window [class="^$TERMINAL-256color$" title="^scratchpad-terminal$"] \
|
|||||||
resize set 1600 900, \
|
resize set 1600 900, \
|
||||||
move position center
|
move position center
|
||||||
# Toggle the scratchpad-terminal or create a new one if none exists.
|
# Toggle the scratchpad-terminal or create a new one if none exists.
|
||||||
bindsym $mod+comma exec i3-msg '[class="^$TERMINAL-256color$" title="^scratchpad-terminal$"] scratchpad show' || $TERMINAL -A 0.45 -d "$(xcwd)" -c $TERMINAL-256color -t scratchpad-terminal
|
bindsym $mod+comma exec \
|
||||||
|
i3-msg '[class="^$TERMINAL-256color$" title="^scratchpad-terminal$"]
|
||||||
|
scratchpad show' \
|
||||||
|
|| $TERMINAL -A 0.45 \
|
||||||
|
-d "$(xcwd)" \
|
||||||
|
-c $TERMINAL-256color \
|
||||||
|
-t scratchpad-terminal
|
||||||
|
|
||||||
for_window [class="^TelegramDesktop$"] \
|
for_window [class="^TelegramDesktop$"] \
|
||||||
move scratchpad, \
|
move scratchpad, \
|
||||||
scratchpad show
|
scratchpad show
|
||||||
bindsym $mod+Shift+t exec i3-msg '[class="^TelegramDesktop$"] scratchpad show' || telegram-desktop
|
bindsym $mod+Shift+t exec \
|
||||||
|
i3-msg '[class="^TelegramDesktop$"] scratchpad show' \
|
||||||
|
|| telegram-desktop
|
||||||
|
|
||||||
for_window [class="^Signal$"] \
|
for_window [class="^Signal$"] \
|
||||||
move scratchpad, \
|
move scratchpad, \
|
||||||
scratchpad show
|
scratchpad show
|
||||||
bindsym $mod+Shift+s exec i3-msg '[class="^Signal$"] scratchpad show' || signal-desktop
|
bindsym $mod+Shift+s exec \
|
||||||
|
i3-msg '[class="^Signal$"] scratchpad show' \
|
||||||
|
|| signal-desktop
|
||||||
|
|
||||||
for_window [class="^Bitwarden$"] \
|
for_window [class="^Bitwarden$"] \
|
||||||
move scratchpad, \
|
move scratchpad, \
|
||||||
scratchpad show
|
scratchpad show
|
||||||
bindsym $mod+Shift+b exec i3-msg '[class="^Bitwarden$"] scratchpad show' || bitwarden
|
bindsym $mod+Shift+b exec \
|
||||||
|
i3-msg '[class="^Bitwarden$"] scratchpad show' \
|
||||||
|
|| bitwarden
|
||||||
|
|
||||||
for_window [class="^$TERMINAL-256color$" title="^polybar-datetime-calendar$"] \
|
for_window [class="^$TERMINAL-256color$" title="^polybar-datetime-calendar$"] \
|
||||||
floating enable, \
|
floating enable, \
|
||||||
@@ -222,6 +243,8 @@ for_window [class="^$TERMINAL-256color$" title="^fzf-monitor-setup$"] \
|
|||||||
border pixel 3, \
|
border pixel 3, \
|
||||||
resize set 378 300, \
|
resize set 378 300, \
|
||||||
move position 1 32
|
move position 1 32
|
||||||
bindsym $mod+m exec pkill -f fzf-monitor-setup -O 1 || $TERMINAL -t fzf-monitor-setup -e ~/.local/bin/monitor-setup
|
bindsym $mod+m exec \
|
||||||
|
pkill -f fzf-monitor-setup -O 1 \
|
||||||
|
|| $TERMINAL -t fzf-monitor-setup -e ~/.local/bin/monitor-setup
|
||||||
|
|
||||||
# vim: ft=i3
|
# vim: ft=i3
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
if [ 1 -lt "$(xrandr -q | grep " connected" | wc -l)" ]; then
|
if [ 1 -lt "$(xrandr -q | grep " connected" | wc -l)" ]; then
|
||||||
# scale second monitor to 3200x1800 and put to the left
|
# scale second monitor to 3200x1800 and put to the left
|
||||||
xrandr --output eDP1 --auto --pos 0x0 --primary --output DP1 --auto --scale-from 3200x1800 --pos 3200x0 --fb 6400x1800
|
xrandr --output eDP1 --auto --pos 0x0 --primary \
|
||||||
|
--output DP1 --auto --scale-from 3200x1800 --pos 3200x0 \
|
||||||
|
--fb 6400x1800
|
||||||
feh --bg-scale --no-fehbg "$HOME"/pics/wallpapers/wallpaper
|
feh --bg-scale --no-fehbg "$HOME"/pics/wallpapers/wallpaper
|
||||||
killall -q polybar
|
killall -q polybar
|
||||||
while pgrep -x polybar >/dev/null; do sleep 1; done
|
while pgrep -x polybar >/dev/null; do sleep 1; done
|
||||||
|
|||||||
@@ -5,14 +5,24 @@ bluetooth_print() {
|
|||||||
bluetoothctl | while read -r; do
|
bluetoothctl | while read -r; do
|
||||||
if [[ "$(systemctl is-active "bluetooth.service")" = "active" ]]; then
|
if [[ "$(systemctl is-active "bluetooth.service")" = "active" ]]; then
|
||||||
|
|
||||||
devices_paired=$(echo paired-devices | bluetoothctl | sed -n '/paired-devices/,$p' | grep Device | cut -d ' ' -f 2)
|
devices_paired=$(
|
||||||
|
echo paired-devices \
|
||||||
|
| bluetoothctl \
|
||||||
|
| sed -n '/paired-devices/,$p' \
|
||||||
|
| grep Device \
|
||||||
|
| cut -d ' ' -f 2
|
||||||
|
)
|
||||||
counter=0
|
counter=0
|
||||||
|
|
||||||
echo "$devices_paired" | while read -r line; do
|
echo "$devices_paired" | while read -r line; do
|
||||||
device_info=$(echo "info $line" | bluetoothctl)
|
device_info=$(echo "info $line" | bluetoothctl)
|
||||||
|
|
||||||
if echo "$device_info" | grep -q "Connected: yes"; then
|
if echo "$device_info" | grep -q "Connected: yes"; then
|
||||||
device_alias=$(echo "$device_info" | grep "Alias" | cut -d ' ' -f 2-)
|
device_alias=$(
|
||||||
|
echo "$device_info" \
|
||||||
|
| grep "Alias" \
|
||||||
|
| cut -d ' ' -f 2-
|
||||||
|
)
|
||||||
|
|
||||||
if [[ $counter -gt 0 ]]; then
|
if [[ $counter -gt 0 ]]; then
|
||||||
printf ", %s" "$device_alias"
|
printf ", %s" "$device_alias"
|
||||||
@@ -39,12 +49,24 @@ bluetooth_toggle() {
|
|||||||
echo "power on" | bluetoothctl >> /dev/null
|
echo "power on" | bluetoothctl >> /dev/null
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
devices_paired=$(echo paired-devices | bluetoothctl | sed -n '/paired-devices/,$p' | grep Device | cut -d ' ' -f 2)
|
devices_paired=$(
|
||||||
|
echo paired-devices
|
||||||
|
| bluetoothctl \
|
||||||
|
| sed -n '/paired-devices/,$p' \
|
||||||
|
| grep Device \
|
||||||
|
| cut -d ' ' -f 2
|
||||||
|
)
|
||||||
echo "$devices_paired" | while read -r line; do
|
echo "$devices_paired" | while read -r line; do
|
||||||
echo "connect $line" | bluetoothctl >> /dev/null
|
echo "connect $line" | bluetoothctl >> /dev/null
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
devices_paired=$(echo paired-devices | bluetoothctl | sed -n '/paired-devices/,$p' | grep Device | cut -d ' ' -f 2)
|
devices_paired=$(
|
||||||
|
echo paired-devices \
|
||||||
|
| bluetoothctl \
|
||||||
|
| sed -n '/paired-devices/,$p' \
|
||||||
|
| grep Device \
|
||||||
|
| cut -d ' ' -f 2
|
||||||
|
)
|
||||||
echo "$devices_paired" | while read -r line; do
|
echo "$devices_paired" | while read -r line; do
|
||||||
device_info=$(echo "info $line" | bluetoothctl)
|
device_info=$(echo "info $line" | bluetoothctl)
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
command -v playerctl >/dev/null 2>&1 || { printf "playerctl not found.\n" >&2; exit 1; }
|
command -v playerctl >/dev/null 2>&1 || { printf "playerctl not found.\n" >&2; exit 1; }
|
||||||
|
|
||||||
# metadata="$(playerctl metadata --format '{{status}} {{artist}} - {{title}} ({{duration(position)}}|{{duration(mpris:length)}})')"
|
|
||||||
metadata="$(playerctl metadata --format '{{status}} {{artist}}' 2>/dev/null)"
|
metadata="$(playerctl metadata --format '{{status}} {{artist}}' 2>/dev/null)"
|
||||||
title="$(playerctl metadata --format '{{title}}' 2>/dev/null)"
|
title="$(playerctl metadata --format '{{title}}' 2>/dev/null)"
|
||||||
duration="$(playerctl metadata --format '({{duration(position)}}|{{duration(mpris:length)}})' 2>/dev/null)"
|
duration="$(2>/dev/null playerctl metadata \
|
||||||
|
--format '({{duration(position)}}|{{duration(mpris:length)}})'
|
||||||
|
)"
|
||||||
|
|
||||||
|
|
||||||
if [ -n "$metadata" ] && [ "$metadata" != "No players found" ]; then
|
if [ -n "$metadata" ] && [ "$metadata" != "No players found" ]; then
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ if [ -n "$connection" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# [o] is a hack to not grep the grep-command
|
# [o] is a hack to not grep the grep-command. See:
|
||||||
# see: https://stackoverflow.com/questions/9375711/more-elegant-ps-aux-grep-v-grep
|
# https://stackoverflow.com/questions/9375711/more-elegant-ps-aux-grep-v-grep
|
||||||
if ps ax | grep -q "[o]penvpn"; then
|
if ps ax | grep -q "[o]penvpn"; then
|
||||||
echo "VPN"
|
echo "VPN"
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ set confirm_on_delete always
|
|||||||
# README.md for dependencies) to preview images, archives, etc.
|
# README.md for dependencies) to preview images, archives, etc.
|
||||||
#set preview_script ~/.config/ranger/scope.sh
|
#set preview_script ~/.config/ranger/scope.sh
|
||||||
|
|
||||||
# Use the external preview script or display simple plain text or image previews?
|
# Use the external preview script or display simple plain text or image
|
||||||
|
# previews?
|
||||||
set use_preview_script true
|
set use_preview_script true
|
||||||
|
|
||||||
# Automatically count files in the directory, even before entering them?
|
# Automatically count files in the directory, even before entering them?
|
||||||
@@ -111,8 +112,8 @@ set iterm2_font_height 11
|
|||||||
# Use a unicode "..." character to mark cut-off filenames?
|
# Use a unicode "..." character to mark cut-off filenames?
|
||||||
set unicode_ellipsis false
|
set unicode_ellipsis false
|
||||||
|
|
||||||
# BIDI support - try to properly display file names in RTL languages (Hebrew, Arabic).
|
# BIDI support - try to properly display file names in RTL languages (Hebrew,
|
||||||
# Requires the python-bidi pip package
|
# Arabic). Requires the python-bidi pip package
|
||||||
set bidi_support false
|
set bidi_support false
|
||||||
|
|
||||||
# Show dotfiles in the bookmark preview box?
|
# Show dotfiles in the bookmark preview box?
|
||||||
@@ -273,8 +274,8 @@ set one_indexed false
|
|||||||
# Save tabs on exit
|
# Save tabs on exit
|
||||||
set save_tabs_on_exit false
|
set save_tabs_on_exit false
|
||||||
|
|
||||||
# Enable scroll wrapping - moving down while on the last item will wrap around to
|
# Enable scroll wrapping - moving down while on the last item will wrap around
|
||||||
# the top and vice versa.
|
# to the top and vice versa.
|
||||||
set wrap_scroll true
|
set wrap_scroll true
|
||||||
|
|
||||||
# Set the global_inode_type_filter to nothing. Possible options: d, f and l for
|
# Set the global_inode_type_filter to nothing. Possible options: d, f and l for
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Inspired by https://github.com/cramermarius/rofi-menus/blob/master/scripts/powermenu.sh
|
# Inspired by:
|
||||||
|
# https://github.com/cramermarius/rofi-menus/blob/master/scripts/powermenu.sh
|
||||||
|
|
||||||
# entries with associated commands
|
# entries with associated commands
|
||||||
declare -A entries
|
declare -A entries
|
||||||
|
|||||||
@@ -30,10 +30,21 @@ KNOWNCON=$(nmcli connection show)
|
|||||||
# Really janky way of telling if there is currently a connection
|
# Really janky way of telling if there is currently a connection
|
||||||
CONSTATE=$(nmcli -fields WIFI g)
|
CONSTATE=$(nmcli -fields WIFI g)
|
||||||
|
|
||||||
CURRSSID=$(LANGUAGE=C nmcli -t -f active,ssid dev wifi | awk -F: '$1 ~ /^yes/ {print $2}')
|
CURRSSID=$(LANGUAGE=C \
|
||||||
|
nmcli -t -f active,ssid dev wifi \
|
||||||
|
| awk -F: '$1 ~ /^yes/ {print $2}'
|
||||||
|
)
|
||||||
|
|
||||||
if [[ ! -z $CURRSSID ]]; then
|
if [[ ! -z $CURRSSID ]]; then
|
||||||
HIGHLINE=$(echo "$(echo "$LIST" | awk -F "[ ]{2,}" '{print $1}' | grep -Fxn -m 1 "$CURRSSID" | awk -F ":" '{print $1}') + 1" | bc )
|
HIGHLINE=$(
|
||||||
|
echo "$(
|
||||||
|
echo "$LIST" \
|
||||||
|
| awk -F "[ ]{2,}" '{print $1}' \
|
||||||
|
| grep -Fxn -m 1 "$CURRSSID" \
|
||||||
|
| awk -F ":" '{print $1}'
|
||||||
|
) + 1" \
|
||||||
|
| bc
|
||||||
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# HOPEFULLY you won't need this as often as I do
|
# HOPEFULLY you won't need this as often as I do
|
||||||
@@ -53,15 +64,25 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
CHENTRY=$(echo -e "$TOGGLE\nmanual\n$LIST" | uniq -u | rofi -dmenu -p "Wi-Fi SSID: " -lines "$LINENUM" -a "$HIGHLINE" -location "$POSITION" -yoffset "$YOFF" -xoffset "$XOFF" -font "$FONT" -width -"$RWIDTH")
|
CHENTRY=$(
|
||||||
|
echo -e "$TOGGLE\nmanual\n$LIST" \
|
||||||
|
| uniq -u \
|
||||||
|
| rofi -dmenu -p "Wi-Fi SSID: " -lines "$LINENUM" -a "$HIGHLINE" \
|
||||||
|
-location "$POSITION" -yoffset "$YOFF" -xoffset "$XOFF" \
|
||||||
|
-font "$FONT" -width -"$RWIDTH"
|
||||||
|
)
|
||||||
#echo "$CHENTRY"
|
#echo "$CHENTRY"
|
||||||
CHSSID=$(echo "$CHENTRY" | sed 's/\s\{2,\}/\|/g' | awk -F "|" '{print $1}')
|
CHSSID=$(echo "$CHENTRY" | sed 's/\s\{2,\}/\|/g' | awk -F "|" '{print $1}')
|
||||||
#echo "$CHSSID"
|
#echo "$CHSSID"
|
||||||
|
|
||||||
# If the user inputs "manual" as their SSID in the start window, it will bring them to this screen
|
# If the user inputs "manual" as their SSID in the start window, it will bring
|
||||||
|
# them to this screen
|
||||||
if [ "$CHENTRY" = "manual" ] ; then
|
if [ "$CHENTRY" = "manual" ] ; then
|
||||||
# Manual entry of the SSID and password (if appplicable)
|
# Manual entry of the SSID and password (if appplicable)
|
||||||
MSSID=$(echo "enter the SSID of the network (SSID,password)" | rofi -dmenu -p "Manual Entry: " -font "$FONT" -lines 1)
|
MSSID=$(
|
||||||
|
echo "enter the SSID of the network (SSID,password)" \
|
||||||
|
| rofi -dmenu -p "Manual Entry: " -font "$FONT" -lines 1
|
||||||
|
)
|
||||||
# Separating the password from the entered string
|
# Separating the password from the entered string
|
||||||
MPASS=$(echo "$MSSID" | awk -F "," '{print $2}')
|
MPASS=$(echo "$MSSID" | awk -F "," '{print $2}')
|
||||||
|
|
||||||
@@ -83,17 +104,26 @@ elif [ "$CHENTRY" = "toggle off" ]; then
|
|||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
# If the connection is already in use, then this will still be able to get the SSID
|
# If the connection is already in use, then this will still be able to get
|
||||||
|
# the SSID
|
||||||
if [ "$CHSSID" = "*" ]; then
|
if [ "$CHSSID" = "*" ]; then
|
||||||
CHSSID=$(echo "$CHENTRY" | sed 's/\s\{2,\}/\|/g' | awk -F "|" '{print $3}')
|
CHSSID=$(
|
||||||
|
echo "$CHENTRY" \
|
||||||
|
| sed 's/\s\{2,\}/\|/g' \
|
||||||
|
| awk -F "|" '{print $3}'
|
||||||
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Parses the list of preconfigured connections to see if it already contains the chosen SSID. This speeds up the connection process
|
# Parses the list of preconfigured connections to see if it already contains
|
||||||
|
# the chosen SSID. This speeds up the connection process
|
||||||
if [[ $(echo "$KNOWNCON" | grep "$CHSSID") = "$CHSSID" ]]; then
|
if [[ $(echo "$KNOWNCON" | grep "$CHSSID") = "$CHSSID" ]]; then
|
||||||
nmcli con up "$CHSSID"
|
nmcli con up "$CHSSID"
|
||||||
else
|
else
|
||||||
if [[ "$CHENTRY" =~ "WPA2" ]] || [[ "$CHENTRY" =~ "WEP" ]]; then
|
if [[ "$CHENTRY" =~ "WPA2" ]] || [[ "$CHENTRY" =~ "WEP" ]]; then
|
||||||
WIFIPASS=$(echo "if connection is stored, hit enter" | rofi -dmenu -p "password: " -lines 1 -font "$FONT" )
|
WIFIPASS=$(
|
||||||
|
echo "if connection is stored, hit enter" \
|
||||||
|
| rofi -dmenu -p "password: " -lines 1 -font "$FONT"
|
||||||
|
)
|
||||||
fi
|
fi
|
||||||
nmcli dev wifi con "$CHSSID" password "$WIFIPASS"
|
nmcli dev wifi con "$CHSSID" password "$WIFIPASS"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ set -g mode-keys vi
|
|||||||
# Disable xterm escape sequences for setting clipboard
|
# Disable xterm escape sequences for setting clipboard
|
||||||
set -s set-clipboard off
|
set -s set-clipboard off
|
||||||
# Copy selection into primary selection (without aborting)
|
# Copy selection into primary selection (without aborting)
|
||||||
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear "xclip -se p"
|
bind-key -T copy-mode-vi MouseDragEnd1Pane \
|
||||||
|
send-keys -X copy-pipe-no-clear "xclip -se p"
|
||||||
|
|
||||||
# https://github.com/neovim/neovim/wiki/FAQ#cursor-shape-doesnt-change-in-tmux
|
# https://github.com/neovim/neovim/wiki/FAQ#cursor-shape-doesnt-change-in-tmux
|
||||||
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
|
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
|
||||||
@@ -26,7 +27,8 @@ bind-key > split-window -h -c "#{pane_current_path}"
|
|||||||
bind-key -T prefix c new-window -c "#{pane_current_path}"
|
bind-key -T prefix c new-window -c "#{pane_current_path}"
|
||||||
|
|
||||||
# Resource config
|
# Resource config
|
||||||
bind-key -T prefix R source-file "$XDG_CONFIG_HOME/tmux/tmux.conf" \; display-message "Sourced $XDG_CONFIG_HOME/tmux/tmux.conf"
|
bind-key -T prefix R source-file "$XDG_CONFIG_HOME/tmux/tmux.conf" \; \
|
||||||
|
display-message "Sourced $XDG_CONFIG_HOME/tmux/tmux.conf"
|
||||||
|
|
||||||
# Fullscreen pane (toggle)
|
# Fullscreen pane (toggle)
|
||||||
bind-key -T prefix F resize-pane -Z
|
bind-key -T prefix F resize-pane -Z
|
||||||
@@ -101,9 +103,12 @@ set -g @resurrect-strategy-vim 'session'
|
|||||||
set -g @resurrect-strategy-nvim 'session'
|
set -g @resurrect-strategy-nvim 'session'
|
||||||
# Save sessions before detaching
|
# Save sessions before detaching
|
||||||
unbind -T prefix d
|
unbind -T prefix d
|
||||||
bind-key -T prefix d run-shell "$XDG_CONFIG_HOME/tmux/plugins/tmux-resurrect/scripts/save.sh" \; detach-client
|
bind-key -T prefix d \
|
||||||
|
run-shell "$XDG_CONFIG_HOME/tmux/plugins/tmux-resurrect/scripts/save.sh" \; \
|
||||||
|
detach-client
|
||||||
|
|
||||||
## Theming (inspired by https://github.com/Who23/dots/blob/21976e76644d8d9261ebdcf61733d2181a1612eb/tmux.conf)
|
## Theming. Inspired by:
|
||||||
|
## https://github.com/Who23/dots/blob/21976e76644d8d9261ebdcf61733d2181a1612eb/tmux.conf
|
||||||
set -g status-style bg=default,fg=white
|
set -g status-style bg=default,fg=white
|
||||||
set -g message-command-style bg=default,fg=brightyellow
|
set -g message-command-style bg=default,fg=brightyellow
|
||||||
set -g message-style bg=brightyellow,fg=black
|
set -g message-style bg=brightyellow,fg=black
|
||||||
@@ -124,5 +129,5 @@ set -g status-justify centre
|
|||||||
set -g window-status-current-format "#[fg=brightyellow bold]#I #W"
|
set -g window-status-current-format "#[fg=brightyellow bold]#I #W"
|
||||||
set -g window-status-format "#[fg=brightblack]#I #W"
|
set -g window-status-format "#[fg=brightblack]#I #W"
|
||||||
|
|
||||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
# Initialize TMUX plugin manager. Keep this line at the very bottom.
|
||||||
run -b "$XDG_CONFIG_HOME/tmux/plugins/tpm/tpm"
|
run -b "$XDG_CONFIG_HOME/tmux/plugins/tpm/tpm"
|
||||||
|
|||||||
@@ -1,27 +1,32 @@
|
|||||||
# specifies the time (in seconds) to wait for response to a prompt by auth_x11 before giving up and
|
# specifies the time (in seconds) to wait for response to a prompt by auth_x11
|
||||||
# reverting to the screen saver.
|
# before giving up and reverting to the screen saver.
|
||||||
export XSECURELOCK_AUTH_TIMEOUT=10
|
export XSECURELOCK_AUTH_TIMEOUT=10
|
||||||
|
|
||||||
# specifies the time (in seconds) before telling X11 to fully blank the screen; a negative value
|
# specifies the time (in seconds) before telling X11 to fully blank the screen;
|
||||||
# disables X11 blanking. The time is measured since the closing of the auth window or xsecurelock
|
# a negative value disables X11 blanking. The time is measured since the closing
|
||||||
# startup. Setting this to 0 is rather nonsensical, as key-release events (e.g. from the keystroke
|
# of the auth window or xsecurelock startup. Setting this to 0 is rather
|
||||||
# to launch xsecurelock or from pressing escape to close the auth dialog) always wake up the screen.
|
# nonsensical, as key-release events (e.g. from the keystroke to launch
|
||||||
|
# xsecurelock or from pressing escape to close the auth dialog) always wake up
|
||||||
|
# the screen.
|
||||||
export XSECURELOCK_BLANK_TIMEOUT=10
|
export XSECURELOCK_BLANK_TIMEOUT=10
|
||||||
|
|
||||||
# the date format to show. Defaults to the locale settings.
|
# the date format to show. Defaults to the locale settings.
|
||||||
export XSECURELOCK_DATETIME_FORMAT="%F %T "
|
export XSECURELOCK_DATETIME_FORMAT="%F %T "
|
||||||
|
|
||||||
# time_ shows the current time since the epoch on each keystroke. This may be the most secure mode,
|
# time: shows the current time since the epoch on each keystroke. This may be
|
||||||
# as it gives feedback to keystroke based exclusively on public information, and does not carry
|
# the most secure mode, as it gives feedback to keystroke based
|
||||||
# over any state between keystrokes whatsoever - not even some form of randomness.
|
# exclusively on public information, and does not carry over any state
|
||||||
|
# between keystrokes whatsoever - not even some form of randomness.
|
||||||
|
#
|
||||||
# time_hex: same as time, but in microseconds and hexadecimal. "Because we can".
|
# time_hex: same as time, but in microseconds and hexadecimal. "Because we can".
|
||||||
export XSECURELOCK_PASSWORD_PROMPT=time_hex
|
export XSECURELOCK_PASSWORD_PROMPT=time_hex
|
||||||
|
|
||||||
# whether to show local date and time on the login. Disabled by default.
|
# whether to show local date and time on the login. Disabled by default.
|
||||||
export XSECURELOCK_SHOW_DATETIME=1
|
export XSECURELOCK_SHOW_DATETIME=1
|
||||||
|
|
||||||
# whether to show the hostname on the login screen of auth_x11. Possible values are 0 for not
|
# whether to show the hostname on the login screen of auth_x11. Possible
|
||||||
# showing the hostname, 1 for showing the short form, and 2 for showing the long form.
|
# values are 0 for not showing the hostname, 1 for showing the short form, and 2
|
||||||
|
# for showing the long form.
|
||||||
export XSECURELOCK_SHOW_HOSTNAME=0
|
export XSECURELOCK_SHOW_HOSTNAME=0
|
||||||
|
|
||||||
# whether to show the username on the login screen of auth_x11.
|
# whether to show the username on the login screen of auth_x11.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
## Author: druckdev
|
## Author: druckdev
|
||||||
## Created: 2018-11-23
|
## Created: 2018-11-23
|
||||||
|
|
||||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc.
|
# Enable Powerlevel10k instant prompt. Should stay close to the top.
|
||||||
# Initialization code that may require console input (password prompts, [y/n]
|
# Initialization code that may require console input (password prompts, [y/n]
|
||||||
# confirmations, etc.) must go above this block; everything else may go below.
|
# confirmations, etc.) must go above this block; everything else may go below.
|
||||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ pushd -q "$WORKTREE_PATH"
|
|||||||
|
|
||||||
# Restart the shell (forcefully interactive) until the worktree is removed
|
# Restart the shell (forcefully interactive) until the worktree is removed
|
||||||
until [[ ! -e "$WORKTREE_PATH" ]] || git worktree remove "$WORKTREE_PATH"; do
|
until [[ ! -e "$WORKTREE_PATH" ]] || git worktree remove "$WORKTREE_PATH"; do
|
||||||
[[ -t 0 ]] || >&2 printf "Dropping into interactive shell to resolve conflicts\n"
|
[[ -t 0 ]] ||
|
||||||
|
>&2 printf "Dropping into interactive shell to resolve conflicts\n"
|
||||||
"$SHELL" -i && errc=$? || errc=$?
|
"$SHELL" -i && errc=$? || errc=$?
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ zstyle ':completion:*' menu select=2
|
|||||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||||
zstyle ':completion:*' list-colors ''
|
zstyle ':completion:*' list-colors ''
|
||||||
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
|
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
|
||||||
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{-_a-zA-Z}={_-A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
|
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' \
|
||||||
|
'm:{-_a-zA-Z}={_-A-Za-z}' \
|
||||||
|
'r:|[._-]=* r:|=* l:|=*'
|
||||||
zstyle ':completion:*' menu select=long
|
zstyle ':completion:*' menu select=long
|
||||||
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
||||||
zstyle ':completion:*' use-compctl false
|
zstyle ':completion:*' use-compctl false
|
||||||
|
|||||||
@@ -305,7 +305,8 @@ crypt-close() {
|
|||||||
fi
|
fi
|
||||||
udisksctl power-off -b "$1"
|
udisksctl power-off -b "$1"
|
||||||
|
|
||||||
rm ~/mounts/"${mount_point:t}" && rmdir --ignore-fail-on-non-empty ~/mounts/ \
|
rm ~/mounts/"${mount_point:t}" \
|
||||||
|
&& rmdir --ignore-fail-on-non-empty ~/mounts/ \
|
||||||
|| echo "~/mounts/${mount_point:t} did not exist"
|
|| echo "~/mounts/${mount_point:t} did not exist"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
## This runs as a crontab every 5minutes ('*/5 * * * * /usr/local/bin/wifi-mute')
|
# This runs as a crontab every 5minutes
|
||||||
|
# ('*/5 * * * * /usr/local/bin/wifi-mute')
|
||||||
|
|
||||||
if [[ "$(nmcli -t -f name con show --active)" =~ eduroam* ]]; then # iwgetid -r
|
if [[ "$(nmcli -t -f name con show --active)" =~ eduroam* ]]; then # iwgetid -r
|
||||||
# TODO: mute only speaker, not headphones
|
# TODO: mute only speaker, not headphones
|
||||||
|
|||||||
@@ -3,12 +3,14 @@
|
|||||||
## Author: druckdev
|
## Author: druckdev
|
||||||
## Created: 2020-06-05
|
## Created: 2020-06-05
|
||||||
##
|
##
|
||||||
## A script that modifies Zoom links for the use in browsers, opens it then in a private chromium
|
## A script that modifies Zoom links for the use in browsers, opens it then in a
|
||||||
## window and puts the password into the clipboard. If no argument is given the link is taken out
|
## private chromium window and puts the password into the clipboard. If no
|
||||||
## of the clipboard.
|
## argument is given the link is taken out of the clipboard.
|
||||||
## The reason behind the choice of Chromium is that my Firefox does weird things when used in
|
##
|
||||||
## scripts and that I wanted to run Zoom separately from my normal Firefox instances.
|
## The reason behind the choice of Chromium is that my Firefox does weird things
|
||||||
## (although this should be solvable by separate Firefox profiles.)
|
## when used in scripts and that I wanted to run Zoom separately from my normal
|
||||||
|
## Firefox instances. (although this should be solvable by separate Firefox
|
||||||
|
## profiles.)
|
||||||
|
|
||||||
# Check if necessary commands exist
|
# Check if necessary commands exist
|
||||||
command -v firefox >/dev/null 2>&1 || return 1
|
command -v firefox >/dev/null 2>&1 || return 1
|
||||||
@@ -17,7 +19,8 @@ command -v xclip >/dev/null 2>&1 || return 1
|
|||||||
# If no argument is given, set the clipboard as argument
|
# If no argument is given, set the clipboard as argument
|
||||||
[ $# -gt 0 ] || set "$(xclip -selection c -o)"
|
[ $# -gt 0 ] || set "$(xclip -selection c -o)"
|
||||||
# Check for right format
|
# Check for right format
|
||||||
echo "$1" | grep -Eq "^https://tu-berlin.zoom.us/(j|wc/join)/[0-9]*\?pwd=.+" || return 1
|
echo "$1" | grep -Eq "^https://tu-berlin.zoom.us/(j|wc/join)/[0-9]*\?pwd=.+" \
|
||||||
|
|| return 1
|
||||||
|
|
||||||
# Make link work for browser joining
|
# Make link work for browser joining
|
||||||
link="$(echo "${1%?pwd=*}" | sed 's_/j/_/wc/join/_')"
|
link="$(echo "${1%?pwd=*}" | sed 's_/j/_/wc/join/_')"
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ subject="${subject#squash! }"
|
|||||||
# and thus all other characters are free to use.
|
# and thus all other characters are free to use.
|
||||||
git_comment_char="$(git config --get --default='#' core.commentChar \
|
git_comment_char="$(git config --get --default='#' core.commentChar \
|
||||||
| sed 's:\^:\\&:g')"
|
| sed 's:\^:\\&:g')"
|
||||||
# git's cut-line to cut off everything behind it (e.g. commit patch when verbose)
|
# git's cut-line to cut off everything behind it (e.g. commit patch with
|
||||||
|
# `commit.verbose`)
|
||||||
cut_line='------------------------ >8 ------------------------'
|
cut_line='------------------------ >8 ------------------------'
|
||||||
|
|
||||||
# Take all lines after the subject until EOF or the cut-line (here `auto` is
|
# Take all lines after the subject until EOF or the cut-line (here `auto` is
|
||||||
|
|||||||
Reference in New Issue
Block a user