dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 40084275f5493ca0ad8d4b9d8acf5ab341946ffc
parent 05f46122b5496e43c3725558c606df83530a6daf
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Sat, 30 Mar 2019 00:02:09 -0400

bottomleft/right combined to hover

Diffstat:
M.config/i3/config | 4++--
D.scripts/i3cmds/bottomleft | 16----------------
D.scripts/i3cmds/bottomright | 18------------------
A.scripts/i3cmds/hover | 14++++++++++++++
4 files changed, 16 insertions(+), 36 deletions(-)

diff --git a/.config/i3/config b/.config/i3/config @@ -155,10 +155,10 @@ bindsym $mod+v exec --no-startup-id $term -e $EDITOR -c "VimwikiIndex" #bindsym $mod+Shift+v bindsym $mod+b bar mode toggle -bindsym $mod+Shift+b floating toggle; sticky toggle; exec --no-startup-id bottomleft +bindsym $mod+Shift+b floating toggle; sticky toggle; exec --no-startup-id hover left bindsym $mod+n exec $term -e newsboat && pkill -RTMIN+6 i3blocks -bindsym $mod+Shift+n floating toggle; sticky toggle; exec --no-startup-id bottomright +bindsym $mod+Shift+n floating toggle; sticky toggle; exec --no-startup-id hover right bindsym $mod+m exec --no-startup-id $term -e ncmpcpp bindsym $mod+Shift+m exec --no-startup-id lmc mute diff --git a/.scripts/i3cmds/bottomleft b/.scripts/i3cmds/bottomleft @@ -1,16 +0,0 @@ -#!/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 -# the width or height of the screen. -newwidth=$(($(xdotool getdisplaygeometry | awk '{print $2}') / 3)) -newheight=$(($(xdotool getdisplaygeometry | awk '{print $1}') / 3)) - -xdotool windowsize "$current" $newheight $newwidth - -newsize=$(xdotool getwindowgeometry "$current" | grep Geometry | sed -e 's/x/ /g' | awk '{print $3}') - -height=$(($(xdotool getdisplaygeometry | awk '{print $2}') - newsize)) -xdotool windowmove "$current" 0 $height diff --git a/.scripts/i3cmds/bottomright b/.scripts/i3cmds/bottomright @@ -1,18 +0,0 @@ -#!/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 -# the width or height of the screen. -newwidth=$(($(xdotool getdisplaygeometry | awk '{print $2}') / 3)) -newheight=$(($(xdotool getdisplaygeometry | awk '{print $1}') / 3)) - -xdotool windowsize "$current" $newheight $newwidth - -newsize=$(xdotool getwindowgeometry "$current" | grep Geometry | sed -e 's/x/ /g' | awk '{print $3}') -newwidth=$(xdotool getwindowgeometry "$current" | grep Geometry | grep -o " [0-9]*") - -vertical=$(($(xdotool getdisplaygeometry | awk '{print $2}') - newsize)) -horizontal=$(($(xdotool getdisplaygeometry | awk '{print $1}') - newwidth)) -xdotool windowmove "$current" $horizontal $vertical diff --git a/.scripts/i3cmds/hover b/.scripts/i3cmds/hover @@ -0,0 +1,14 @@ +#!/bin/sh +[ -z "$1" ] && exit # If $1 is left, hovers in the bottom left, if right, the bottom right +current=$(xdotool getwindowfocus) +newwidth=$(($(xdotool getdisplaygeometry | awk '{print $2}') / 3)) +newheight=$(($(xdotool getdisplaygeometry | awk '{print $1}') / 3)) +xdotool windowsize "$current" $newheight $newwidth +newsize=$(xdotool getwindowgeometry "$current" | grep Geometry | sed -e 's/x/ /g' | awk '{print $3}') +newwidth=$(xdotool getwindowgeometry "$current" | grep Geometry | grep -o " [0-9]*") + +case "$1" in + left) horizontal=0; vertical=$(($(xdotool getdisplaygeometry | awk '{print $2}') - newsize)) ;; + right) horizontal=$(($(xdotool getdisplaygeometry | awk '{print $1}') - newwidth)) ; vertical=$(($(xdotool getdisplaygeometry | awk '{print $2}') - newsize)) ;; +esac +xdotool windowmove "$current" $horizontal $vertical