scripts

scripts to make my pc work
Index Commits Files Refs
commit 5bfdf664ad98c14043ef6cbd4aa9ea9ed896ad04
Author: klewer-martin <mk@inspiron.localdomain>
Date:   Sun, 17 Jan 2021 00:24:16 -0300

Added simple scripts that I had on my laptop;

Diffstat:
Adisablebluetooth | 3+++
Adisablemouseaccel | 3+++
Aemojisupport | 49+++++++++++++++++++++++++++++++++++++++++++++++++
Aenablebluetooth | 3+++
Alaunchhtop | 3+++
Alockscreen | 5+++++
Apactlraisevolume | 8++++++++
Asetlockscreenbg | 8++++++++
Axrandrbrightnessup | 1+
9 files changed, 83 insertions(+), 0 deletions(-)
diff --git a/disablebluetooth b/disablebluetooth
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+systemctl stop bluetooth
diff --git a/disablemouseaccel b/disablemouseaccel
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+xinput --set-prop 10 'libinput Accel Profile Enabled' 0, 1
diff --git a/emojisupport b/emojisupport
@@ -0,0 +1,49 @@
+#!/bin/sh
+set -e
+if [[ $(id -u) -ne 0 ]] ; then echo "Please run as root" ; exit 1 ; fi
+echo "Setting up Noto Emoji font..."
+# 1 - install  noto-fonts-emoji package
+pacman -S noto-fonts-emoji --needed
+# pacman -S powerline-fonts --needed
+echo "Recommended system font: inconsolata regular (ttf-inconsolata or powerline-fonts)"
+# 2 - add font config to /etc/fonts/conf.d/01-notosans.conf
+echo "<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+ <alias>
+   <family>sans-serif</family>
+   <prefer>
+     <family>Noto Sans</family>
+     <family>Noto Color Emoji</family>
+     <family>Noto Emoji</family>
+     <family>DejaVu Sans</family>
+   </prefer> 
+ </alias>
+
+ <alias>
+   <family>serif</family>
+   <prefer>
+     <family>Noto Serif</family>
+     <family>Noto Color Emoji</family>
+     <family>Noto Emoji</family>
+     <family>DejaVu Serif</family>
+   </prefer>
+ </alias>
+
+ <alias>
+  <family>monospace</family>
+  <prefer>
+    <family>Noto Mono</family>
+    <family>Noto Color Emoji</family>
+    <family>Noto Emoji</family>
+    <family>DejaVu Sans Mono</family>
+   </prefer>
+ </alias>
+</fontconfig>
+
+" > /etc/fonts/local.conf
+# 3 - update font cache via fc-cache
+fc-cache
+echo "Noto Emoji Font installed! You may need to restart applications like chrome. If chrome displays no symbols or no letters, your default font contains emojis."
+echo "consider inconsolata regular"
+
diff --git a/enablebluetooth b/enablebluetooth
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+systemctl start bluetooth.service
diff --git a/launchhtop b/launchhtop
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+terminator -e htop
diff --git a/lockscreen b/lockscreen
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+#i3lock --color=000000
+
+betterlockscreen -l dim
diff --git a/pactlraisevolume b/pactlraisevolume
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+AMOUNT_TO_INCREASE=$1
+
+CURRENT_VOLUME=$(pamixer --get-volume)
+MAX_VOLUME=$((100 - $AMOUNT_TO_INCREASE))
+
+(($CURRENT_VOLUME<=$MAX_VOLUME)) && $(pactl set-sink-volume @DEFAULT_SINK@ +$AMOUNT_TO_INCREASE%)
diff --git a/setlockscreenbg b/setlockscreenbg
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+BACKGROUND_PATH=$(cat /home/mk/.config/nitrogen/bg-saved.cfg \
+                    | grep file | cut -c6-)
+
+echo $BACKGROUND_PATH
+
+betterlockscreen -u $BACKGROUND_PATH
diff --git a/xrandrbrightnessup b/xrandrbrightnessup
@@ -0,0 +1 @@
+xrandr --output eDP-1 --brightness 1.0