From db2082311f199e6084435525ad8292d667f6310a Mon Sep 17 00:00:00 2001 From: ccppi Date: Wed, 28 Feb 2024 11:04:05 +0100 Subject: [PATCH] init --- android/adb-root-rw.sh | 6 + android/fix/ogg-bug.txt | 3 + arduino-standalone.sh | 2 + backlight.sh | 2 + backup.sh | 6 + bitwig-studio-fix.sh | 1 + buy.sh | 13 +++ display-conf.sh | 50 +++++++++ display-extern.sh | 4 + display-intern.sh | 4 + dnote-add | Bin 0 -> 15760 bytes dnote-add.c | 26 +++++ dwm-time.service | 12 ++ dwm-time.sh | 5 + files-biggest-search.note | 2 + find-biggest-files.sh | 2 + getpubip.sh | 6 + git-self-signed.sh | 1 + hide-vm.sh | 12 ++ import-gpg-key-from-keyserver.sh | 1 + input_to_browser.py | 71 ++++++++++++ keyboard-conf-ch.sh | 2 + less-swap-more-mem.sh | 1 + lmms.workaround | 1 + notmuch-hook.sh | 9 ++ notmuch-prehook.sh | 3 + nvidida-oc.sh | 24 ++++ pulse-fix-volume.sh | 5 + pulse-fix-volume.sh.common | 187 +++++++++++++++++++++++++++++++ qrencode-display.sh | 3 + radicale-start.sh | 3 + reset-lockscreen-android.adb | 1 + resize-image.sh | 1 + shadow_tomb.sh | 7 ++ skhal.sh | 8 ++ ssh-zyxel.sh | 1 + steam-icd.sh | 2 + steam-startx.sh | 2 + syberia-scale.sh | 6 + syberia-wine-prefix.sh | 5 + syncthing-web-gui.sh | 1 + todo | 28 +++++ udev-reload.sh | 1 + vim-gaining-sudo.note | 1 + wifi-unmanage.sh | 4 + wine-gone-crazy.sh | 14 +++ wine-killer.sh | 10 ++ wine-rm-file-assosiations.sh | 8 ++ ytdl2 | 20 ++++ 49 files changed, 587 insertions(+) create mode 100644 android/adb-root-rw.sh create mode 100644 android/fix/ogg-bug.txt create mode 100755 arduino-standalone.sh create mode 100755 backlight.sh create mode 100755 backup.sh create mode 100755 bitwig-studio-fix.sh create mode 100755 buy.sh create mode 100755 display-conf.sh create mode 100755 display-extern.sh create mode 100755 display-intern.sh create mode 100755 dnote-add create mode 100644 dnote-add.c create mode 100644 dwm-time.service create mode 100755 dwm-time.sh create mode 100644 files-biggest-search.note create mode 100644 find-biggest-files.sh create mode 100755 getpubip.sh create mode 100644 git-self-signed.sh create mode 100755 hide-vm.sh create mode 100755 import-gpg-key-from-keyserver.sh create mode 100755 input_to_browser.py create mode 100644 keyboard-conf-ch.sh create mode 100644 less-swap-more-mem.sh create mode 100755 lmms.workaround create mode 100755 notmuch-hook.sh create mode 100755 notmuch-prehook.sh create mode 100644 nvidida-oc.sh create mode 100644 pulse-fix-volume.sh create mode 100644 pulse-fix-volume.sh.common create mode 100755 qrencode-display.sh create mode 100755 radicale-start.sh create mode 100755 reset-lockscreen-android.adb create mode 100755 resize-image.sh create mode 100755 shadow_tomb.sh create mode 100755 skhal.sh create mode 100755 ssh-zyxel.sh create mode 100644 steam-icd.sh create mode 100644 steam-startx.sh create mode 100755 syberia-scale.sh create mode 100644 syberia-wine-prefix.sh create mode 100755 syncthing-web-gui.sh create mode 100755 todo create mode 100644 udev-reload.sh create mode 100644 vim-gaining-sudo.note create mode 100755 wifi-unmanage.sh create mode 100755 wine-gone-crazy.sh create mode 100755 wine-killer.sh create mode 100644 wine-rm-file-assosiations.sh create mode 100755 ytdl2 diff --git a/android/adb-root-rw.sh b/android/adb-root-rw.sh new file mode 100644 index 0000000..66a3308 --- /dev/null +++ b/android/adb-root-rw.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +echo "Device must be rooted!!" +echo "login as adb shell" +echo "remount /system/ as rw" +adb shell && su && mount -o rw,remount /system diff --git a/android/fix/ogg-bug.txt b/android/fix/ogg-bug.txt new file mode 100644 index 0000000..731eeb0 --- /dev/null +++ b/android/fix/ogg-bug.txt @@ -0,0 +1,3 @@ +echo "tl;dr /vendor/etc/audio_policy_configuration.xml, remove or comment out the part about AUDIO_FORMAT_VORBIS." + + diff --git a/arduino-standalone.sh b/arduino-standalone.sh new file mode 100755 index 0000000..2ca5cfd --- /dev/null +++ b/arduino-standalone.sh @@ -0,0 +1,2 @@ +#!/bin/bash +xinit /usr/bin/arduino $* -- :1 diff --git a/backlight.sh b/backlight.sh new file mode 100755 index 0000000..359732c --- /dev/null +++ b/backlight.sh @@ -0,0 +1,2 @@ +echo 416 | sudo tee /sys/class/backlight/intel_backlight/brightness + diff --git a/backup.sh b/backup.sh new file mode 100755 index 0000000..4801e5a --- /dev/null +++ b/backup.sh @@ -0,0 +1,6 @@ +#!/bin/sh +#Doing adata backup to server-ccppi +Source="/home/ccppi2" +Destination="ccppi@192.168.1.3:/home/backup/by-Device/ccppi-nb/" + +rsync -rtsv "$Source" "$Destination" diff --git a/bitwig-studio-fix.sh b/bitwig-studio-fix.sh new file mode 100755 index 0000000..5bf0659 --- /dev/null +++ b/bitwig-studio-fix.sh @@ -0,0 +1 @@ +LD_LIBRARY_PATH=/usr/lib/jvm/java-8-openjdk/jre/lib/amd64/server /usr/bin/bitwig-studio diff --git a/buy.sh b/buy.sh new file mode 100755 index 0000000..709b10b --- /dev/null +++ b/buy.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +tutti="https://www.tutti.ch/de/li/ganze-schweiz?q=" +ricardo="https://www.ricardo.ch/de/s/" +toppreis="https://www.toppreise.ch/produktsuche?q=" + +broswer='/usr/bin/firefox --new-window' +cmd='$broswer "$ricardo$1" &' +eval "$cmd" +cmd='$broswer "$tutti$1" &' +eval "$cmd" +cmd='$broswer "$toppreis$1" &' +eval "$cmd" diff --git a/display-conf.sh b/display-conf.sh new file mode 100755 index 0000000..bc32b05 --- /dev/null +++ b/display-conf.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +intern="eDP-1-1" +extern="HDMI-1-1" + +reset_displays(){ +xrandr --output $intern --off +xrandr --output $extern --off + +} + +set_all(){ + reset_displays + xrandr --output $intern --auto + xrandr --output $extern --left-of $intern --auto +} + +set_intern(){ + reset_displays + xrandr --output $intern --auto + xrandr --output $extern --off +} + +set_extern(){ + reset_displays + xrandr --output $intern --off + xrandr --output $extern --auto +} +tog=0 + +if [ "$1" == "-a" ] +then + set_all +elif [ "$1" == "-i" ] +then + set_intern +elif [ "$1" == "-e" ] +then + set_extern +elif [ "$1" == "-t" ] +then + + if [ "$tog" lt "2" ]; then tog=$((tog+1)) ;fi + if [ "$tog" gt "2"]; then tog=0 ;fi + if [ "$tog" == "0" ]; then set_all ;fi + if [ "$tog" == "1" ]; then set_intern ;fi + if [ "$tog" == "2" ]; then set_extern;fi +else + echo $'display-conf [ARGUMENT] \n Arguments: \n -i : intern \n -e : extern \n -a: all' +fi diff --git a/display-extern.sh b/display-extern.sh new file mode 100755 index 0000000..7d8f408 --- /dev/null +++ b/display-extern.sh @@ -0,0 +1,4 @@ +xrandr --output eDP-1-1 --off +xrandr --output HDMI-1-1 --auto + + diff --git a/display-intern.sh b/display-intern.sh new file mode 100755 index 0000000..06067c4 --- /dev/null +++ b/display-intern.sh @@ -0,0 +1,4 @@ +xrandr --output HDMI-1-1 --off +xrandr --output eDP-1-1 --auto + + diff --git a/dnote-add b/dnote-add new file mode 100755 index 0000000000000000000000000000000000000000..e54ad8cab0c25d977192daecdf666a33cc575ecf GIT binary patch literal 15760 zcmb<-^>JfjWMqH=W(GS35O0A1M8p9?F$kDJ84L^z4h$9yybKNuatyKzYzzzxEMPH+ zJWM@|zQF_$htV7mE(0@Ep9F}(z`%e`%Rtq^XpoygLLeGsABc?&e_)4*!e|DlKS26e zK~hjYOdLipg}M_)!^A=Q!1gJCG&3+TpwWMz!Y~?HA1G`N=t2}6utlXip!O|*(lC7> zE=b=6sJ;tOeK7h1$UzJY3@{oNo**}ZumvzGz-V-R6;OTXvhG!|V%y>WhJfBRZ`DGMs^d0Y-!D00{*?ElB}|3y4h&hDCD_)IMDC z-~bA6Q2K?^(BNgz&&fJfb%RQd=wZOKoSfL3?T9J&_s|CP!UY3mVtpm2vZnr z9yE$jWTSDYPrxBwhC|#Bhqw<8aW@>|vPfAH*`Yc(#QPZ-7?h9|LfM5l%nxN?U=U=G zWC(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ui61 z^fy2=9E=9d8Nu{|XjuG#*dTnFfq{V!ng>99SU(1~{|{X~j1QylGcYjlBk70rb520_ zW5U#d%m!f?A4Y@PQ=qg3EjHloRM>t_*uG6@vV`YQ0|RI! zD9BzIhS>|Ff1>G!^^;ye^#{N-LTQ*j7|p~8+T#V +#include +#include +int main() +{ + char note[32]; + char cmd[42]; + char c; + printf("a -add \n v -view\n"); +system("/bin/stty raw");//remove enter + c = getc(stdin); +system("/bin/stty cooked"); +if (c == 'a') +{ + fgets(note,32,stdin); + printf("you wrote: %s", note); + snprintf(cmd,sizeof(cmd),"dnote add %s",note); +} +if (c == 'v') +{ + snprintf(cmd,sizeof(cmd),"dnote view"); +} + system(cmd); + +return 0; +} diff --git a/dwm-time.service b/dwm-time.service new file mode 100644 index 0000000..1569cb5 --- /dev/null +++ b/dwm-time.service @@ -0,0 +1,12 @@ +[Unit] +Description=Show time in dwm dmenu bar + +[Service] + +#WorkingDirectory= +ExecStart=/home/ccppi/.scripts/dwm-time.sh +Restart=always + +[Install] +WantedBy=multi-user.target + diff --git a/dwm-time.sh b/dwm-time.sh new file mode 100755 index 0000000..887e8df --- /dev/null +++ b/dwm-time.sh @@ -0,0 +1,5 @@ +while true; do + xsetroot -name "$(date)" + sleep 2 + done + diff --git a/files-biggest-search.note b/files-biggest-search.note new file mode 100644 index 0000000..f809c6d --- /dev/null +++ b/files-biggest-search.note @@ -0,0 +1,2 @@ + du -a . | sort -n -r | head -n 20 + diff --git a/find-biggest-files.sh b/find-biggest-files.sh new file mode 100644 index 0000000..551fdd4 --- /dev/null +++ b/find-biggest-files.sh @@ -0,0 +1,2 @@ +sudo find / -xdev -type f -size +100M + diff --git a/getpubip.sh b/getpubip.sh new file mode 100755 index 0000000..5831ed1 --- /dev/null +++ b/getpubip.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +IP="`wget -q -O - http://ipecho.net/plain`" +echo $IP +whois $IP | grep country: | cut -d ' ' -f9,10 + diff --git a/git-self-signed.sh b/git-self-signed.sh new file mode 100644 index 0000000..0347137 --- /dev/null +++ b/git-self-signed.sh @@ -0,0 +1 @@ +export GIT_SSL_NO_VERIFY=true diff --git a/hide-vm.sh b/hide-vm.sh new file mode 100755 index 0000000..d46e330 --- /dev/null +++ b/hide-vm.sh @@ -0,0 +1,12 @@ +dmidecode -t0 +dmidecode -t1 + +VBoxManage setextradata "inspiron" VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVendor "American Megatrends Inc." +VBoxManage setextradata "inspiron" VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVersion "1.05.14" +VBoxManage setextradata "inspiron" VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseDate "03/31/2016" +VBoxManage setextradata "inspiron" VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor "Notebook" +VBoxManage setextradata "inspiron" VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct "W65_W67RB" +VBoxManage setextradata "inspiron" VBoxInternal/Devices/pcbios/0/Config/DmiSystemVersion "Not Applicable" +VBoxManage setextradata "inspiron" VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial "Not Applicable" +VBoxManage setextradata "inspiron" VBoxInternal/Devices/pcbios/0/Config/DmiSystemFamily "Not Applicable" +VBoxManage setextradata "inspiron" VBoxInternal/Devices/pcbios/0/Config/DmiSystemUuid "2e5bfa80-56c3-0000-0000-000000000000" diff --git a/import-gpg-key-from-keyserver.sh b/import-gpg-key-from-keyserver.sh new file mode 100755 index 0000000..ca42d4e --- /dev/null +++ b/import-gpg-key-from-keyserver.sh @@ -0,0 +1 @@ +gpg --keyserver keyserver.ubuntu.com --recv-key diff --git a/input_to_browser.py b/input_to_browser.py new file mode 100755 index 0000000..d2679ca --- /dev/null +++ b/input_to_browser.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# Based on: +# https://docs.python.org/3/library/email-examples.html + +import sys +import os +import tempfile +import mimetypes +import webbrowser +from email import policy +from email.parser import BytesParser + + +raw = sys.stdin.buffer.read() + +if not os.isatty(0): + fd = os.open('/dev/tty', os.O_RDONLY) + if fd < 0: + sys.stderr.write('Unable to open an input tty.\n') + sys.exit(-1) + else: + os.dup2(fd, 0) + os.close(fd) + +msg = BytesParser(policy=policy.default).parsebytes(raw) + +# We can extract the richest alternative in order to display it: +richest = msg.get_body() +partfiles = {} +if richest['content-type'].maintype == 'text': + if richest['content-type'].subtype == 'plain': + for line in richest.get_content().splitlines(): + print(line) + sys.exit() + elif richest['content-type'].subtype == 'html': + body = richest + else: + print("Don't know how to display {}".format(richest.get_content_type())) + sys.exit() +elif richest['content-type'].content_type == 'multipart/related': + body = richest.get_body(preferencelist=('html')) + for part in richest.iter_attachments(): + fn = part.get_filename() + if fn: + extension = os.path.splitext(part.get_filename())[1] + else: + extension = mimetypes.guess_extension(part.get_content_type()) + with tempfile.NamedTemporaryFile(suffix=extension, delete=False) as f: + f.write(part.get_content()) + # again strip the <> to go from email form of cid to html form. + partfiles[part['content-id'][1:-1]] = f.name +else: + print("Don't know how to display {}".format(richest.get_content_type())) + sys.exit() +with tempfile.NamedTemporaryFile(mode='w', delete=False) as f: + # The magic_html_parser has to rewrite the href="cid:...." attributes to + # point to the filenames in partfiles. It also has to do a safety-sanitize + # of the html. It could be written using html.parser. + template = """ + + + {} + + """ + f.write(template.format(body.get_content())) +webbrowser.open(f.name) +# os.remove(f.name) +for fn in partfiles.values(): + os.remove(fn) diff --git a/keyboard-conf-ch.sh b/keyboard-conf-ch.sh new file mode 100644 index 0000000..4455de8 --- /dev/null +++ b/keyboard-conf-ch.sh @@ -0,0 +1,2 @@ +localectl set-x11-keymap ch,de pc105 +sudo localectl set-keymap de_CH-latin1 diff --git a/less-swap-more-mem.sh b/less-swap-more-mem.sh new file mode 100644 index 0000000..fa60a06 --- /dev/null +++ b/less-swap-more-mem.sh @@ -0,0 +1 @@ +sudo sysctl -w vm.swappiness=10 diff --git a/lmms.workaround b/lmms.workaround new file mode 100755 index 0000000..e884f35 --- /dev/null +++ b/lmms.workaround @@ -0,0 +1 @@ +LD_PRELOAD=/usr/lib/libKF5WidgetsAddons.so lmms diff --git a/notmuch-hook.sh b/notmuch-hook.sh new file mode 100755 index 0000000..1f923a5 --- /dev/null +++ b/notmuch-hook.sh @@ -0,0 +1,9 @@ + +#!/bin/sh +notmuch new +# retag all "new" messages "inbox" and "unread" +notmuch tag +inbox +unread -new -- tag:new +# tag all messages from "me" as sent and remove tags inbox and unread +notmuch tag -new -inbox +sent -- from:me@example.org or from:me@myself.com +# tag newsletters, but dont show them in inbox +notmuch tag +newsletters +unread -new -- from:newsletter@example.org or subject:'newsletter*' diff --git a/notmuch-prehook.sh b/notmuch-prehook.sh new file mode 100755 index 0000000..c3b4b81 --- /dev/null +++ b/notmuch-prehook.sh @@ -0,0 +1,3 @@ +notmuch search --output=files --format=text0 tag:killed | xargs -r0 rm + notmuch new + diff --git a/nvidida-oc.sh b/nvidida-oc.sh new file mode 100644 index 0000000..3ba4b75 --- /dev/null +++ b/nvidida-oc.sh @@ -0,0 +1,24 @@ + +echo gameing > /tmp/fanmode + +sudo nvidia-smi -pl 187 #powerlimit to max limited by driver + +sudo nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUTargetFanSpeed=75" + +sudo nvidia-settings -a "[gpu:0]/GPUGraphicsClockOffset[3]=120" + +#sudo nvidia-settings -a '[gpu:0]/GPUGraphicsMemoryOffset=225' #maybe depreacet +sudo nvidia-settings -a '[gpu:0]/GPUMemoryTransferRateOffset[3]=200' + + +# working oc settings +# Core +125 +# +130 SOMETIMES CRASHES +# +# Memory +200 ok with custom fan +# +225 ok with fan speed 63% 2800 rpm +# +# +# +#Hints +# nvtop diff --git a/pulse-fix-volume.sh b/pulse-fix-volume.sh new file mode 100644 index 0000000..26b0d1b --- /dev/null +++ b/pulse-fix-volume.sh @@ -0,0 +1,5 @@ +#!/bin/bash +#workaround for pulseaudio with overwrites /usr/ directorys while updating, in combination with usb-soundcards +#with are much to loud +sudo cp ./pulse-fix-volume.sh.common /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common +pulseaudio -k diff --git a/pulse-fix-volume.sh.common b/pulse-fix-volume.sh.common new file mode 100644 index 0000000..b495adc --- /dev/null +++ b/pulse-fix-volume.sh.common @@ -0,0 +1,187 @@ +# This file is part of PulseAudio. +# +# PulseAudio is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the +# License, or (at your option) any later version. +# +# PulseAudio is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with PulseAudio; if not, see . + +; Common part of all paths + +; So here's generally how mixer paths are used by PA: PA goes through +; a mixer path file from top to bottom and checks if a mixer element +; described therein exists. If so it is added to the list of mixer +; elements PA will control, keeping the order it read them in. If a +; mixer element described here has set the required= or +; required-absent= directives a path might not be accepted as valid +; and is ignored in its entirety (see below). However usually if a +; element listed here is missing this one element is ignored but not +; the entire path. +; +; When a device shall be muted/unmuted *all* elements listed in a path +; file with "switch = mute" will be toggled. +; +; When a device shall change its volume, PA will got through the list +; of all elements with "volume = merge" and set the volume on the +; first element. If that element does not support dB volumes, this is +; where the story ends. If it does support dB volumes, PA divides the +; requested volume by the volume that was set on this element, and +; then go on to the next element with "volume = merge" and then set +; that there, and so on. That way the first volume element in the +; path will be the one that does the 'biggest' part of the overall +; volume adjustment, with the remaining elements usually being set to +; some value next to 0dB. This logic makes sure we get the full range +; over all volume sliders and a very high granularity of volumes +; already in hardware. +; +; All switches and enumerations set to "select" are exposed via the +; "port" functionality of sinks/sources. Basically every possible +; switch setting and every possible enumeration setting will be +; combined and made into a "port". So make sure you don't list too +; many switches/enums for exposing, because the number of ports might +; rise exponentially. +; +; Only one path can be selected at a time. All paths that are valid +; for an audio device will be exposed as "port" for the sink/source. + + +; [General] +; type = ... # The device type. It's highly recommended to set a type for every path. +; # See parse_type() in alsa-mixer.c for supported values. +; priority = ... # Priority for this path +; description-key = ... # The path description is looked up from a table in path_verify() in +; # src/modules/alsa/alsa-mixer.c. By default the path name (i.e. the file name +; # minus the ".conf" suffix) is used as the lookup key, but if this option is +; # set, then the given string is used as the key instead. In any case the +; # "description" option can be used to override the path description. +; description = ... # Description for this path. Overrides the normal description lookup logic, as +; # described in the "description-key" documentation above. +; mute-during-activation = yes | no # If this path supports hardware mute, should the hw mute be used while activating this +; # path? In some cases this can reduce extra noises during port switching, while in other +; # cases this can increase such noises. Default: no. +; eld-device = ... # If this is an HDMI port, set to "auto" so that PulseAudio will try to read +; # the monitor ELD information from the ALSA mixer. By default the ELD information +; # is not read, because it's only applicable with HDMI. Earlier the "auto" option +; # didn't exist, and the hw device index had to be manually configured. For +; # backwards compatibility, it's still possible to manually configure the device +; # index using this option. +; +; [Properties] # Property list for this path. The list is merged into the port property list. +; = # Each property is defined on its own line. +; ... +; +; [Option ...:...] # For each option of an enumeration or switch element +; # that shall be exposed as a sink/source port. Needs to +; # be named after the Element, followed by a colon, followed +; # by the option name, resp. on/off if the element is a switch. +; name = ... # Logical name to use in the path identifier +; priority = ... # Priority if this is made into a device port +; required = ignore | enumeration | any # In this element, this option must exist or the path will be invalid. ("any" is an alias for "enumeration".) +; required-any = ignore | enumeration | any # In this element, either this or another option must exist (or an element) +; required-absent = ignore | enumeration | any # In this element, this option must not exist or the path will be invalid +; +; [Element ...] # For each element that we shall control. The "..." here is the element name, +; # or name and index separated by a comma. +; required = ignore | switch | volume | enumeration | any # If set, require this element to be of this kind and available, +; # otherwise don't consider this path valid for the card +; required-any = ignore | switch | volume | enumeration | any # If set, at least one of the elements or jacks with required-any in this +; # path must be present, otherwise this path is invalid for the card +; required-absent = ignore | switch | volume # If set, require this element to not be of this kind and not +; # available, otherwise don't consider this path valid for the card +; +; switch = ignore | mute | off | on | select # What to do with this switch: ignore it, make it follow mute status, +; # always set it to off, always to on, or make it selectable as port. +; # If set to 'select' you need to define an Option section for on +; # and off +; volume = ignore | merge | off | zero | # What to do with this volume: ignore it, merge it into the device +; # volume slider, always set it to the lowest value possible, or always +; # set it to 0 dB (for whatever that means), or always set it to +; # (this only makes sense in path configurations where +; # the exact hardware and driver are known beforehand). +; volume-limit = # Limit the maximum volume by disabling the volume steps above . +; enumeration = ignore | select # What to do with this enumeration, ignore it or make it selectable +; # via device ports. If set to 'select' you need to define an Option section +; # for each of the items you want to expose +; direction = playback | capture # Is this relevant only for playback or capture? If not set this will implicitly be +; # set the direction of the PCM device is opened as. Generally this doesn't need to be set +; # unless you have a broken driver that has playback controls marked for capture or vice +; # versa +; direction-try-other = no | yes # If the element does not supported what is requested, try the other direction, too? +; +; override-map.1 = ... # Override the channel mask of the mixer control if the control only exposes a single channel +; override-map.2 = ... # Override the channel masks of the mixer control if the control only exposes two channels +; # Override maps should list for each element channel which high-level channels it controls via a +; # channel mask. A channel mask may either be the name of a single channel, or the words "all-left", +; # "all-right", "all-center", "all-front", "all-rear", and "all" to encode a specific subset of +; # channels in a mask +; [Jack ...] # For each jack that we will use for jack detection +; # The name 'Jack Foo' must match ALSA's 'Foo Jack' control. +; required = ignore | any # If not set to ignore, make the path invalid if this jack control is not present. +; required-absent = ignore | any # If not set to ignore, make the path invalid if this jack control is present. +; required-any = ignore | any # If not set to ignore, make the path invalid if no jack controls and no elements with +; # the required-any are present. +; state.plugged = yes | no | unknown # Normally a plugged jack would mean the port becomes available, and an unplugged means it's +; state.unplugged = yes | no | unknown # unavailable, but the port status can be overridden by specifying state.plugged and/or state.unplugged. +; append-pcm-to-name = no | yes # Add ",pcm=N" to the jack name? N is the hw PCM device index. HDMI jacks have +; # the PCM device index in their name, but different drivers use different +; # numbering schemes, so we can't hardcode the full jack name in our configuration +; # files. + +[Element PCM] +switch = mute +volume = ignore +volume-limit = 0.007 +override-map.1 = all +override-map.2 = all-left,all-right + +[Element External Amplifier] +switch = select + +[Option External Amplifier:on] +name = output-amplifier-on +priority = 10 + +[Option External Amplifier:off] +name = output-amplifier-off +priority = 0 + +[Element Bass Boost] +switch = select + +[Option Bass Boost:on] +name = output-bass-boost-on +priority = 0 + +[Option Bass Boost:off] +name = output-bass-boost-off +priority = 10 + +[Element IEC958] +switch = off + +[Element IEC958 Optical Raw] +switch = off + +;;; 'Analog Output' + +[Element Analog Output] +enumeration = select + +[Option Analog Output:Speakers] +name = output-speaker +priority = 10 + +[Option Analog Output:Headphones] +name = output-headphones +priority = 9 + +[Option Analog Output:FP Headphones] +name = output-headphones +priority = 8 diff --git a/qrencode-display.sh b/qrencode-display.sh new file mode 100755 index 0000000..9297102 --- /dev/null +++ b/qrencode-display.sh @@ -0,0 +1,3 @@ +echo $1 +qrencode -t ansiutf8 "$1" + diff --git a/radicale-start.sh b/radicale-start.sh new file mode 100755 index 0000000..bfd89ed --- /dev/null +++ b/radicale-start.sh @@ -0,0 +1,3 @@ +python3 -m radicale --config "~/.config/radicale/config" + + diff --git a/reset-lockscreen-android.adb b/reset-lockscreen-android.adb new file mode 100755 index 0000000..c1e50b8 --- /dev/null +++ b/reset-lockscreen-android.adb @@ -0,0 +1 @@ +adb shell rm /data/system/locksettings.db diff --git a/resize-image.sh b/resize-image.sh new file mode 100755 index 0000000..6875478 --- /dev/null +++ b/resize-image.sh @@ -0,0 +1 @@ +convert -resize 50% $1 $1.resized diff --git a/shadow_tomb.sh b/shadow_tomb.sh new file mode 100755 index 0000000..dc41f03 --- /dev/null +++ b/shadow_tomb.sh @@ -0,0 +1,7 @@ +#bluetoothctl && + +.scripts/nvidia-oc.sh +cd "/mnt/Game-ssd/SteamLibrary/steamapps/common/Shadow of the Tomb Raider" +./bin/ShadowOfTheTombRaider + + diff --git a/skhal.sh b/skhal.sh new file mode 100755 index 0000000..cefd96c --- /dev/null +++ b/skhal.sh @@ -0,0 +1,8 @@ +echo "starting vdirsyncer sync" +vdirsyncer sync + +echo "starting khal/ikhal" +ikhal + +echo "starting vdirsyncer sync" +vdirsyncer sync diff --git a/ssh-zyxel.sh b/ssh-zyxel.sh new file mode 100755 index 0000000..6cb1467 --- /dev/null +++ b/ssh-zyxel.sh @@ -0,0 +1 @@ +ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -c 3des-cbc admin@192.168.1.1 diff --git a/steam-icd.sh b/steam-icd.sh new file mode 100644 index 0000000..a288f3b --- /dev/null +++ b/steam-icd.sh @@ -0,0 +1,2 @@ +export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/nvidia_icd.json" + diff --git a/steam-startx.sh b/steam-startx.sh new file mode 100644 index 0000000..0ab02ed --- /dev/null +++ b/steam-startx.sh @@ -0,0 +1,2 @@ +startx /usr/bin/steamos-session -- :3 +# when stutering video libva-vdpau-driver and lib32-vdpau diff --git a/syberia-scale.sh b/syberia-scale.sh new file mode 100755 index 0000000..d925e92 --- /dev/null +++ b/syberia-scale.sh @@ -0,0 +1,6 @@ +if [ "$1" == "zoom_in" ]; then +nvidia-settings --assign CurrentMetaMode="HDMI-0: 1360x768_60 +0+0 { ViewPortIn=800x600 }" +fi +if [ "$1" == "zoom_out" ]; then +nvidia-settings --assign CurrentMetaMode="HDMI-0: 1360x768_60 +0+0 { ViewPortIn=1360x768 }" +fi diff --git a/syberia-wine-prefix.sh b/syberia-wine-prefix.sh new file mode 100644 index 0000000..4ebb206 --- /dev/null +++ b/syberia-wine-prefix.sh @@ -0,0 +1,5 @@ + +cd /home/ccppi/Downloads/dgvoodo/Syberia/ +WINEPREFIX=~/.local/share/Steam/steamapps/compatdata/46500/pfx wine dgVoodooCpl.exe + +#DXVK_HUD=devinfo,fps,gpuload,memory DXVK_FRAME_RATE=60 WINEDLLOVERRIDES="D3D9.dll=n;D3D8.dll=n;D3DImm.dll=n;DDraw.dll=n" %command% diff --git a/syncthing-web-gui.sh b/syncthing-web-gui.sh new file mode 100755 index 0000000..3abfb8b --- /dev/null +++ b/syncthing-web-gui.sh @@ -0,0 +1 @@ + ssh -L 9090:127.0.0.1:8384 alarm@192.168.1.4 -p9541 diff --git a/todo b/todo new file mode 100755 index 0000000..17d7415 --- /dev/null +++ b/todo @@ -0,0 +1,28 @@ +#!/bin/sh +# +# Write/remove a task to do later. +# +# Select an existing entry to remove it from the file, or type a new entry to +# add it. +# + +file="$HOME/.todo" +touch "$file" +height=$(wc -l "$file" | awk '{print $1}') +prompt="Add/delete a task: " + +cmd=$(dmenu -l "$height" -p "$prompt" "$@" < "$file") +while [ -n "$cmd" ]; do + if grep -q "^$cmd\$" "$file"; then + grep -v "^$cmd\$" "$file" > "$file.$$" + mv "$file.$$" "$file" + height=$(( height - 1 )) + else + echo "$cmd" >> "$file" + height=$(( height + 1 )) + fi + + cmd=$(dmenu -l "$height" -p "$prompt" "$@" < "$file") +done + +exit 0 diff --git a/udev-reload.sh b/udev-reload.sh new file mode 100644 index 0000000..688ba0c --- /dev/null +++ b/udev-reload.sh @@ -0,0 +1 @@ +udevadm control --reload-rules && udevadm trigger diff --git a/vim-gaining-sudo.note b/vim-gaining-sudo.note new file mode 100644 index 0000000..52763c8 --- /dev/null +++ b/vim-gaining-sudo.note @@ -0,0 +1 @@ +:w !sudo tee % diff --git a/wifi-unmanage.sh b/wifi-unmanage.sh new file mode 100755 index 0000000..d1c2536 --- /dev/null +++ b/wifi-unmanage.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +sudo nmcli radio wifi off +sudo rfkill unblock wlan diff --git a/wine-gone-crazy.sh b/wine-gone-crazy.sh new file mode 100755 index 0000000..3ad2168 --- /dev/null +++ b/wine-gone-crazy.sh @@ -0,0 +1,14 @@ +#export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.i686.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json + +path=/usr/share/vulkan/icd.d/ +echo "https://gitlab.freedesktop.org/mesa/mesa/-/issues/4112" +echo "remove tha strange shit" +sudo rm $path/intel_icd.i686.json.disabled +sudo rm $path/intel_icd.x86_64.json.disabled + + +sudo mv $path/intel_icd.i686.json $path/intel_icd.i686.json.disabled +sudo mv $path/intel_icd.x86_64.json $path/intel_icd.x86_64.json.disabled +#sudo mv $path/nvidia_icd.json $path/nvidia_icd.json.disabled + +echo " it doesnt work? look in /usr/share/vulkan/icd.d/" diff --git a/wine-killer.sh b/wine-killer.sh new file mode 100755 index 0000000..3286b20 --- /dev/null +++ b/wine-killer.sh @@ -0,0 +1,10 @@ +killall -9 wineserver +killall -9 winemenubuilder +killall -9 winedevice.exe +killall -9 winedevice.exe +killall -9 winedbg +killall -9 wine +killall -9 wineboot.exe +echo "Running wine-fuckers" +ps -e | grep wine + diff --git a/wine-rm-file-assosiations.sh b/wine-rm-file-assosiations.sh new file mode 100644 index 0000000..f8adaf1 --- /dev/null +++ b/wine-rm-file-assosiations.sh @@ -0,0 +1,8 @@ +rm -f ~/.local/share/applications/wine-extension*.desktop +rm -f ~/.local/share/icons/hicolor/*/*/application-x-wine-extension* +rm -f ~/.local/share/applications/mimeinfo.cache +rm -f ~/.local/share/mime/packages/x-wine* +rm -f ~/.local/share/mime/application/x-wine-extension* +rm -f ~/.local/share/applications/wine/wine-extension* +update-desktop-database ~/.local/share/applications +update-mime-database ~/.local/share/mime/ diff --git a/ytdl2 b/ytdl2 new file mode 100755 index 0000000..f0a5128 --- /dev/null +++ b/ytdl2 @@ -0,0 +1,20 @@ +#dependencies +#kdialog youtube-dl + +folder=$(date +"%m_%Y") + +cd ~/Music/ + + +mkdir $folder +cd $folder + + +url=$(kdialog --title "Input dialog" --inputbox "Paste youtube link") + + +echo "eingegebener link: " $url +youtube-dl -i --extract-audio --audio-format vorbis -o "%(title)s.%(ext)s" $url + +kdialog --title "the link "$url" has finished" --passivepopup \ +"Download and conversion finnished" 10