Add udev rules

Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
Severin Kaderli 2019-01-21 21:59:01 +01:00
parent 89b38bdb70
commit 2a6d463ddf
Signed by: severinkaderli
GPG key ID: F419F8835B72F0C4
6 changed files with 26 additions and 5 deletions

View file

@ -17,7 +17,7 @@ The installation is pretty straightforward using a couple of installation script
The list of my used arch packages are found inside the files in `packages`. The files are numbered in the order they are installed, so packages inside `packages.list` are installed first and then packages in `packages2.list` are installed.
The main content of this repository can be found in the `system` folder. It
contains all configurations files, directories and script that are get symlinked
contains all configurations files, directories and scripts that mostly get symlinked
by my install script.
### `.config/dconf`
@ -57,7 +57,13 @@ This file contains my [compton](https://github.com/chjj/compton) configuration.
This file contains my QT4 configuration.
### `bin`
This folder contains a bunch of scripts that I use. Some of them are used by Polybar or i3 and others are used directly and some like `utils.sh` contain functions that I use in other scripts.
This folder contains a bunch of scripts that I use. Some of them are used by
Polybar or i3 and others are used directly and some like `utils.sh` contain
functions that I use in other scripts.
### `udev`
This folder contains my custom udev rules. They are moved to
`/etc/udev/rules.d/` by my installation script.
### `.aliases`
This file contains my aliases that I use on a regular basis. I also use it to replace some standard commands wiht alternatives, like using `exa` instead of `ls`.

View file

@ -117,3 +117,10 @@ for service in "${SYSTEMD_SERVICES[@]}"
do
enable_service "${service}"
done
print_header "Copy custom udev rules"
for file in $SYSTEM_DIR/udev/rules.d/*.rules
do
copy_udev_rule "${file}"
done
sudo udevadm control --reload-rules

View file

@ -16,7 +16,7 @@ opacity-rule = [ "85:class_g = 'Termite'" ];
# Performance improvements
unredir-if-possible = true;
backend = "glx";
glx-no-stencil = false;
glx-no-stencil = true;
glx-copy-from-front = false;
glx-swap-method = "undefined";
refresh-rate = 0;

View file

@ -196,10 +196,10 @@ scroll-down = light -U 5
type = internal/network
interface = wlp3s0
format-connected = %{A1:wicd-client -n &:}<ramp-signal> <label-connected>%{A}
format-connected = <ramp-signal> <label-connected>
label-connected = %essid%
format-disconnected = %{A1:wicd-client -n &:}<label-disconnected>%{A}
format-disconnected = <label-disconnected>
label-disconnected = Disconnected
ramp-signal-0 = 

View file

@ -96,3 +96,10 @@ function enable_service() {
print_log "Enabling service ${YELLOW}${1}${RESET}"
sudo systemctl enable "${1}"
}
# Function to copy a udev rule to /etc/udev/rules.d/
# USAGE: copy_udev_rules FILE
function copy_udev_rule() {
print_log "Copying ${YELLOW}$(basename "${1}")${RESET} to ${YELLOW}/etc/udev/rules.d/${RESET}"
sudo cp "${1}" "/etc/udev/rules.d/"
}

View file

@ -0,0 +1 @@
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", MODE="0666"