mirror of
https://github.com/Mastermindzh/dotfiles.git
synced 2024-11-23 07:14:30 +01:00
initial upload
This commit is contained in:
parent
d10093616b
commit
0a76bdc648
225
config
Normal file
225
config
Normal file
@ -0,0 +1,225 @@
|
||||
# i3 config file (v4)
|
||||
#
|
||||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
# Set the mod key to the "Windows key" and the floating modifier to the mod key.
|
||||
set $mod Mod4
|
||||
floating_modifier $mod
|
||||
|
||||
############################################
|
||||
# Constants #
|
||||
############################################
|
||||
|
||||
set $urgentTextColour #101218
|
||||
set $primaryBackgroundColour #1f222d
|
||||
set $secondaryBackgroundColour #252936
|
||||
set $textColour #7780a1
|
||||
|
||||
set $statusLineColour #d1d4e0
|
||||
set $focusedTextColour #ffffff
|
||||
set $urgentBackground #ee829f
|
||||
set $indicatorColour #fcc09e
|
||||
|
||||
set $workspace1 "1: "
|
||||
set $workspace2 "2: "
|
||||
set $workspace3 "3: "
|
||||
set $workspace4 "4: "
|
||||
set $workspace5 "5: "
|
||||
set $workspace6 "6: "
|
||||
set $workspace7 "7: "
|
||||
set $workspace8 "8: "
|
||||
set $workspace9 "9: "
|
||||
set $workspace10 "10: "
|
||||
set $workspace11 " Enpass"
|
||||
|
||||
############################################
|
||||
# i3 management keys #
|
||||
############################################
|
||||
# use the interactive tool xev to find the keycode
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# change focus
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+h split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+shift+s layout stacking
|
||||
bindsym $mod+shift+w layout tabbed
|
||||
bindsym $mod+shift+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
|
||||
# exit i3 (logs you out of your X session)
|
||||
bindsym $mod+Shift+Escape exec "i3-nagbar -t warning -m 'Do you really want to exit i3?' -b 'Yes, exit i3' 'i3-msg exit'"
|
||||
bindsym $mod+Shift+Delete exec "i3-nagbar -t alert -m 'Do you really want to shut down?' -b 'Yes, Shutdown' 'shutdown -h now'"
|
||||
|
||||
# focus on the parent window
|
||||
bindsym $mod+shift+p focus parent
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
# These bindings trigger as soon as you enter the resize mode
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Lock the computer
|
||||
bindsym $mod+l exec /bin/bash ~/.config/i3/scripts/i3lock.sh
|
||||
|
||||
############################################
|
||||
# Application Keys #
|
||||
############################################
|
||||
bindsym $mod+Return exec xfce4-terminal # terminal
|
||||
bindsym $mod+w exec chromium # Webbrowser
|
||||
bindsym $mod+e exec nautilus # File manager
|
||||
bindsym Print exec gnome-screenshot # Fullscreen screenshot
|
||||
bindsym $mod+Print exec /bin/bash ~/.config/i3/scripts/screenshot.sh # Show screenshot window
|
||||
bindsym $mod+shift+b exec /bin/bash ~/.config/i3/scripts/brightness.sh
|
||||
|
||||
# Rofi
|
||||
bindsym $mod+d exec "rofi -color-window '#273238, #273238, #1e2529' -color-normal '#273238, #c1c1c1, #273238, #394249, #ffffff' -color-active '#273238, #80cbc4, #273238, #394249, #80cbc4' -color-urgent '#273238, #ff1844, #273238, #394249, #ff1844' -lines 10 -line-padding 5 -show run"
|
||||
bindsym $mod+Tab exec "rofi -color-window '#273238, #273238, #1e2529' -color-normal '#273238, #c1c1c1, #273238, #394249, #ffffff' -color-active '#273238, #80cbc4, #273238, #394249, #80cbc4' -color-urgent '#273238, #ff1844, #273238, #394249, #ff1844' -lines 10 -line-padding 5 -show"
|
||||
|
||||
############################################
|
||||
# Media keys #
|
||||
############################################
|
||||
# Pulse Audio controls
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
|
||||
|
||||
# Sreen brightness controls
|
||||
bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
|
||||
bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness
|
||||
|
||||
# Media player controls
|
||||
bindsym XF86AudioPlay exec playerctl play
|
||||
bindsym XF86AudioPause exec playerctl pause
|
||||
bindsym XF86AudioNext exec playerctl next
|
||||
bindsym XF86AudioPrev exec playerctl previous
|
||||
|
||||
############################################
|
||||
# Workspaces #
|
||||
############################################
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace $workspace1
|
||||
bindsym $mod+2 workspace $workspace2
|
||||
bindsym $mod+3 workspace $workspace3
|
||||
bindsym $mod+4 workspace $workspace4
|
||||
bindsym $mod+5 workspace $workspace5
|
||||
bindsym $mod+6 workspace $workspace6
|
||||
bindsym $mod+7 workspace $workspace7
|
||||
bindsym $mod+8 workspace $workspace8
|
||||
bindsym $mod+9 workspace $workspace9
|
||||
bindsym $mod+0 workspace $workspace10
|
||||
bindsym $mod+p workspace $workspace11
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace $workspace1
|
||||
bindsym $mod+Shift+2 move container to workspace $workspace2
|
||||
bindsym $mod+Shift+3 move container to workspace $workspace3
|
||||
bindsym $mod+Shift+4 move container to workspace $workspace4
|
||||
bindsym $mod+Shift+5 move container to workspace $workspace5
|
||||
bindsym $mod+Shift+6 move container to workspace $workspace6
|
||||
bindsym $mod+Shift+7 move container to workspace $workspace7
|
||||
bindsym $mod+Shift+8 move container to workspace $workspace8
|
||||
bindsym $mod+Shift+9 move container to workspace $workspace9
|
||||
bindsym $mod+Shift+0 move container to workspace $workspace10
|
||||
|
||||
############################################
|
||||
# Appearance settings #
|
||||
############################################
|
||||
# Set the default font
|
||||
#font pango:DejaVu Sans Mono 8
|
||||
font pango:System San Francisco Display 10
|
||||
|
||||
# Bar decoration
|
||||
bar {
|
||||
status_command i3blocks -c ~/.config/i3/i3blocks.conf
|
||||
position top
|
||||
strip_workspace_numbers no
|
||||
|
||||
colors {
|
||||
separator $textColour
|
||||
background $primaryBackgroundColour
|
||||
statusline $statusLineColour
|
||||
# border background text
|
||||
focused_workspace $primaryBackgroundColour $primaryBackgroundColour $focusedTextColour
|
||||
active_workspace $primaryBackgroundColour $secondaryBackgroundColour $textColour
|
||||
inactive_workspace $primaryBackgroundColour $primaryBackgroundColour $textColour
|
||||
urgent_workspace $primaryBackgroundColour $primaryBackgroundColour $urgentBackground
|
||||
}
|
||||
}
|
||||
|
||||
new_window 1pixel
|
||||
hide_edge_borders both
|
||||
|
||||
# Widow Colours
|
||||
# border background text indicator
|
||||
client.focused $primaryBackgroundColour $primaryBackgroundColour $focusedTextColour $indicatorColour
|
||||
client.focused_inactive $secondaryBackgroundColour $secondaryBackgroundColour $textColour $indicatorColour
|
||||
client.unfocused $secondaryBackgroundColour $secondaryBackgroundColour $textColour $indicatorColour
|
||||
client.urgent $secondaryBackgroundColour $urgentBackground $urgentTextColour $indicatorColour
|
||||
|
||||
# Floating windows
|
||||
for_window [class="Pavucontrol"] floating enable
|
||||
for_window [class="Lxappearance"] floating enable
|
||||
for_window [class="Arandr"] floating enable
|
||||
for_window [class="Eog"] floating enable
|
||||
|
||||
############################################
|
||||
# Workspace specific tools #
|
||||
# Use xprop to determine class #
|
||||
############################################
|
||||
assign [class="Google Play Music Desktop Player"] $workspace10
|
||||
assign [class="Franz"] $workspace9
|
||||
assign [class="Enpass-Desktop"] $workspace11
|
||||
assign [class="robo3t"] $workspace8
|
||||
assign [class="Mysql-workbench-bin"] $workspace8
|
||||
|
||||
|
||||
############################################
|
||||
# Autorun #
|
||||
############################################
|
||||
exec --no-startup-id i3-msg 'workspace $workspace2; exec xfce4-terminal' && i3-msg 'workspace $workspace1'
|
||||
exec 'enpass'
|
||||
exec --no-startup-id nm-applet
|
||||
exec_always feh --bg-scale ~/Pictures/Wallpapers/wallpaper.jpg
|
||||
exec /usr/bin/compton
|
||||
exec /bin/bash ~/.config/i3/scripts/startup.sh
|
19
dependencies.txt
Normal file
19
dependencies.txt
Normal file
@ -0,0 +1,19 @@
|
||||
i3lock
|
||||
feh
|
||||
arandr
|
||||
chromium
|
||||
xfce4-terminal
|
||||
nautilus
|
||||
gnome-sushi
|
||||
compton
|
||||
lxappearance
|
||||
arc-gtk-theme
|
||||
rofi
|
||||
rofi-dmenu
|
||||
i3blocks
|
||||
gnome-screenshot
|
||||
wmctrl
|
||||
x11-xserver-utils
|
||||
zenity
|
||||
xrandr
|
||||
nm-applet
|
BIN
fonts/FiraCode-Bold.ttf
Normal file
BIN
fonts/FiraCode-Bold.ttf
Normal file
Binary file not shown.
BIN
fonts/FiraCode-Light.ttf
Normal file
BIN
fonts/FiraCode-Light.ttf
Normal file
Binary file not shown.
BIN
fonts/FiraCode-Medium.ttf
Normal file
BIN
fonts/FiraCode-Medium.ttf
Normal file
Binary file not shown.
BIN
fonts/FiraCode-Regular.ttf
Normal file
BIN
fonts/FiraCode-Regular.ttf
Normal file
Binary file not shown.
BIN
fonts/FiraCode-Retina.ttf
Normal file
BIN
fonts/FiraCode-Retina.ttf
Normal file
Binary file not shown.
BIN
fonts/System San Francisco Display Bold.ttf
Normal file
BIN
fonts/System San Francisco Display Bold.ttf
Normal file
Binary file not shown.
BIN
fonts/System San Francisco Display Regular.ttf
Normal file
BIN
fonts/System San Francisco Display Regular.ttf
Normal file
Binary file not shown.
BIN
fonts/System San Francisco Display Thin.ttf
Normal file
BIN
fonts/System San Francisco Display Thin.ttf
Normal file
Binary file not shown.
BIN
fonts/System San Francisco Display Ultralight.ttf
Normal file
BIN
fonts/System San Francisco Display Ultralight.ttf
Normal file
Binary file not shown.
BIN
fonts/fontawesome-webfont.ttf
Normal file
BIN
fonts/fontawesome-webfont.ttf
Normal file
Binary file not shown.
125
i3blocks.conf
Normal file
125
i3blocks.conf
Normal file
@ -0,0 +1,125 @@
|
||||
# i3blocks config file
|
||||
#
|
||||
# Please see man i3blocks for a complete reference!
|
||||
# The man page is also hosted at http://vivien.github.io/i3blocks
|
||||
#
|
||||
# List of valid properties:
|
||||
#
|
||||
# align
|
||||
# color
|
||||
# command
|
||||
# full_text
|
||||
# instance
|
||||
# interval
|
||||
# label
|
||||
# min_width
|
||||
# name
|
||||
# separator
|
||||
# separator_block_width
|
||||
# short_text
|
||||
# signal
|
||||
# urgent
|
||||
|
||||
# Global properties
|
||||
#
|
||||
# The top properties below are applied to every block, but can be overridden.
|
||||
# Each block command defaults to the script name to avoid boilerplate.
|
||||
command=/usr/lib/i3blocks/$BLOCK_NAME
|
||||
separator_block_width=15
|
||||
markup=none
|
||||
|
||||
# Currently playing song
|
||||
[music]
|
||||
command=python ~/.config/i3/scripts/blocks/currentSong.py --layout t-A
|
||||
separator_block_width=13
|
||||
interval=1
|
||||
color=#e29e0b
|
||||
|
||||
# CPU usage
|
||||
#
|
||||
# The script may be called with -w and -c switches to specify thresholds,
|
||||
# see the script for details.
|
||||
[cpu_usage]
|
||||
label=
|
||||
interval=10
|
||||
separator=true
|
||||
|
||||
# Temperature
|
||||
#
|
||||
# Support multiple chips, though lm-sensors.
|
||||
# The script may be called with -w and -c switches to specify thresholds,
|
||||
# see the script for details.
|
||||
[temperature]
|
||||
command=bash ~/.config/i3/scripts/blocks/temp.sh
|
||||
label=
|
||||
interval=1
|
||||
|
||||
# Memory usage
|
||||
#
|
||||
# The type defaults to "mem" if the instance is not specified.
|
||||
[memory]
|
||||
label=
|
||||
separator=true
|
||||
interval=30
|
||||
|
||||
# Disk usage
|
||||
# The directory defaults to $HOME if the instance is not specified.
|
||||
# The script may be called with a optional argument to set the alert
|
||||
# (defaults to 10 for 10%).
|
||||
[disk]
|
||||
label=
|
||||
instance=/
|
||||
interval=5
|
||||
separator=true
|
||||
|
||||
# Network interface monitoring
|
||||
#
|
||||
# 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.
|
||||
[iface]
|
||||
#instance=wlan0
|
||||
color=#0fad3c
|
||||
interval=10
|
||||
separator=true
|
||||
|
||||
[wifi]
|
||||
#instance=wlp3s0
|
||||
interval=10
|
||||
separator=true
|
||||
|
||||
#[load_average]
|
||||
#interval=10
|
||||
|
||||
# Volume indicator
|
||||
#
|
||||
# The first parameter sets the step (and units to display)
|
||||
# The second parameter overrides the mixer selection
|
||||
# See the script for details.
|
||||
[volume]
|
||||
label=
|
||||
instance=Master
|
||||
interval=1
|
||||
command=/usr/lib/i3blocks/volume 5 pulse
|
||||
signal=10
|
||||
separator=true
|
||||
|
||||
# Battery indicator
|
||||
# The battery instance defaults to 0.
|
||||
[battery]
|
||||
#label=BAT
|
||||
label=
|
||||
#instance=1
|
||||
interval=30
|
||||
separator=true
|
||||
|
||||
# Date Time
|
||||
[time]
|
||||
command=date '+%Y-%m-%d %H:%M:%S'
|
||||
interval=1
|
||||
separator=true
|
||||
|
||||
# OpenVPN support
|
||||
#
|
||||
# Support multiple VPN, with colors.
|
||||
#[openvpn]
|
||||
#interval=20
|
BIN
icons/lock.png
Normal file
BIN
icons/lock.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
74
scripts/blocks/currentSong.py
Normal file
74
scripts/blocks/currentSong.py
Normal file
@ -0,0 +1,74 @@
|
||||
#!/usr/bin/python
|
||||
import json
|
||||
from os.path import expanduser
|
||||
import sys
|
||||
import argparse
|
||||
|
||||
home = expanduser("~")
|
||||
parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter, description="Parses and print Google Play Music Desktop Player song info")
|
||||
|
||||
def parseJson():
|
||||
try:
|
||||
with open(home + '/.config/Google Play Music Desktop Player/json_store/playback.json') as f:
|
||||
data = f.read()
|
||||
except:
|
||||
with open(home + '/GPMDP_STORE/playback.json') as f:
|
||||
data = f.read()
|
||||
return json.loads(data)
|
||||
|
||||
def getSong(data):
|
||||
return data['song']['title']
|
||||
|
||||
def getAlbum(data):
|
||||
return data['song']['album']
|
||||
|
||||
def getArtist(data):
|
||||
return data['song']['artist']
|
||||
|
||||
def convert_time(ms):
|
||||
x = ms / 1000
|
||||
x % 60
|
||||
m, s = divmod(x, 60)
|
||||
return "%d:%02d" % (m, s)
|
||||
def getProgress(data):
|
||||
cur = data['time']['current']
|
||||
total = data['time']['total']
|
||||
return convert_time(cur) + "/" + convert_time(total)
|
||||
|
||||
def parseLayout(layout):
|
||||
displaystr = " "
|
||||
for i in layout:
|
||||
if i == 't':
|
||||
displaystr += getSong(data)
|
||||
elif i == 'a':
|
||||
displaystr += getAlbum(data)
|
||||
elif i == 'A':
|
||||
displaystr += getArtist(data)
|
||||
elif i == 'p':
|
||||
displaystr += getProgress(data)
|
||||
elif i == '-':
|
||||
displaystr += " - "
|
||||
return displaystr
|
||||
|
||||
def run(data, layout):
|
||||
displaystr = ""
|
||||
if data['playing']:
|
||||
displaystr = parseLayout(layout)
|
||||
else:
|
||||
sys.stdout.write(" ")
|
||||
if sys.version[0] == '2':
|
||||
print(displaystr.encode('utf-8'))
|
||||
else:
|
||||
print(displaystr)
|
||||
|
||||
parser.add_argument("--layout",
|
||||
action="store",
|
||||
dest="layout",
|
||||
help="t = Song Title\na = Song Album\nA = Artist Name\np = Track time progess\n- = Spacer\nExample: t-a-A-p",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
data = parseJson()
|
||||
try:
|
||||
run(data, args.layout)
|
||||
except:
|
||||
run(data, "t-a-A-p")
|
12
scripts/blocks/temp.sh
Normal file
12
scripts/blocks/temp.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
temp=$(sensors | # execute sensors
|
||||
grep -w "Core 0:" | # grep for the first core
|
||||
sed 's/([^)]*)//g' | # filter
|
||||
tr -s " " | # remove whitespace
|
||||
sed -e 's/Core 0\(.*\):/\1/' | # get value between Core 0 and :
|
||||
cut -c 3- | rev | cut -c 7- | rev #remove clutter
|
||||
)
|
||||
|
||||
# echo out the result
|
||||
echo $temp°C
|
16
scripts/brightness.sh
Normal file
16
scripts/brightness.sh
Normal file
@ -0,0 +1,16 @@
|
||||
#! /bin/bash
|
||||
|
||||
displays=($(xrandr | awk '/ connected /{print $1}'))
|
||||
|
||||
if (( ${#displays[@]} > 1 ))
|
||||
then
|
||||
selected_display="$(zenity --list --title 'Select Display' --radiolist --column '' --column 'Display' $(xrandr | awk '/ connected /{print NR,$1}'))"
|
||||
else
|
||||
selected_display="${displays[0]}"
|
||||
fi
|
||||
|
||||
zenity --scale --title "Set brightness of $selected_display" --value=100 --print-partial |
|
||||
while read brightness
|
||||
do
|
||||
xrandr --output "$selected_display" --brightness $(awk '{print $1/100}' <<<"$brightness"})
|
||||
done
|
11
scripts/i3lock.sh
Normal file
11
scripts/i3lock.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
icon="$HOME/.config/i3/icons/lock.png"
|
||||
tmpbg='/tmp/screen.png'
|
||||
|
||||
(( $# )) && { icon=$1; }
|
||||
|
||||
scrot "$tmpbg"
|
||||
convert "$tmpbg" -scale 10% -scale 1000% "$tmpbg"
|
||||
convert "$tmpbg" "$icon" -gravity center -composite -matte "$tmpbg"
|
||||
i3lock -u -i "$tmpbg"
|
3
scripts/screenshot.sh
Normal file
3
scripts/screenshot.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
gnome-screenshot -i
|
8
scripts/startup.sh
Normal file
8
scripts/startup.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# start Google Drive client
|
||||
insync start
|
||||
|
||||
# Wait for the programs to start then remove attention (e.g red blinking)
|
||||
sleep 1
|
||||
wmctrl -r "Enpass" -b remove,demands_attention
|
Loading…
Reference in New Issue
Block a user