Compare commits

..

2 Commits

Author SHA1 Message Date
siinus c4d361cb02
Update umatrix rules 2 years ago
siinus 6d4df8bfac
Add uMatrix rules 2 years ago
  1. 3
      .gitmodules
  2. 45
      alacritty/.config/alacritty/alacritty.toml
  3. 49
      alacritty/.config/alacritty/alacritty.yml
  4. 3
      i3/.cfg_src/i3/config.base
  5. 6
      i3/.i3/blocks/temp
  6. 108
      misc/umatrix-rules.txt
  7. 4
      mpv/.config/mpv/mpv.conf
  8. 5
      ranger/.config/ranger/rifle.conf
  9. 4
      sway/.config/environment.d/99-firefox.conf
  10. 4
      sway/.config/mako/config
  11. 206
      sway/.config/sway/config
  12. 39
      sway/.config/sway/hosts/codered/config
  13. 34
      sway/.config/sway/hosts/nebula/config
  14. 13
      sway/.config/sway/hosts/nebula/media
  15. 37
      sway/.config/sway/res/bg.svg
  16. 91
      sway/.config/waybar/config
  17. 128
      sway/.config/waybar/mediaplayer.py
  18. 126
      sway/.config/waybar/style.css
  19. 4
      vim/.config/nvim/init.vim
  20. 1
      vim/.config/nvim/syntax/swayconfig.vim
  21. 1
      vim/dotfiles_libs/swayconfig.vim
  22. 46
      zsh/.zshrc

3
.gitmodules vendored

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
[submodule "vim/dotfiles_libs/swayconfig.vim"]
path = vim/dotfiles_libs/swayconfig.vim
url = https://github.com/jamespeapen/swayconfig.vim

45
alacritty/.config/alacritty/alacritty.toml

@ -1,45 +0,0 @@ @@ -1,45 +0,0 @@
[colors.bright]
black = "#7f7f7f"
blue = "#00a5ff"
cyan = "#00ffff"
green = "#00ff00"
magenta = "#ff00ff"
red = "#ff0000"
white = "#ffffff"
yellow = "#ffff00"
[colors.normal]
black = "#000000"
blue = "#00a5ee"
cyan = "#00cdcd"
green = "#00cd00"
magenta = "#cd00cd"
red = "#cd0000"
white = "#e5e5e5"
yellow = "#cdcd00"
[colors.primary]
background = "#252525"
foreground = "#cccccc"
[env]
TERM = "xterm-256color"
[font]
size = 9
[font.bold]
family = "monospace"
style = "Bold"
[font.bold_italic]
family = "monospace"
style = "Bold Italic"
[font.italic]
family = "monospace"
style = "Italic"
[font.normal]
family = "monospace"
style = "Regular"

49
alacritty/.config/alacritty/alacritty.yml

@ -0,0 +1,49 @@ @@ -0,0 +1,49 @@
env:
TERM: xterm-256color
font:
normal:
family: monospace
style: Regular
bold:
family: monospace
style: Bold
italic:
family: monospace
style: Italic
bold_italic:
family: monospace
style: Bold Italic
size: 9
colors:
# Default colors
primary:
background: '#252525'
foreground: '#cccccc'
# Normal colors
normal:
black: '#000000'
red: '#cd0000'
green: '#00cd00'
yellow: '#cdcd00'
blue: '#00a5ee'
magenta: '#cd00cd'
cyan: '#00cdcd'
white: '#e5e5e5'
# Bright colors
bright:
black: '#7f7f7f'
red: '#ff0000'
green: '#00ff00'
yellow: '#ffff00'
blue: '#00a5ff'
magenta: '#ff00ff'
cyan: '#00ffff'
white: '#ffffff'

3
i3/.cfg_src/i3/config.base

@ -156,6 +156,3 @@ client.focused_inactive #333333 #5F676A #ffffff #484e50 @@ -156,6 +156,3 @@ client.focused_inactive #333333 #5F676A #ffffff #484e50
client.unfocused #333333 #424242 #888888 #292d2e
client.urgent #C10004 #900000 #ffffff #900000
exec_always --no-startup-id setxkbmap -I.config/xkb pvx -print | xkbcomp -I.config/xkb - $DISPLAY

