mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-25 05:42:22 +00:00
asdf
This commit is contained in:
parent
1dd4b8fb4c
commit
b15cab8fd3
6 changed files with 55 additions and 135 deletions
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"optOut": false,
|
"optOut": false,
|
||||||
"lastUpdateCheck": 1589975089407
|
"lastUpdateCheck": 1590267793605
|
||||||
}
|
}
|
|
@ -1,8 +0,0 @@
|
||||||
.google.de TRUE / FALSE 2145916800 CONSENT WP.284bff.284ebc.28523f None
|
|
||||||
#HttpOnly_.google.de TRUE / FALSE 1601308700 NID 201=2f4m3yF905yxXJMWdugEIcX-6Xz5lfBM9inDXDUn9x-pRGmC8Wj_LH2-aJ2z-MC5iqSIygHso2ro_MXuRw4If4hfe0XJtITPp2oXXYEP8kd5_oXKoCVharylNWN-9VDW4NIVOhTiaBLJJkHYigbuvgmxUFaDWyoqJ_EYut711fE None
|
|
||||||
#HttpOnly_.google.de TRUE /verify TRUE 1601308700 SNID AI94zCAK1A3JzGA0bmpDwBJjpW02d6NyKM7uPz5BX1zV8zldCUJ9nZsltUXn9Qfh3X3RKTiq1qWUwe3C-H5IhQ Lax
|
|
||||||
#HttpOnly_.google.de TRUE / TRUE 1618233527 ANID AHWqTUkyeLYe1zHGOTFnTI8bLsAhCDbNKjZjNS7xmbSUo1S8xfEHWo04CbiulJlu None
|
|
||||||
#HttpOnly_.google.de TRUE /complete/search FALSE 1601049580 CGIC Ij90ZXh0L2h0bWwsYXBwbGljYXRpb24veGh0bWwreG1sLGFwcGxpY2F0aW9uL3htbDtxPTAuOSwqLyo7cT0wLjg None
|
|
||||||
#HttpOnly_.google.de TRUE /search FALSE 1601049580 CGIC Ij90ZXh0L2h0bWwsYXBwbGljYXRpb24veGh0bWwreG1sLGFwcGxpY2F0aW9uL3htbDtxPTAuOSwqLyo7cT0wLjg None
|
|
||||||
.google.de TRUE / FALSE 1588089581 OGPC 19016257-1: None
|
|
||||||
.google.de TRUE / TRUE 1588089672 1P_JAR 2020-03-29-16 None
|
|
|
@ -1,120 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
// ==UserScript==
|
|
||||||
// @name vimkeybindings
|
|
||||||
// @namespace renevier.fdn.fr
|
|
||||||
// @author arno <arenevier@fdn.fr>
|
|
||||||
// @licence GPL/LGPL/MPL
|
|
||||||
// @description use vim keybingings (i, j, k, l, …) to navigate a web page.
|
|
||||||
// ==/UserScript==
|
|
||||||
|
|
||||||
/*
|
|
||||||
* If you're a vim addict, and you always find yourself typing j or k in a web
|
|
||||||
* page, then wondering why it just does not go up and down like any good
|
|
||||||
* software, that user script is what you have been looking for.
|
|
||||||
*/
|
|
||||||
|
|
||||||
function up() {
|
|
||||||
if (window.scrollByLines)
|
|
||||||
window.scrollByLines(-1); // gecko
|
|
||||||
else
|
|
||||||
window.scrollBy(0, -12); // webkit
|
|
||||||
}
|
|
||||||
|
|
||||||
function down() {
|
|
||||||
if (window.scrollByLines)
|
|
||||||
window.scrollByLines(1); // gecko
|
|
||||||
else
|
|
||||||
window.scrollBy(0, 12); // webkit
|
|
||||||
}
|
|
||||||
|
|
||||||
function pageup() {
|
|
||||||
if (window.scrollByPages)
|
|
||||||
window.scrollByPages(-1); // gecko
|
|
||||||
else
|
|
||||||
window.scrollBy(0, 0 - _pageScroll()); // webkit
|
|
||||||
}
|
|
||||||
|
|
||||||
function pagedown() {
|
|
||||||
if (window.scrollByPages)
|
|
||||||
window.scrollByPages(1); // gecko
|
|
||||||
else
|
|
||||||
window.scrollBy(0, _pageScroll()); // webkit
|
|
||||||
}
|
|
||||||
|
|
||||||
function right() {
|
|
||||||
window.scrollBy(15, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
function left() {
|
|
||||||
window.scrollBy(-15, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
function home() {
|
|
||||||
window.scroll(0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
function bottom() {
|
|
||||||
window.scroll(document.width, document.height);
|
|
||||||
}
|
|
||||||
|
|
||||||
// If you don't like default key bindings, customize here.
|
|
||||||
// if you want to use the combination 'Ctrl + b' (for example), use '^b'
|
|
||||||
var bindings = {
|
|
||||||
'h' : left,
|
|
||||||
'l' : right,
|
|
||||||
'k' : up,
|
|
||||||
'j' : down,
|
|
||||||
'g' : home,
|
|
||||||
'G' : bottom,
|
|
||||||
//'^b': pageup,
|
|
||||||
//'^f': pagedown,
|
|
||||||
}
|
|
||||||
|
|
||||||
function isEditable(element) {
|
|
||||||
|
|
||||||
if (element.nodeName.toLowerCase() == "textarea")
|
|
||||||
return true;
|
|
||||||
|
|
||||||
// we don't get keypress events for text input, but I don't known
|
|
||||||
// if it's a bug, so let's test that
|
|
||||||
if (element.nodeName.toLowerCase() == "input" && element.type == "text")
|
|
||||||
return true;
|
|
||||||
|
|
||||||
// element is editable
|
|
||||||
if (document.designMode == "on" || element.contentEditable == "true") {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function keypress(evt) {
|
|
||||||
var target = evt.target;
|
|
||||||
|
|
||||||
// if we're on a editable element, we probably don't want to catch
|
|
||||||
// keypress, we just want to write the typed character.
|
|
||||||
if (isEditable(target))
|
|
||||||
return;
|
|
||||||
|
|
||||||
var key = String.fromCharCode(evt.charCode);
|
|
||||||
if (evt.ctrlKey) {
|
|
||||||
key = '^' + key;
|
|
||||||
}
|
|
||||||
|
|
||||||
var fun = bindings[key];
|
|
||||||
if (fun)
|
|
||||||
fun();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function _pageScroll() {
|
|
||||||
// Gecko algorithm
|
|
||||||
// ----------------
|
|
||||||
// The page increment is the size of the page, minus the smaller of
|
|
||||||
// 10% of the size or 2 lines.
|
|
||||||
return window.innerHeight - Math.min(window.innerHeight / 10, 24);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener("keypress", keypress, false);
|
|
||||||
|
|
Binary file not shown.
|
@ -98,10 +98,10 @@ scratchpads =
|
||||||
[ NS "terminal" "termite --class sp_term" (className =? "sp_term") (customFloating $ W.RationalRect 0.66 0.7 0.34 0.3)
|
[ NS "terminal" "termite --class sp_term" (className =? "sp_term") (customFloating $ W.RationalRect 0.66 0.7 0.34 0.3)
|
||||||
, NS "spotify" "spotify" (appName =? "spotify") defaultFloating
|
, NS "spotify" "spotify" (appName =? "spotify") defaultFloating
|
||||||
, NS "discord" "discord" (appName =? "discord") defaultFloating
|
, NS "discord" "discord" (appName =? "discord") defaultFloating
|
||||||
, NS "whatsapp" "whatsapp-nativefier" (("WhatsApp" `isSuffixOf`) <$> title) defaultFloating
|
, NS "whatsapp" launchWhatsapp (("WhatsApp" `isSuffixOf`) <$> title) defaultFloating
|
||||||
, NS "slack" "slack" (("Slack | " `isPrefixOf`) <$> title) defaultFloating
|
, NS "slack" "slack" (("Slack | " `isPrefixOf`) <$> title) defaultFloating
|
||||||
]
|
]
|
||||||
--launchWhatsapp = "gtk-launch chrome-hnpfjngllnobngcgfapefoaidbinmjnm-Default.desktop"
|
launchWhatsapp = "gtk-launch chrome-hnpfjngllnobngcgfapefoaidbinmjnm-Default.desktop"
|
||||||
|
|
||||||
|
|
||||||
-- Colors ------ {{{
|
-- Colors ------ {{{
|
||||||
|
@ -191,8 +191,8 @@ myStartupHook = do
|
||||||
spawnOnce "picom --config ~/.config/picom.conf" --no-fading-openclose"
|
spawnOnce "picom --config ~/.config/picom.conf" --no-fading-openclose"
|
||||||
spawn "/home/leon/.config/polybar/launch.sh"
|
spawn "/home/leon/.config/polybar/launch.sh"
|
||||||
spawnOnce "nitrogen --restore"
|
spawnOnce "nitrogen --restore"
|
||||||
|
spawnOnce "mailnag"
|
||||||
|
for_ ["led1", "led2"] $ \led -> safeSpawn "sudo" ["liquidctl", "set", led, "color", "fixed", "00ffff"]
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- Keymap --------------------------------------- {{{
|
-- Keymap --------------------------------------- {{{
|
||||||
|
@ -242,8 +242,9 @@ myKeys =
|
||||||
, ("M-f", do sendMessage $ MTog.Toggle MTog.FULL
|
, ("M-f", do sendMessage $ MTog.Toggle MTog.FULL
|
||||||
sendMessage ToggleStruts)
|
sendMessage ToggleStruts)
|
||||||
|
|
||||||
, ("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-S-<Return>", launchWithBackgroundInstance (className =? "Alacritty") "alacritty")
|
, ("M-b", safeSpawnProg "qutebrowser")
|
||||||
|
, ("M-S-<Return>", launchWithBackgroundInstance (className =? "Alacritty") "alacritty")
|
||||||
|
|
||||||
, ("M-S-C-c", kill1)
|
, ("M-S-C-c", kill1)
|
||||||
, ("M-S-C-q", io exitSuccess)
|
, ("M-S-C-q", io exitSuccess)
|
||||||
|
|
47
files/scripts/casefandeamon.py
Executable file
47
files/scripts/casefandeamon.py
Executable file
|
@ -0,0 +1,47 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
import re
|
||||||
|
import time
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
fans=["fan2", "fan3"]
|
||||||
|
default_fan_speed = 30
|
||||||
|
|
||||||
|
|
||||||
|
def run_fan_check():
|
||||||
|
fan_speed = default_fan_speed
|
||||||
|
sensors_out = subprocess.check_output(['sensors'])
|
||||||
|
sensors_out = sensors_out.decode('UTF-8').splitlines()
|
||||||
|
tdie_temp = [x for x in sensors_out if x.startswith("Tdie")]
|
||||||
|
|
||||||
|
if len(tdie_temp) > 0:
|
||||||
|
temp = tdie_temp[0]
|
||||||
|
temp = float(re.findall(r"^Tdie:\s*\+(.*?)°C.+", temp)[0])
|
||||||
|
if temp < 50:
|
||||||
|
fan_speed = 0
|
||||||
|
elif temp < 60:
|
||||||
|
fan_speed = 10
|
||||||
|
elif temp < 70:
|
||||||
|
fan_speed = 20
|
||||||
|
elif temp < 75:
|
||||||
|
fan_speed = 30
|
||||||
|
elif temp < 80:
|
||||||
|
fan_speed = 50
|
||||||
|
elif temp < 85:
|
||||||
|
fan_speed = 100
|
||||||
|
|
||||||
|
print("applying fan curve to " + str(fan_speed) + "%, temp is " + str(temp))
|
||||||
|
for fan in fans:
|
||||||
|
subprocess.run(["liquidctl", "set", fan, "speed", str(fan_speed)])
|
||||||
|
|
||||||
|
|
||||||
|
while True:
|
||||||
|
try:
|
||||||
|
run_fan_check()
|
||||||
|
except:
|
||||||
|
print("There was a problem while running the fan curve")
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
|
|
||||||
|
# cm-rgb-cli
|
||||||
|
|
||||||
|
# run as casefan.service (systemctl enable casefan)
|
Loading…
Reference in a new issue