1
0

a bunch of stuff

This commit is contained in:
Deven Blake 2021-01-14 10:20:52 -05:00
parent e0affcf7f3
commit a828ffa483
4 changed files with 69 additions and 14 deletions

View File

@ -1,6 +1,17 @@
# settings for specific monitors
alias 1702="xrandr --output HDMI1 --auto --mode 720x480 --right-of LVDS1"
alias mv720="xrandr --output VGA1 --auto --right-of LVDS1"
alias 1702="xrandr --output HDMI-1 --auto --mode 720x480 --right-of LVDS-1"
alias mv720="xrandr --output VGA-1 --auto --right-of LVDS-1"
# convenient music play
# tons of repeated code, should be fixed
album() {
selection="$(find /mnt/audio -type d -mindepth 2 2>/dev/null | sort | dmenu -l 50)"
[ $selection = $(echo -e "\n") ] 2>/dev/null || i3-swallow audacious "$selection"
}
song() {
selection="$(find /mnt/audio -type f | sort | dmenu -l 50)"
[ $selection = $(echo -e "\n") ] 2>/dev/null || i3-swallow audacious "$selection"
}
# audio drive
alias audio="sudo mount -L 'AUDIO' /mnt/audio"
@ -15,7 +26,7 @@ alias cls="clear"
alias firefox="firefox-developer-edition"
alias hdmioff="xrandr --output HDMI1 --off"
alias hdmioff="xrandr --output HDMI-1 --off"
# useful aliases
alias iftoggle="sudo ip link set"
@ -31,6 +42,9 @@ mnt() {
sudo mount /dev/$1 /mnt/$1 && cd /mnt/$1
}
# music player
alias mu="audacious"
# i always forget this one but it's useful
alias p="ping 1.1.1.1"
@ -53,12 +67,14 @@ pyenv() {
alias sudo="doas"
# Wacom Intuos 2
alias taboff="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput LVDS1"
alias tabon="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput VGA1"
alias taboff="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput LVDS-1"
alias tabon="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput VGA-1"
alias tracert="tracepath"
alias vgaoff="xrandr --output VGA1 --off"
alias vgaoff="xrandr --output VGA-1 --off"
alias yta="youtube-dl -f bestaudio"
# project i'm working on
ytfeed() {

View File

@ -205,9 +205,10 @@ bar {
background #ffffff
statusline #000000
separator #ff0000
focused_workspace #4c7899 #285577 #ffffff
active_workspace #333333 #5f676a #ffffff
inactive_workspace #333333 #222222 #888888
# border bg text
focused_workspace #ff0000 #ff0000 #ffffff
active_workspace #ffffff #ffffff #000000
inactive_workspace #000000 #000000 #ffffff
urgent_workspace #2f343a #900000 #ff0000
binding_mode #2f343a #900000 #ffffff
}
@ -224,10 +225,10 @@ bindsym Print exec scrot
# color customization
# class border bg text indicator child_border
client.focused #4c7899 #ffffff #ff0000 #2e9ef4 #285577
client.focused_inactive #333333 #ffffff #000000 #484e50 #5f676a
client.unfocused #333333 #000000 #ff0000 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.focused #ff0000 #ffffff #ff0000 #2e9ef4 #ff0000
client.focused_inactive #ffffff #ffffff #000000 #484e50 #000000
client.unfocused #000000 #000000 #ff0000 #292d2e #ffffff
client.urgent #900000 #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
@ -236,7 +237,7 @@ client.background #ffffff
bindsym Control+Shift+Escape exec xfce4-taskmanager
# Wallpaper
exec --no-startup-id feh --bg-center /home/trinity/Pictures/Wallpapers/Asuka\ 98.jpg
exec --no-startup-id feh --bg-center /home/trinity/Pictures/Wallpapers/akirablast.jpg
# moving workspaces
bindsym $mod+Shift+greater move container to output right

View File

@ -0,0 +1,37 @@
#!/usr/bin/python
# ABHORRENT hack. DO NOT USE IN IMPORTANT PLACES.
# probably linux-only, definitely POSIX(-like)-only
# PUBLIC DOMAIN (why would i copyright this?)
import os
import subprocess
import sys
# breaks if dmenu isn't installed
if os.system("which dmenu >/dev/null"):
print("Error: dmenu not available?", file=sys.stderr)
sys.exit(2) # 2 - missing dependency
# for me this becomes /home/trinity/apps/
app_path = os.path.expanduser("~") + "/apps/"
names = {}
namekeys = ""
if not(os.isatty(0)): file_object = sys.stdin
else: file_object = open(app_path + "names.txt")
while True:
line = file_object.readline()
if line == '': break
line = line.rstrip().split("\t")
key = line[(len(line) > 1)]
names[key] = line[0]
namekeys += key + "\\n"
if not(os.isatty(0)): file_object.close()
# get user input through dmenu
p = subprocess.Popen(("printf", namekeys), stdout=subprocess.PIPE)
output = subprocess.check_output(("dmenu"), stdin=p.stdout).strip().decode()
p.wait()
# run program
sys.exit(os.system(app_path + names[output]))

View File

@ -7,6 +7,7 @@ dvdbackup
feh
ffmpeg
firefox-developer-edition
fuse2
gnome-disk-utility
gparted
gvim