6
i3/.i3/blocks/temp

@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
#!/bin/sh
TEMP=`sensors | awk '/Tctl/ {print $2}'`
echo "$TEMP"

108
misc/umatrix-rules.txt

@ -0,0 +1,108 @@ @@ -0,0 +1,108 @@
https-strict: behind-the-scene false
matrix-off: about-scheme true
matrix-off: behind-the-scene true
matrix-off: chrome-extension-scheme true
matrix-off: chrome-scheme true
matrix-off: moz-extension-scheme true
matrix-off: mozilla.org true
matrix-off: opera-scheme true
matrix-off: vivaldi-scheme true
matrix-off: wyciwyg-scheme true
noscript-spoof: * true
referrer-spoof: * true
referrer-spoof: behind-the-scene false
* * * block
* * css allow
* * frame block
* * image allow
* 1st-party * allow
* 1st-party frame allow
* ajax.googleapis.com script allow
* bigcommerce.com script allow
* bigcommerce.com xhr allow
* cdn.jsdelivr.net script allow
* cdn.podia.com script allow
* cdn.polyfill.io script allow
* cdnjs.cloudflare.com script allow
* cloudfront.net script allow
* cloudfront.net xhr allow
* code.jquery.com script allow
* discourse-cdn.com script allow
* execute-api.us-east-1.amazonaws.com xhr allow
* ssl.p.jwpcdn.com script allow
* www.google.com frame allow
* www.google.com script allow
* www.google.com xhr allow
* www.gstatic.com script allow
* www.recaptcha.net frame allow
* www.recaptcha.net script allow
* www.recaptcha.net xhr allow
amazon.co.uk images-eu.ssl-images-amazon.com script allow
amazon.co.uk m.media-amazon.com script allow
amazon.co.uk m.media-amazon.com xhr allow
amazon.co.uk unagi-eu.amazon.com other allow
amazon.com images-na.ssl-images-amazon.com script allow
amazon.com images-na.ssl-images-amazon.com xhr allow
amazon.com m.media-amazon.com script allow
bandcamp.com s4.bcbits.com script allow
bandcamp.com t4.bcbits.com media allow
caseking.de cdn.findologic.com script allow
caseking.de service.findologic.com script allow
delfi.ee eeds.babahhcdn.com xhr allow
delfi.ee g.nh.ee script allow
delfi.ee g1.nh.ee script allow
delfi.ee r.muu.ee frame allow
delfi.ee r.muu.ee script allow
facebook.com fbcdn.net script allow
facebook.com fbcdn.net xhr allow
github.com github.githubassets.com script allow
humblebundle.com humblebundle-a.akamaihd.net script allow
imdb.com cloudfront.xp-assets.aiv-cdn.net script allow
imdb.com fls-na.amazon.com other allow
imdb.com images-na.ssl-images-amazon.com script allow
imdb.com imdb-video.media-imdb.com media allow
imdb.com imdb-video.media-imdb.com xhr allow
imdb.com m.media-amazon.com frame allow
imdb.com m.media-amazon.com script allow
imdb.com m.media-amazon.com xhr allow
imdb.com sg.media-imdb.com xhr allow
imdb.com unagi-na.amazon.com other allow
imdb.com unagi-na.amazon.com xhr allow
imdb.com unagi.amazon.com other allow
kavad.ee cdn.tvstart.com script allow
montonio.com js.stripe.com script allow
newegg.com c1.neweggimages.com script allow
newegg.com c1.neweggimages.com xhr allow
packagist.org algolia.net script allow
packagist.org algolia.net xhr allow
packagist.org algolianet.com script allow
packagist.org algolianet.com xhr allow
paypal.com paypal-api.arkoselabs.com script allow
paypal.com paypal-api.arkoselabs.com xhr allow
paypal.com www.paypalobjects.com frame allow
paypal.com www.paypalobjects.com script allow
pinterest.com s.pinimg.com script allow
pioneerdj.com cdn.gigya-ext.com script allow
pioneerdj.com cdn.ipaper.io script allow
pioneerdj.com cdns.gigya.com script allow
pioneerdj.com cdns.us1.gigya.com frame allow
pioneerdj.com cdns.us1.gigya.com xhr allow
reddit.com v.redd.it media allow
reddit.com v.redd.it xhr allow
reddit.com watch.redd.it xhr allow
reddit.com www.redditmedia.com frame allow
reddit.com www.redditstatic.com script allow
soundcloud.com s3.amazonaws.com xhr allow
soundcloud.com sndcdn.com script allow
soundcloud.com sndcdn.com xhr allow
steamcommunity.com community.akamai.steamstatic.com script allow
steampowered.com cdn.akamai.steamstatic.com media allow
steampowered.com store.akamai.steamstatic.com script allow
techpowerup.com tpucdn.com script allow
twitch.tv static.twitchcdn.net xhr allow
twitch.tv ttvnw.net xhr allow
twitch.tv twitchcdn.net script allow
youtube-nocookie.com googlevideo.com xhr allow
youtube.com googlevideo.com media allow
youtube.com googlevideo.com xhr allow
youtube.com www.gstatic.com xhr allow

