diff --git a/files/.config/configstore/update-notifier-npm.json b/files/.config/configstore/update-notifier-npm.json index 57e9f7e..4e476ef 100644 --- a/files/.config/configstore/update-notifier-npm.json +++ b/files/.config/configstore/update-notifier-npm.json @@ -1,4 +1,4 @@ { "optOut": false, - "lastUpdateCheck": 1590756983935 + "lastUpdateCheck": 1590849135770 } \ No newline at end of file diff --git a/files/.config/gtk-3.0/settings.ini b/files/.config/gtk-3.0/settings.ini index 8875d91..b88c279 100644 --- a/files/.config/gtk-3.0/settings.ini +++ b/files/.config/gtk-3.0/settings.ini @@ -7,7 +7,8 @@ gtk-enable-input-feedback-sounds=0 gtk-font-name=Sans 9 gtk-icon-theme-name=Arc-X-D 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-style=GTK_TOOLBAR_ICONS gtk-xft-antialias=1 diff --git a/files/.config/nitrogen/bg-saved.cfg b/files/.config/nitrogen/bg-saved.cfg index 14fc9b8..ac38ef2 100644 --- a/files/.config/nitrogen/bg-saved.cfg +++ b/files/.config/nitrogen/bg-saved.cfg @@ -1,9 +1,9 @@ [xin_1] -file=/home/leon/Bilder/wallpapers/ipgK.png +file=/home/leon/Bilder/wallpapers/abstract-barb-wires-blur-close-up-116021.jpg mode=5 bgcolor=#000000 [xin_0] -file=/home/leon/Bilder/wallpapers/ipgK.png +file=/home/leon/Bilder/wallpapers/abstract-barb-wires-blur-close-up-116021.jpg mode=5 bgcolor=#000000 diff --git a/files/.config/nitrogen/nitrogen.cfg b/files/.config/nitrogen/nitrogen.cfg index b9b9f35..285120a 100644 --- a/files/.config/nitrogen/nitrogen.cfg +++ b/files/.config/nitrogen/nitrogen.cfg @@ -1,8 +1,8 @@ [geometry] -posx=582 -posy=1439 -sizex=992 -sizey=636 +posx=20 +posy=1130 +sizex=1246 +sizey=1366 [nitrogen] view=icon diff --git a/files/.xmonad/lib/Config.hs b/files/.xmonad/lib/Config.hs index 0e3579b..25f3e15 100644 --- a/files/.xmonad/lib/Config.hs +++ b/files/.xmonad/lib/Config.hs @@ -17,6 +17,8 @@ import qualified TiledDragging import Data.Foldable ( for_ ) + + import Data.Function ((&)) import XMonad hiding ((|||)) @@ -66,6 +68,9 @@ import qualified XMonad.Actions.Navigation2D as Nav2d import qualified XMonad.Config.Desktop as Desktop import qualified XMonad.Hooks.EwmhDesktops as Ewmh import qualified XMonad.Hooks.ManageHelpers as ManageHelpers +import XMonad.Hooks.DebugStack ( debugStackString + , debugStackFullString + ) import qualified XMonad.Layout.BoringWindows as BoringWindows import qualified XMonad.Layout.MultiToggle as MTog import qualified XMonad.Layout.MultiToggle.Instances as MTog @@ -165,7 +170,7 @@ myLayout = avoidStruts ((rename "Tall" $ onlySpacing $ mouseResizableTile {draggerType = dragger}) ||| (rename "Horizon" $ onlySpacing $ mouseResizableTileMirrored {draggerType = dragger}) ||| (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)) vertScreenLayouts = @@ -238,11 +243,11 @@ removedKeys = ["M-", "M-S-c", "M-S-q", "M-h", "M-l", "M-j", "M-k", "M-S-> multiMonitorOperation W.view 1) @@ -288,7 +293,7 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program , ("M-n", scratchpadSubmap) , ("M-e", Rofi.promptRunCommand def specialCommands) , ("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", safeSpawnProg "qutebrowser") @@ -297,7 +302,8 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program miscBindings :: [(String, X ())] miscBindings = - [ ("M-f", do sendMessage (MTog.Toggle MTog.FULL) + [ ("M-f", do withFocused (windows . W.sink) + sendMessage (MTog.Toggle MTog.FULL) sendMessage ToggleStruts) , ("M-C-S-w", sendMessage $ MTog.Toggle WINDOWDECORATION) @@ -316,13 +322,13 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program ] workspaceBindings :: [(String, X ())] - workspaceBindings = - if useSharedWorkspaces - then [] - else concat $ + workspaceBindings = + if useSharedWorkspaces + then [] + else concat $ [ [ ("M-" ++ show wspNum, runActionOnWorkspace W.view wspNum) , ("M-S-" ++ show wspNum, runActionOnWorkspace W.shift wspNum) - , ("M-C-" ++ show wspNum, runActionOnWorkspace copy wspNum) + , ("M-C-" ++ show wspNum, runActionOnWorkspace copy wspNum) ] | wspNum <- [1..9 :: Int] ] @@ -374,14 +380,14 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program swapScreenContents :: W.StackSet i l a sid sd -> W.StackSet i l a sid sd - swapScreenContents ws = if null (W.visible ws) then ws else - let + swapScreenContents ws = if null (W.visible ws) then ws else + let otherScreen = head $ W.visible ws otherWsp = W.workspace otherScreen currentScreen = W.current ws currentWsp = W.workspace currentScreen - in - ws + in + ws { W.current = currentScreen { W.workspace = otherWsp { W.tag = W.tag currentWsp } } , W.visible = (otherScreen { W.workspace = currentWsp { W.tag = W.tag otherWsp } } : (tail $ W.visible ws)) } @@ -408,6 +414,7 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program , ("Copy to all workspaces", windows copyToAll) , ("Kill all other copies", killAllOtherCopies) , ("toggle polybar", sendMessage ToggleStruts >> safeSpawn "polybar-msg" ["cmd", "toggle"]) + , ("get debug data", debugStackFullString >>= (\str -> safeSpawn "xmessage" [str])) ] diff --git a/files/scripts/resizeGif.sh b/files/scripts/resizeGif.sh new file mode 100755 index 0000000..33af7df --- /dev/null +++ b/files/scripts/resizeGif.sh @@ -0,0 +1,85 @@ +#!/bin/sh + +calc_percentage() { + echo "$(($(("$1" / 100)) * "$2"))" +} + +help() { + cat << EOT +Usage: resizeGif.sh [OPTIONS] + +you can provide --percentage or --coarse-in to decide how to resize the gif + +Options: + -p --percentage size percentage to resize the image to + -c --coarse-in x maximum resolution to box the output image in + -o --out 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" diff --git a/files/scripts/screengif.sh b/files/scripts/screengif.sh index 4b4f723..8b605f3 100755 --- a/files/scripts/screengif.sh +++ b/files/scripts/screengif.sh @@ -1,5 +1,5 @@ #!/bin/bash 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