let a thousand autistic tweaks bloom
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
# This script move the selected window to the bottom left of the screen.
|
||||
|
||||
current=$(xdotool getwindowfocus)
|
||||
|
||||
# The window will take up no more than a third of
|
||||
@@ -9,9 +8,9 @@ current=$(xdotool getwindowfocus)
|
||||
newwidth=$(($(xdotool getdisplaygeometry | awk '{print $2}') / 3))
|
||||
newheight=$(($(xdotool getdisplaygeometry | awk '{print $1}') / 3))
|
||||
|
||||
xdotool windowsize $(xdotool getwindowfocus) $newheight $newwidth
|
||||
xdotool windowsize "$(xdotool getwindowfocus)" $newheight $newwidth
|
||||
|
||||
newsize=$(xdotool getwindowgeometry $(xdotool getwindowfocus) | grep Geometry | sed -e 's/x/ /g' | awk '{print $3}')
|
||||
newsize=$(xdotool getwindowgeometry "$(xdotool getwindowfocus)" | grep Geometry | sed -e 's/x/ /g' | awk '{print $3}')
|
||||
|
||||
height=$(($(xdotool getdisplaygeometry | awk '{print $2}') - newsize))
|
||||
xdotool windowmove $current 0 $height
|
||||
xdotool windowmove "$current" 0 $height
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
pkill -f /dev/video || mpv --no-osc --no-input-default-bindings --input-conf=/dev/null --geometry=-0-0 --autofit=30% --title="mpvfloat" /dev/video0
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
# bindsym $mod+a exec --no-startup-id ddspawn dropdowncalc -f mono:pixelsize=24
|
||||
# Similar to above but with `dropdowncalc` and the other args are interpretated as for my terminal emulator (to increase font)
|
||||
|
||||
|
||||
[ -z "$1" ] && exit
|
||||
|
||||
if xwininfo -tree -root | grep "(\"$1\" ";
|
||||
|
||||
@@ -43,7 +43,5 @@ esac
|
||||
|
||||
# Fix feh background if screen size/arangement has changed.
|
||||
feh --bg-scale "$HOME/.config/wall.png"
|
||||
# Polybar users will want to uncomment this line, which reactivates polybar on all new displays:
|
||||
#polybar_launch
|
||||
# Re-remap keys if keyboard added (for laptop bases)
|
||||
remaps
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
# i3 thread: https://faq.i3wm.org/question/150/how-to-launch-a-terminal-from-here/?answer=152#post-id-152
|
||||
|
||||
CMD=$TERMINAL
|
||||
@@ -8,20 +8,20 @@ CWD=''
|
||||
ID=$(xdpyinfo | grep focus | cut -f4 -d " ")
|
||||
|
||||
# Get PID of process whose window this is
|
||||
PID=$(xprop -id $ID | grep -m 1 PID | cut -d " " -f 3)
|
||||
PID=$(xprop -id "$ID" | grep -m 1 PID | cut -d " " -f 3)
|
||||
|
||||
# Get last child process (shell, vim, etc)
|
||||
if [ -n "$PID" ]; then
|
||||
TREE=$(pstree -lpA $PID | tail -n 1)
|
||||
PID=$(echo $TREE | awk -F'---' '{print $NF}' | sed -re 's/[^0-9]//g')
|
||||
TREE=$(pstree -lpA "$PID" | tail -n 1)
|
||||
PID=$(echo "$TREE" | awk -F'---' '{print $NF}' | sed -re 's/[^0-9]//g')
|
||||
|
||||
# If we find the working directory, run the command in that directory
|
||||
if [ -e "/proc/$PID/cwd" ]; then
|
||||
CWD=$(readlink /proc/$PID/cwd)
|
||||
CWD=$(readlink /proc/"$PID"/cwd)
|
||||
fi
|
||||
fi
|
||||
if [ -n "$CWD" ]; then
|
||||
cd $CWD && $CMD
|
||||
cd "$CWD" && "$CMD"
|
||||
else
|
||||
$CMD
|
||||
"$CMD"
|
||||
fi
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
clip=$(xclip -o -selection clipboard)
|
||||
|
||||
|
||||
prim=$(xclip -o -selection primary)
|
||||
|
||||
[ "$prim" != "" ] && notify-send "<b>Clipboard:</b>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#!/bin/sh
|
||||
echo | dmenu -p "Give width and height:" | xargs xdotool windowsize "$(xdotool getwindowfocus)"
|
||||
echo "📐" | dmenu -p "Give width and height:" | xargs xdotool windowsize "$(xdotool getwindowfocus)"
|
||||
|
||||
Reference in New Issue
Block a user