4
mpv/.config/mpv/mpv.conf

@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
hwdec=auto
vo=gpu
gpu-api=opengl

5
ranger/.config/ranger/rifle.conf

@ -1,5 +0,0 @@ @@ -1,5 +0,0 @@
else = xdg-open "$1"
label editor = "$EDITOR" -- "$@"
label pager = "$PAGER" -- "$@"

4
sway/.config/environment.d/99-firefox.conf

@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
MOZ_USE_XINPUT2=1
MOZ_ENABLE_WAYLAND=1
GTK_USE_PORTAL=1
MOZ_DBUS_REMOTE=1

4
sway/.config/mako/config

@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
default-timeout=10000
border-size=1
border-radius=1

206
sway/.config/sway/config

@ -1,206 +0,0 @@ @@ -1,206 +0,0 @@
# vim: filetype=swayconfig
### Variables
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
set $term alacritty
set $menu tofi-run | xargs swaymsg exec --
titlebar_padding 4 1
output * bg res/bg.svg fill
### Idle configuration
#
# Example configuration:
#
# exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
# before-sleep 'swaylock -f -c 000000'
#
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
set $lockcmd swaylock -f -c 000000
exec swayidle -w \
timeout 300 '$lockcmd' \
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
before-sleep '$lockcmd' \
lock '$lockcmd'
input "type:keyboard" {
xkb_layout pvx
}
### Key bindings
# Lock sway
bindsym $mod+Escape exec pkill -USR1 swayidle
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+Shift+q kill
# Start your launcher
bindsym $mod+d exec $menu
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+c reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
# Moving around:
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# Workspaces:
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
bindsym $mod+Alt+1 workspace number 11
bindsym $mod+Alt+2 workspace number 12
bindsym $mod+Alt+3 workspace number 13
bindsym $mod+Alt+4 workspace number 14
bindsym $mod+Alt+5 workspace number 15
bindsym $mod+Alt+6 workspace number 16
bindsym $mod+Alt+7 workspace number 17
bindsym $mod+Alt+8 workspace number 18
bindsym $mod+Alt+9 workspace number 19
bindsym $mod+Alt+0 workspace number 20
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10
bindsym $mod+Shift+Alt+1 move container to workspace number 11
bindsym $mod+Shift+Alt+2 move container to workspace number 12
bindsym $mod+Shift+Alt+3 move container to workspace number 13
bindsym $mod+Shift+Alt+4 move container to workspace number 14
bindsym $mod+Shift+Alt+5 move container to workspace number 15
bindsym $mod+Shift+Alt+6 move container to workspace number 16
bindsym $mod+Shift+Alt+7 move container to workspace number 17
bindsym $mod+Shift+Alt+8 move container to workspace number 18
bindsym $mod+Shift+Alt+9 move container to workspace number 19
bindsym $mod+Shift+Alt+0 move container to workspace number 20
# Layout stuff:
bindsym $mod+b splith
bindsym $mod+v splitv
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
# Scratchpad:
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
# Resizing containers:
mode "resize" {
bindsym $left resize shrink width 20px
bindsym $down resize grow height 20px
bindsym $up resize shrink height 20px
bindsym $right resize grow width 20px
# Ditto, with arrow keys
bindsym Left resize shrink width 20px
bindsym Down resize grow height 20px
bindsym Up resize shrink height 20px
bindsym Right resize grow width 20px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Status Bar:
bar {
swaybar_command waybar
workspace_buttons yes
}
default_border pixel 2
seat * hide_cursor when-typing enable
include /etc/sway/config.d/*
exec dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
for_window [app_id="mpv"] floating enable
for_window [app_id="tridactyl_editor"] floating enable
include hosts/$(hostname)/*
exec_always notify-send "ANNA MU SWAY!" "config loaded"

39
sway/.config/sway/hosts/codered/config

@ -1,39 +0,0 @@ @@ -1,39 +0,0 @@
# vim: filetype=swayconfig
set $display1 "LG Electronics 27GL850 912NTZN7A301"
set $display2 "Dell Inc. DELL U2410 F525M0536JWL"
set $display3 "Samsung Electric Company SyncMaster H9XS901412"
output $display1 pos 1200 0 adaptive_sync on
output $display2 pos 0 0 transform 270
output $display3 pos 3760 0 transform 270
workspace 1 output $display1
workspace 2 output $display2
workspace 3 output $display3
workspace 5 output $display1
workspace 6 output $display1
workspace 7 output $display1
workspace 8 output $display1
workspace 9 output $display2
workspace 10 output $display2
assign [title="con_htop"] 3
assign [app_id="org.kde.quassel"] 9
assign [app_id="telegramdesktop"] 9
assign [app_id="audacious"] 10
assign [app_id="org.rncbc.qpwgraph"] 10
assign [app_id="thunderbird"] 6
exec $term --title con_htop -e htop
exec quasselclient
exec telegram-desktop
exec audacious
exec qpwgraph
exec thunderbird
exec piwi-gayming.sh
exec $term

34
sway/.config/sway/hosts/nebula/config

@ -1,34 +0,0 @@ @@ -1,34 +0,0 @@
# vim: filetype=swayconfig
set $display1 "Dell Inc. DELL P2723D 6CZS1L3"
set $display2 "Dell Inc. DELL U2410 F525M09U3UUL"
set $display3 "Dell Inc. DELL U2410 F525M09U3W1L"
output $display1 pos 1200 200
output $display2 pos 0 0 transform 270
output $display3 pos 3760 0 transform 270
workspace 1 output $display1
workspace 2 output $display2
workspace 3 output $display3
workspace 5 output $display1
workspace 6 output $display1
workspace 7 output $display1
workspace 8 output $display1
workspace 9 output $display2
workspace 10 output $display2
assign [app_id="org.kde.quassel"] 9
assign [app_id="audacious"] 10
assign [app_id="org.rncbc.qpwgraph"] 10
assign [app_id="thunderbird"] 3
exec $term --title con_htop -e htop
exec udiskie -t
exec audacious
exec qpwgraph
exec thunderbird
exec $term

13
sway/.config/sway/hosts/nebula/media

@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioPrev exec playerctl previous
bindsym Alt+XF86AudioPrev exec playerctl position 30
bindsym XF86AudioPlay exec playerctl play-pause
bindsym Alt+XF86AudioPlay exec playerctl stop
bindsym XF86AudioNext exec playerctl next
bindsym Alt+XF86AudioNext exec playerctl position 30+
bindsym XF86AudioStop exec playerctl stop

37
sway/.config/sway/res/bg.svg

@ -1,37 +0,0 @@ @@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="3840"
height="2160"
viewBox="0 0 3840 2160"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<linearGradient
id="gradient0"
x1="2465"
y1="2509"
x2="1307"
y2="-374"
gradientUnits="userSpaceOnUse"
>
<stop
style="stop-color:#001d29"
offset="0"
/>
<stop
style="stop-color:#6caacd"
offset="1"
/>
</linearGradient>
</defs>
<g>
<rect
style="fill:url(#gradient0)"
width="3840"
height="2160"
x="0"
y="0"
/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 806 B

91
sway/.config/waybar/config

@ -1,91 +0,0 @@ @@ -1,91 +0,0 @@
{
"layer": "bottom",
"position": "top",
"height": 20,
"spacing": 0,
"modules-left": ["sway/workspaces", "sway/mode", "custom/media"],
"modules-center": ["sway/window"],
"modules-right": ["idle_inhibitor", "network", "cpu", "temperature", "memory", "disk", "battery", "battery#bat0", "battery#bat1", "clock", "tray"],
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
"icon-size": 16,
"spacing": 4
},
"clock": {
"timezone": "Europe/Tallinn",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format": "{:%Y-%m-%d %a %H:%M}",
"format-alt": "{:%Y-%m-%d}"
},
"cpu": {
"format": "{usage}% ",
"tooltip": true
},
"memory": {
"format": "{}% "
},
"disk": {
"path": "/home",
"format": "{path} {free} 🖴"
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ipaddr}/{cidr} ",
"tooltip-format": "{ifname} via {gwaddr} ",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"battery": {
"states": {
"good": 95,
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": ["", "", "", "", ""]
},
"battery#bat0": {
"bat": "BAT0",
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
"format-icons": ["", "", "", "", ""]
},
"battery#bat1": {
"bat": "BAT1",
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
"format-icons": ["", "", "", "", ""]
},
"custom/media": {
"format": "{icon} {}",
"return-type": "json",
"max-length": 80,
"format-icons": {
"spotify": "",
"default": "🎜"
},
"escape": true,
"exec": "$HOME/.config/waybar/mediaplayer.py --player audacious 2> /dev/null"
}
}

128
sway/.config/waybar/mediaplayer.py

@ -1,128 +0,0 @@ @@ -1,128 +0,0 @@
#!/usr/bin/env python3
import argparse
import logging
import sys
import signal
import gi
import json
gi.require_version('Playerctl', '2.0')
from gi.repository import Playerctl, GLib
logger = logging.getLogger(__name__)
def write_output(text, player):
logger.info('Writing output')
output = {'text': text,
'class': 'custom-' + player.props.player_name,
'alt': player.props.player_name}
sys.stdout.write(json.dumps(output) + '\n')
sys.stdout.flush()
def on_play(player, status, manager):
logger.info('Received new playback status')
on_metadata(player, player.props.metadata, manager)
def on_metadata(player, metadata, manager):
logger.info('Received new metadata')
track_info = ''
if player.props.player_name == 'spotify' and \
'mpris:trackid' in metadata.keys() and \
':ad:' in player.props.metadata['mpris:trackid']:
track_info = 'AD PLAYING'
elif player.get_artist() != '' and player.get_title() != '':
track_info = '{artist} - {title}'.format(artist=player.get_artist(),
title=player.get_title())
else:
track_info = player.get_title()
if player.props.status != 'Playing' and track_info:
track_info = ' ' + track_info
write_output(track_info, player)
def on_player_appeared(manager, player, selected_player=None):
if player is not None and (selected_player is None or player.name == selected_player):
init_player(manager, player)
else:
logger.debug("New player appeared, but it's not the selected player, skipping")
def on_player_vanished(manager, player):
logger.info('Player has vanished')
sys.stdout.write('\n')
sys.stdout.flush()
def init_player(manager, name):
logger.debug('Initialize player: {player}'.format(player=name.name))
player = Playerctl.Player.new_from_name(name)
player.connect('playback-status', on_play, manager)
player.connect('metadata', on_metadata, manager)
manager.manage_player(player)
on_metadata(player, player.props.metadata, manager)
def signal_handler(sig, frame):
logger.debug('Received signal to stop, exiting')
sys.stdout.write('\n')
sys.stdout.flush()
# loop.quit()
sys.exit(0)
def parse_arguments():
parser = argparse.ArgumentParser()
# Increase verbosity with every occurrence of -v
parser.add_argument('-v', '--verbose', action='count', default=0)
# Define for which player we're listening
parser.add_argument('--player')
return parser.parse_args()
def main():
arguments = parse_arguments()
# Initialize logging
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG,
format='%(name)s %(levelname)s %(message)s')
# Logging is set by default to WARN and higher.
# With every occurrence of -v it's lowered by one
logger.setLevel(max((3 - arguments.verbose) * 10, 0))
# Log the sent command line arguments
logger.debug('Arguments received {}'.format(vars(arguments)))
manager = Playerctl.PlayerManager()
loop = GLib.MainLoop()
manager.connect('name-appeared', lambda *args: on_player_appeared(*args, arguments.player))
manager.connect('player-vanished', on_player_vanished)
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGTERM, signal_handler)
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
for player in manager.props.player_names:
if arguments.player is not None and arguments.player != player.name:
logger.debug('{player} is not the filtered player, skipping it'
.format(player=player.name)
)
continue
init_player(manager, player)
loop.run()
if __name__ == '__main__':
main()

126
sway/.config/waybar/style.css

@ -1,126 +0,0 @@ @@ -1,126 +0,0 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
}
window#waybar {
background-color: rgba(43, 48, 59, 0.5);
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
#workspaces button {
padding: 0 1px;
background-color: transparent;
color: #ffffff;
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each workspace name */
border: none;
border-radius: 0;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button.focused {
background: rgba(0, 0, 0, 0.5);
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#mode {
background-color: #64727D;
border-bottom: 3px solid #ffffff;
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#mpd {
padding: 0 5px;
color: #ffffff;
border-left: 1px solid #888888;
}
#window,
#workspaces {
margin: 0 4px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#battery.charging, #battery.plugged {
color: #ffffff;
background-color: #26A65B;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
#temperature.critical {
background-color: #eb4d4b;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
#idle_inhibitor {
background-color: #2d3436;
}
#idle_inhibitor.activated {
background-color: #ecf0f1;
color: #2d3436;
}

