From 664321175300a151915daab40041191602e6e620 Mon Sep 17 00:00:00 2001 From: Leon Kowarschick Date: Mon, 23 Mar 2020 11:38:19 +0100 Subject: [PATCH] asdf --- files/.surf/cookies.txt | 8 +++---- files/scripts/rofi-search.sh | 40 ++++++++++++++++++++------------- files/scripts/screenrecorder.sh | 3 ++- files/scripts/timer.sh | 3 ++- 4 files changed, 32 insertions(+), 22 deletions(-) diff --git a/files/.surf/cookies.txt b/files/.surf/cookies.txt index c9d1169..3790551 100644 --- a/files/.surf/cookies.txt +++ b/files/.surf/cookies.txt @@ -1,5 +1,5 @@ -.google.de TRUE / FALSE 2145916800 CONSENT WP.284bff None -#HttpOnly_.google.de TRUE / FALSE 1600348726 NID 200=PBixEKuZw1HwbUMVwySfOWJeCJk49OtOPP7RIzxVMiHff0s8eiic-o6qBb0-rnbHaA4G4j5NzFuKn7Cwa1bHJaq7Ugu4iDA6VyIt3Jjfz6A8ZnnR0HJgxCbqruwzBJrz-SSePPt68CC_fKuEw7zVS4rKwqzQtQzeBBujMtTKfo8 None -#HttpOnly_.google.de TRUE /verify TRUE 1600348726 SNID ACHoUkDLnHPdA-eku_E5R9QcIvV2uXQO-Eiuog5wVDqnuZh0zNnbsY7k7dofHE-TiYWbfUyI7Xlp-PChoWV2GQ Lax #HttpOnly_.google.de TRUE / TRUE 1618233527 ANID AHWqTUmxkxyFkyYgbf7RtsYZ-spR3k1IqBE3rAPOQnGeCg-soPIX1T7_2A6aOP_c None -.google.de TRUE / TRUE 1587129541 1P_JAR 2020-3-18-13 None +.google.de TRUE / FALSE 2145916800 CONSENT WP.284bff.284ebc None +.google.de TRUE / TRUE 1587549603 1P_JAR 2020-3-23-10 None +#HttpOnly_.google.de TRUE / FALSE 1600768803 NID 200=oa53M0hgKvaT-DGFdGn2ou9Fy9-qzzRdz54Mhn8QkE9YVQ5SNyPvVfW5ZNGMeN0p56gsQcMGgJSfXnidMnJJWBfkT8xsXG26s9Ivb2jQ2iAh26tZXjwlaBtRlHHTPZ2p4MGvOjBLzvAg2_mc2lCeYvMen7diKVKV40WD9bZkLU8 None +#HttpOnly_.google.de TRUE /verify TRUE 1600768803 SNID AI94zCAK4GXnNFvKws37D6OgUXnTF-A1X8UKdae44aguNeZnx9VsUydULInLayVov1aiZmtkh2Pf1W6AHrN5-w Lax diff --git a/files/scripts/rofi-search.sh b/files/scripts/rofi-search.sh index 556bafd..1b6ecb5 100755 --- a/files/scripts/rofi-search.sh +++ b/files/scripts/rofi-search.sh @@ -1,16 +1,24 @@ -#!/bin/bash -# todo combine selection with query by using first word as selection and rest as query -selection=$( echo -e "hoogle\ngoogle" | rofi -dmenu ) -if [ $selection = "hoogle" ]; then - input=$( rofi -p "search hoogle" -dmenu ) - query=$( echo $input | sed 's/ p=.*$//g' ) - package=$( echo $input | sed 's/.*p=//g' ) - [ $package = $query ] && package="" - #firefox --new-window "https://hoogle.haskell.org/?hoogle=$query&scope=package:$package" & - #surf "https://hoogle.haskell.org/?hoogle=$query&scope=package:$package" & - result=$( hoogle $query | rofi -p "select" -dmenu | sed 's/^\(.*\) :: .*$/\1/' | sed 's/\ /./g' | xargs hoogle --info ) - notify-send "hoogle" "$result" -elif [ $selection = "google" ]; then - query=$( rofi -p "search google" -dmenu ) - $BROWSER "https://google.de/search?q=$query" & -fi +#!/bin/dash +openDetailsAction() { + echo "Details:surf https://hoogle.haskell.org/?hoogle=$1&scope=package:$2" +} + +query=$( echo "h\ng" | rofi -dmenu ) +selection=$( echo "$query" | awk '{print $1}' ) +input=$( echo "$query" | awk '{print $2}' ) + +case "$selection" in + "h") + query=$( echo "$input" | sed 's/ p=.*$//g' ) + package=$( echo "$input" | sed 's/.*p=//g' ) + [ "$package" = "$query" ] && package="" + + selection=$( hoogle "$query" | rofi -p "select" -dmenu | sed 's/^\(.*\) :: .*$/\1/' | sed 's/\ /./g' ) + result=$( echo "$selection" | xargs hoogle --info ) + notify-send.sh --icon="dialog-information" --action="$(openDetailsAction "$query" "$package")" "Hoogle" "$result" + ;; + "g") + $BROWSER "https://google.de/search?q=$input" & + ;; +esac + diff --git a/files/scripts/screenrecorder.sh b/files/scripts/screenrecorder.sh index 850fde8..e2dfae9 100755 --- a/files/scripts/screenrecorder.sh +++ b/files/scripts/screenrecorder.sh @@ -1,6 +1,7 @@ +#!/bin/dash if [ -z "$1" ]; then echo "usage: screenrecorder.sh " exit 1 fi -ffmpeg -video_size 2560x1080 -framerate 25 -f x11grab -i :0.0 $1 +ffmpeg -video_size 2560x1080 -framerate 25 -f x11grab -i :0.0 "$1" diff --git a/files/scripts/timer.sh b/files/scripts/timer.sh index ac7186b..ff54a89 100755 --- a/files/scripts/timer.sh +++ b/files/scripts/timer.sh @@ -1,5 +1,6 @@ +#!/bin/dash if [ -z "$1" ]; then echo "timer.sh