From 598c60045ac0c0ee262552dd06408e097374c1af Mon Sep 17 00:00:00 2001
From: itdominator <1itdominator@gmail.com>
Date: Sat, 2 Oct 2021 19:31:13 -0500
Subject: [PATCH] Added 2 scripts; 1 notes
---
.../Fix GamepadJoystick on Linux ifyoo.sh | 38 +++++++++++
src/Fixes/IFYOO Controller/fixcontroller.py | 11 ++++
...et-and-Install-1001-free-fonts-on-linux.sh | 48 ++++++++++++++
...get-list-of-emoji-icons-for-linux-shell.sh | 66 +++++++++++++++++++
4 files changed, 163 insertions(+)
create mode 100644 src/Fixes/IFYOO Controller/Fix GamepadJoystick on Linux ifyoo.sh
create mode 100755 src/Fixes/IFYOO Controller/fixcontroller.py
create mode 100644 src/Shell/get-and-Install-1001-free-fonts-on-linux.sh
create mode 100644 src/Shell/get-list-of-emoji-icons-for-linux-shell.sh
diff --git a/src/Fixes/IFYOO Controller/Fix GamepadJoystick on Linux ifyoo.sh b/src/Fixes/IFYOO Controller/Fix GamepadJoystick on Linux ifyoo.sh
new file mode 100644
index 0000000..0caca5e
--- /dev/null
+++ b/src/Fixes/IFYOO Controller/Fix GamepadJoystick on Linux ifyoo.sh
@@ -0,0 +1,38 @@
+#fix gamepad/joystick
+#ifyoo - /dev/input/by-id/usb-SHANWAN_Controller-event-joystick
+
+#install needed python libs
+# sudo apt install python3-usb
+# OR
+# python -m pip install pyusb==1.2.1
+
+#get fix script
+#https://gist.github.com/dnmodder/de2df973323b7c6acf45f40dc66e8db3
+wget "https://gist.githubusercontent.com/dnmodder/de2df973323b7c6acf45f40dc66e8db3/raw/693b848098dfc5f0fd03bdcdd9162fde3f2fb482/fixcontroller.py"
+
+chmod +x fixcontroller.py
+
+#you will need to run this every time you plug the controller in
+sudo ./fixcontroller.py
+
+#test the controller
+sudo cat /dev/input/js0
+
+
+
+
+
+###############################3
+
+#!/usr/bin/env python3
+
+import usb.core
+
+dev = usb.core.find(idVendor=0x045e, idProduct=0x028e)
+
+if dev is None:
+ raise ValueError('Device not found')
+else:
+ dev.ctrl_transfer(0xc1, 0x01, 0x0100, 0x00, 0x14)
+
+##############################3
\ No newline at end of file
diff --git a/src/Fixes/IFYOO Controller/fixcontroller.py b/src/Fixes/IFYOO Controller/fixcontroller.py
new file mode 100755
index 0000000..11a1e3c
--- /dev/null
+++ b/src/Fixes/IFYOO Controller/fixcontroller.py
@@ -0,0 +1,11 @@
+#!/usr/bin/env python3
+
+import usb.core
+
+dev = usb.core.find(idVendor=0x045e, idProduct=0x028e)
+
+if dev is None:
+ raise ValueError('Device not found')
+else:
+ dev.ctrl_transfer(0xc1, 0x01, 0x0100, 0x00, 0x14)
+
diff --git a/src/Shell/get-and-Install-1001-free-fonts-on-linux.sh b/src/Shell/get-and-Install-1001-free-fonts-on-linux.sh
new file mode 100644
index 0000000..69b90a0
--- /dev/null
+++ b/src/Shell/get-and-Install-1001-free-fonts-on-linux.sh
@@ -0,0 +1,48 @@
+# !/bin/bash
+# #####################################################################
+# Copyright (C) 2018 Kris Occhipinti
+# https://filmsbykris.com
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 General Public License
+# along with this program. If not, see .
+# #####################################################################
+
+domain="https://www.1001freefonts.com"
+pagenum="100"
+
+for i in `seq 1 $pagenum`;
+ do
+ wget -q "$domain/new-fonts-$i.php" -O-|\
+ grep DOWNLOAD|\
+ cut -d\' -f2|\
+ sort -u|while read u;
+ do
+ wget -c "$domain$u"
+ done
+done
+
+#unzip files
+for z in *.zip;
+do
+ unzip -o "$z";
+done
+
+#move fonts to fonts folder
+mkdir -p $HOME/.local/share/fonts
+find -iname "*.ttf" -o -iname "*.otf"|while read f
+do
+ mv "$f" $HOME/.local/share/fonts
+done
+
+#update fonts to system
+fc-cache -f -v
diff --git a/src/Shell/get-list-of-emoji-icons-for-linux-shell.sh b/src/Shell/get-list-of-emoji-icons-for-linux-shell.sh
new file mode 100644
index 0000000..1f0f97c
--- /dev/null
+++ b/src/Shell/get-list-of-emoji-icons-for-linux-shell.sh
@@ -0,0 +1,66 @@
+# !/bin/bash
+# #####################################################################
+# Copyright (C) 2019 Kris Occhipinti
+# https://filmsbykris.com
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, o
+# (at your option) any later version.
+#
+# This program 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 General Public License
+# along with this program. If not, see .
+# #####################################################################
+
+output="$HOME/.files/emojis.lst"
+
+function main() {
+ if [ "$1" = "update" ]; then
+ getlist
+ elif [ "$1" = "menu" ]; then
+ menu
+ else
+ xfce4-terminal -e 'bash -c "/usr/local/bin/emojis menu"'
+ fi
+}
+
+function menu(){
+ # Give fzf list of all unicode characters to copy.
+ # Shows the selected character in dunst if running.
+
+ fzf="$HOME/.fzf/bin/fzf"
+ #e="$(grep -v "#" "$output" | dmenu -i -l 20 -fn Monospace-18 | awk '{print $1}' | tr -d '\n'|fzf)"
+ #e="$(grep -v "#" "$output" |awk '{for (i=2; i/dev/null && notify-send "$e copied to clipboard."
+}
+
+function getlist() {
+ mkdir -p "$HOME/.files"
+ wget -qO- "https://en.wikipedia.org/wiki/Emoji"|\
+ tr "\n" " "|\
+ sed 's/ |