4
vim/.config/nvim/init.vim

@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
set number
set relativenumber

1
vim/.config/nvim/syntax/swayconfig.vim

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../dotfiles_libs/swayconfig.vim/syntax/swayconfig.vim

1
vim/dotfiles_libs/swayconfig.vim

@ -1 +0,0 @@ @@ -1 +0,0 @@
Subproject commit cfca1e50df5448d81c8f6c54caba273575d5cd62

46
zsh/.zshrc

@ -1,35 +1,9 @@ @@ -1,35 +1,9 @@
# fzf
xsource /usr/share/fzf/key-bindings.zsh
xsource /usr/share/fzf/completion.zsh
source /usr/share/zaw/zaw.zsh
# fzf history search with support for Ctrl+E history edit like with zaw widget before
if typeset -f fzf-history-widget > /dev/null; then
# Copied form key-bindings.zsh
# CTRL-R - Paste the selected command from history into the command line
fzf-history-widget() {
local selected num
setopt localoptions noglobsubst noposixbuiltins pipefail no_aliases 2> /dev/null
selected=( $(fc -rl 1 | perl -ne 'print if !$seen{(/^\s*[0-9]+\**\s+(.*)/, $1)}++' |
FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort --expect=ctrl-e $FZF_CTRL_R_OPTS --query=${(qqq)LBUFFER} +m" $(__fzfcmd)) )
local ret=$?
if [ -n "$selected" ]; then
local accept=0
if [[ $selected[1] == ctrl-e ]]; then
accept=1
shift selected
fi
num=$selected[1]
if [ -n "$num" ]; then
zle vi-fetch-history -n $num
[[ $accept = 0 ]] && zle accept-line
fi
fi
zle reset-prompt
return $ret
}
zle -N fzf-history-widget
bindkey '^R' fzf-history-widget
fi
bindkey '^R' zaw-history
bindkey -M filterselect '^R' down-line-or-history
bindkey -M filterselect '^S' up-line-or-history
bindkey -M filterselect '^E' accept-search
zstyle ':filter-select:highlight' matched fg=green
zstyle ':filter-select' max-lines 3
@ -42,7 +16,6 @@ export SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh @@ -42,7 +16,6 @@ export SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh
alias diff='diff --color=auto'
alias grep='grep --color=auto'
alias ip='ip --color=auto'
alias pgrep='pgrep --ignore-case --list-full'
export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink
export LESS_TERMCAP_md=$'\E[1;36m' # begin bold
@ -55,12 +28,3 @@ export LESS_TERMCAP_ue=$'\E[0m' # reset underline @@ -55,12 +28,3 @@ export LESS_TERMCAP_ue=$'\E[0m' # reset underline
export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
export LESS=' -R '
export PATH=$PATH:~/.local/bin
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-vi-mode/zsh-vi-mode.plugin.zsh
export PF_INFO="ascii os host kernel uptime pkgs memory shell editor wm de palette"
pfetch

Loading…
Cancel
Save