mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-11-06 03:12:24 +00:00
asdf
This commit is contained in:
parent
2fda7cb5c7
commit
80654b2d79
7 changed files with 117 additions and 24 deletions
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"optOut": false,
|
"optOut": false,
|
||||||
"lastUpdateCheck": 1590756983935
|
"lastUpdateCheck": 1590849135770
|
||||||
}
|
}
|
|
@ -7,7 +7,8 @@ gtk-enable-input-feedback-sounds=0
|
||||||
gtk-font-name=Sans 9
|
gtk-font-name=Sans 9
|
||||||
gtk-icon-theme-name=Arc-X-D
|
gtk-icon-theme-name=Arc-X-D
|
||||||
gtk-menu-images=1
|
gtk-menu-images=1
|
||||||
gtk-theme-name=Adwaita-dark
|
;gtk-theme-name=Adwaita-dark
|
||||||
|
gtk-theme-name=phocus
|
||||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||||
gtk-toolbar-style=GTK_TOOLBAR_ICONS
|
gtk-toolbar-style=GTK_TOOLBAR_ICONS
|
||||||
gtk-xft-antialias=1
|
gtk-xft-antialias=1
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
[xin_1]
|
[xin_1]
|
||||||
file=/home/leon/Bilder/wallpapers/ipgK.png
|
file=/home/leon/Bilder/wallpapers/abstract-barb-wires-blur-close-up-116021.jpg
|
||||||
mode=5
|
mode=5
|
||||||
bgcolor=#000000
|
bgcolor=#000000
|
||||||
|
|
||||||
[xin_0]
|
[xin_0]
|
||||||
file=/home/leon/Bilder/wallpapers/ipgK.png
|
file=/home/leon/Bilder/wallpapers/abstract-barb-wires-blur-close-up-116021.jpg
|
||||||
mode=5
|
mode=5
|
||||||
bgcolor=#000000
|
bgcolor=#000000
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
[geometry]
|
[geometry]
|
||||||
posx=582
|
posx=20
|
||||||
posy=1439
|
posy=1130
|
||||||
sizex=992
|
sizex=1246
|
||||||
sizey=636
|
sizey=1366
|
||||||
|
|
||||||
[nitrogen]
|
[nitrogen]
|
||||||
view=icon
|
view=icon
|
||||||
|
|
|
@ -17,6 +17,8 @@ import qualified TiledDragging
|
||||||
|
|
||||||
|
|
||||||
import Data.Foldable ( for_ )
|
import Data.Foldable ( for_ )
|
||||||
|
|
||||||
|
|
||||||
import Data.Function ((&))
|
import Data.Function ((&))
|
||||||
|
|
||||||
import XMonad hiding ((|||))
|
import XMonad hiding ((|||))
|
||||||
|
@ -66,6 +68,9 @@ import qualified XMonad.Actions.Navigation2D as Nav2d
|
||||||
import qualified XMonad.Config.Desktop as Desktop
|
import qualified XMonad.Config.Desktop as Desktop
|
||||||
import qualified XMonad.Hooks.EwmhDesktops as Ewmh
|
import qualified XMonad.Hooks.EwmhDesktops as Ewmh
|
||||||
import qualified XMonad.Hooks.ManageHelpers as ManageHelpers
|
import qualified XMonad.Hooks.ManageHelpers as ManageHelpers
|
||||||
|
import XMonad.Hooks.DebugStack ( debugStackString
|
||||||
|
, debugStackFullString
|
||||||
|
)
|
||||||
import qualified XMonad.Layout.BoringWindows as BoringWindows
|
import qualified XMonad.Layout.BoringWindows as BoringWindows
|
||||||
import qualified XMonad.Layout.MultiToggle as MTog
|
import qualified XMonad.Layout.MultiToggle as MTog
|
||||||
import qualified XMonad.Layout.MultiToggle.Instances as MTog
|
import qualified XMonad.Layout.MultiToggle.Instances as MTog
|
||||||
|
@ -165,7 +170,7 @@ myLayout = avoidStruts
|
||||||
((rename "Tall" $ onlySpacing $ mouseResizableTile {draggerType = dragger})
|
((rename "Tall" $ onlySpacing $ mouseResizableTile {draggerType = dragger})
|
||||||
||| (rename "Horizon" $ onlySpacing $ mouseResizableTileMirrored {draggerType = dragger})
|
||| (rename "Horizon" $ onlySpacing $ mouseResizableTileMirrored {draggerType = dragger})
|
||||||
||| (rename "BSP" $ spacingAndGaps $ borderResize $ emptyBSP)
|
||| (rename "BSP" $ spacingAndGaps $ borderResize $ emptyBSP)
|
||||||
||| (rename "ThreeCol" $ makeTabbed $ spacingAndGaps $ ThreeCol 1 (3/100) (1/2))
|
||| (rename "ThreeCol" $ makeTabbed $ spacingAndGaps $ reflectHoriz $ ThreeColMid 1 (3/100) (1/2))
|
||||||
||| (rename "TabbedRow" $ makeTabbed $ spacingAndGaps $ zoomRow))
|
||| (rename "TabbedRow" $ makeTabbed $ spacingAndGaps $ zoomRow))
|
||||||
|
|
||||||
vertScreenLayouts =
|
vertScreenLayouts =
|
||||||
|
@ -288,7 +293,7 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program
|
||||||
, ("M-n", scratchpadSubmap)
|
, ("M-n", scratchpadSubmap)
|
||||||
, ("M-e", Rofi.promptRunCommand def specialCommands)
|
, ("M-e", Rofi.promptRunCommand def specialCommands)
|
||||||
, ("M-o", Rofi.promptRunCommand def withSelectionCommands)
|
, ("M-o", Rofi.promptRunCommand def withSelectionCommands)
|
||||||
, ("M-S-C-g", spawn "killall -INT -g giph" >> notify "gif" "saved gif in ~/Bilder/gifs") -- stop gif recording
|
, ("M-S-C-g", spawn "killall -INT -g giph") -- stop gif recording
|
||||||
|
|
||||||
--, ("M-b", launchWithBackgroundInstance (className =? "qutebrowser") "bwrap --bind / / --dev-bind /dev /dev --tmpfs /tmp --tmpfs /run qutebrowser")
|
--, ("M-b", launchWithBackgroundInstance (className =? "qutebrowser") "bwrap --bind / / --dev-bind /dev /dev --tmpfs /tmp --tmpfs /run qutebrowser")
|
||||||
, ("M-b", safeSpawnProg "qutebrowser")
|
, ("M-b", safeSpawnProg "qutebrowser")
|
||||||
|
@ -297,7 +302,8 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program
|
||||||
|
|
||||||
miscBindings :: [(String, X ())]
|
miscBindings :: [(String, X ())]
|
||||||
miscBindings =
|
miscBindings =
|
||||||
[ ("M-f", do sendMessage (MTog.Toggle MTog.FULL)
|
[ ("M-f", do withFocused (windows . W.sink)
|
||||||
|
sendMessage (MTog.Toggle MTog.FULL)
|
||||||
sendMessage ToggleStruts)
|
sendMessage ToggleStruts)
|
||||||
, ("M-C-S-w", sendMessage $ MTog.Toggle WINDOWDECORATION)
|
, ("M-C-S-w", sendMessage $ MTog.Toggle WINDOWDECORATION)
|
||||||
|
|
||||||
|
@ -408,6 +414,7 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program
|
||||||
, ("Copy to all workspaces", windows copyToAll)
|
, ("Copy to all workspaces", windows copyToAll)
|
||||||
, ("Kill all other copies", killAllOtherCopies)
|
, ("Kill all other copies", killAllOtherCopies)
|
||||||
, ("toggle polybar", sendMessage ToggleStruts >> safeSpawn "polybar-msg" ["cmd", "toggle"])
|
, ("toggle polybar", sendMessage ToggleStruts >> safeSpawn "polybar-msg" ["cmd", "toggle"])
|
||||||
|
, ("get debug data", debugStackFullString >>= (\str -> safeSpawn "xmessage" [str]))
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
85
files/scripts/resizeGif.sh
Executable file
85
files/scripts/resizeGif.sh
Executable file
|
@ -0,0 +1,85 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
calc_percentage() {
|
||||||
|
echo "$(($(("$1" / 100)) * "$2"))"
|
||||||
|
}
|
||||||
|
|
||||||
|
help() {
|
||||||
|
cat << EOT
|
||||||
|
Usage: resizeGif.sh <input-file> [OPTIONS]
|
||||||
|
|
||||||
|
you can provide --percentage or --coarse-in to decide how to resize the gif
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-p --percentage <number> size percentage to resize the image to
|
||||||
|
-c --coarse-in <x_res>x<y_res> maximum resolution to box the output image in
|
||||||
|
-o --out <filename> name of the output file
|
||||||
|
EOT
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
help
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
IN_FILE="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
while [ -n "$1" ]; do
|
||||||
|
case "$1" in
|
||||||
|
-p|--percentage)
|
||||||
|
shift
|
||||||
|
PERCENTAGE="$1"
|
||||||
|
;;
|
||||||
|
-c|--coarse-in)
|
||||||
|
shift
|
||||||
|
COARSE_IN="$1"
|
||||||
|
;;
|
||||||
|
-o|--out)
|
||||||
|
shift
|
||||||
|
OUT_FILE="$1"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
[ -n "$PERCENTAGE" ] && [ -n "$COARSE_IN" ] && {
|
||||||
|
echo "You may only provide percentage OR coarse-in"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
base_resolution=$(identify "$IN_FILE" | awk 'NR==1{print $3}')
|
||||||
|
x_res="$(echo "$base_resolution" | sed 's/\(.*\)x\(.*\)/\1/g')"
|
||||||
|
y_res="$(echo "$base_resolution" | sed 's/\(.*\)x\(.*\)/\2/g')"
|
||||||
|
|
||||||
|
|
||||||
|
if [ -n "$PERCENTAGE" ]; then
|
||||||
|
x_scaled="$(calc_percentage "$x_res" "$PERCENTAGE")"
|
||||||
|
y_scaled="$(calc_percentage "$y_res" "$PERCENTAGE")"
|
||||||
|
elif [ -n "$COARSE_IN" ]; then
|
||||||
|
arg_x="$(echo "$COARSE_IN" | sed 's/\(.*\)x\(.*\)/\1/g')"
|
||||||
|
arg_y="$(echo "$COARSE_IN" | sed 's/\(.*\)x\(.*\)/\2/g')"
|
||||||
|
x_fact="$(( $((arg_x * 100)) / x_res))"
|
||||||
|
y_fact="$(( $((arg_y * 100)) / y_res))"
|
||||||
|
if [ "$x_fact" -lt "$y_fact" ]; then
|
||||||
|
lower_fact="$x_fact"
|
||||||
|
else
|
||||||
|
lower_fact="$y_fact"
|
||||||
|
fi
|
||||||
|
|
||||||
|
x_scaled="$(calc_percentage "$x_res" "$lower_fact")"
|
||||||
|
y_scaled="$(calc_percentage "$y_res" "$lower_fact")"
|
||||||
|
else
|
||||||
|
echo "You need to give --percentage or --coarse-in."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$OUT_FILE" ]; then
|
||||||
|
OUT_FILE="smaller_${IN_FILE}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "resizing to ${x_scaled}x${y_scaled}"
|
||||||
|
|
||||||
|
convert "$IN_FILE" -coalesce -resize "${x_scaled}x${y_scaled}" -fuzz 2% +dither -layers Optimize +map "$OUT_FILE"
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
file="$HOME/Bilder/gifs/gif_$(date +%s).gif"
|
file="$HOME/Bilder/gifs/gif_$(date +%s).gif"
|
||||||
giph -s -l -c 1,1,1,0.3 -b 5 -p 5 "$file"
|
giph -s -l -y -f 10 -c 1,1,1,0.3 -b 5 -p 5 "$file"
|
||||||
echo "$file" | xclip -selection clipboard
|
echo "$file" | xclip -selection clipboard
|
||||||
|
|
Loading…
Reference in a new issue