Browse Source

Add wifi and iface i3block, add network.sh, moved touchscreen.sh

master
Riyyi 6 years ago
parent
commit
ebce1698eb
  1. 8
      .config/i3/blocks
  2. 2
      .config/i3/config
  3. 2
      .config/zsh/.zshrc
  4. 29
      .scripts/network.sh
  5. 0
      .scripts/touchscreen.sh
  6. 2
      .scripts/wm/volume.sh
  7. 4
      README.md
  8. 4
      etc/netctl/eth0-dhcp

8
.config/i3/blocks

@ -49,22 +49,18 @@ signal=2
# If the instance is not specified, use the interface used for default route. # If the instance is not specified, use the interface used for default route.
# The address can be forced to IPv4 or IPv6 with -4 or -6 switches. # The address can be forced to IPv4 or IPv6 with -4 or -6 switches.
[wifi] [wifi]
label= command=$HOME/.scripts/wm/wifi.sh
#instance=wlp3s0 #instance=wlp3s0
interval=10 interval=10
separator=true separator=true
[iface] [iface]
label= command=$HOME/.scripts/wm/iface.sh
#instance=wlan0 #instance=wlan0
#color=#00FF00 #color=#00FF00
interval=10 interval=10
separator=true separator=true
#[bandwidth]
#instance=eth0
#interval=5
# Battery indicator # Battery indicator
# #
# The battery instance defaults to 0. # The battery instance defaults to 0.

2
.config/i3/config

@ -204,7 +204,7 @@ bindsym --release Print exec scrot -e "mv \$f $HOME/Pictures/screen_captures/"
bindsym --release Shift+Print exec scrot -s -e "mv \$f $HOME/Pictures/screen_captures/" # Selection bindsym --release Shift+Print exec scrot -s -e "mv \$f $HOME/Pictures/screen_captures/" # Selection
bindsym --release $mod+Print exec scrot -u -e "mv \$f $HOME/Pictures/screen_captures/" # Focused window bindsym --release $mod+Print exec scrot -u -e "mv \$f $HOME/Pictures/screen_captures/" # Focused window
# Touchscreen toggle # Touchscreen toggle
bindsym $mod+F7 exec $HOME/.scripts/wm/touchscreen.sh bindsym $mod+F7 exec $HOME/.scripts/touchscreen.sh
# Window rules # Window rules
smart_gaps on smart_gaps on

2
.config/zsh/.zshrc

@ -89,7 +89,7 @@ alias gl="git log --graph --abbrev-commit --decorate --format=format:'%C(bold bl
# Laptop # Laptop
alias offtouchpad='sudo rmmod i2c_hid' alias offtouchpad='sudo rmmod i2c_hid'
alias ontouchpad='sudo modprobe i2c_hid' alias ontouchpad='sudo modprobe i2c_hid'
alias homenetwork='sudo netctl start wlan0-merlin-router5GHz' alias nw="$HOME/.scripts/network.sh"
# Other # Other
source $ZDOTDIR/.zshrc_extended source $ZDOTDIR/.zshrc_extended

29
.scripts/network.sh

@ -0,0 +1,29 @@
#!/bin/sh
WIRELESS="wlan0"
WIRED="eth0"
PROFILE="eth0-dhcp"
if [ -z "$1" ] || [ -z "$2" ]; then
exit;
fi
# Enable/disable wireless
if [ "$1" = "w" ] || [ "$1" = "$WIRELESS" ]; then
if [ "$2" = "1" ]; then
sudo ip link set $WIRELESS up
else
sudo ip link set $WIRELESS down
fi
fi
# Enable/disable wired
if [ "$1" = "e" ] || [ "$1" = "$WIRED" ]; then
sudo netctl stop $PROFILE
sudo ip link set $WIRED down
if [ "$2" = "1" ]; then
sudo netctl start $PROFILE
fi
fi

0
.scripts/wm/touchscreen.sh → .scripts/touchscreen.sh

2
.scripts/wm/volume.sh

@ -8,7 +8,7 @@ STEP="5%"
case $BLOCK_BUTTON in case $BLOCK_BUTTON in
1) pavucontrol ;; # left click, start sound settings 1) pavucontrol ;; # left click, start sound settings
2) amixer -q -D $MIXER sset $INSTANCE 0 unmute ;; # scroll click, set 0 2) amixer -q -D $MIXER sset $INSTANCE 0 unmute ;; # scroll click, set 0
3) amixer -q -D $MIXER sset $INSTANCE toggle ;; # right click, mute/unmute 3) amixer -q -D $MIXER sset $INSTANCE toggle ;; # right click, mute/unmute
4) amixer -q -D $MIXER sset $INSTANCE ${STEP}+ unmute ;; # scroll up, increase 4) amixer -q -D $MIXER sset $INSTANCE ${STEP}+ unmute ;; # scroll up, increase
5) amixer -q -D $MIXER sset $INSTANCE ${STEP}- unmute ;; # scroll down, decrease 5) amixer -q -D $MIXER sset $INSTANCE ${STEP}- unmute ;; # scroll down, decrease
esac esac

4
README.md

@ -160,3 +160,7 @@ Mail gpg:
gpg --decrypt <backup.pgp> | gpg --import gpg --decrypt <backup.pgp> | gpg --import
gpg --search-keys <email address> gpg --search-keys <email address>
Network:
systemctl enable netctl-auto@wlan0.service

4
etc/netctl/eth0-dhcp

@ -0,0 +1,4 @@
Description='A basic dhcp ethernet connection'
Interface=eth0
Connection=ethernet
IP=dhcp
Loading…
Cancel
Save