diff --git a/.config/xmobar/get_workspace_exwm.py b/.config/xmobar/get_workspace_exwm.py new file mode 100644 index 0000000..0c577e1 --- /dev/null +++ b/.config/xmobar/get_workspace_exwm.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python3 +import sys +import os +import glob +import json +import re +from kitchen.text.converters import to_bytes, to_unicode + +curr = os.popen('xdotool get_desktop').read().strip() +numtotal = os.popen('xdotool get_num_desktops').read().strip() + +curr = int(curr) +numtotal = int(numtotal) + +re_ws = re.compile('\s+') + +try: + wm_info = os.popen('wmctrl -m').readlines() + wm_name = [x for x in wm_info if 'Name:' in x] + wm_name = wm_name[0].strip().replace('Name: ', '') +except: + exit() # probably no wm + +windows = os.popen("wmctrl -l").readlines() +used_windows = [int(re_ws.split(w)[1]) for w in windows] +used_windows = set(used_windows) + +def xmobar_color(s, col): + if col is None: + return str(s) + else: + return '{}'.format(col, s) + +out = [] +for i in range(int(numtotal)): + if i == curr: + # col = "#c84c00" + col = "#e67128" + elif i in used_windows: + col = None + else: + col = "#606060" + # if wm_name == 'LG3D' or wm_name == 'EXWM': # xmonad + index = (i+1) % 10 + s = xmobar_color(index, col) + out.append(s) + +print(' '.join(out)) diff --git a/.config/xmobar/xmobarrc_exwm b/.config/xmobar/xmobarrc_exwm new file mode 100644 index 0000000..63fc369 --- /dev/null +++ b/.config/xmobar/xmobarrc_exwm @@ -0,0 +1,44 @@ +-- http://projects.haskell.org/xmobar/ +-- install xmobar with these flags: --flags="with_alsa" --flags="with_mpd" --flags="with_xft" OR --flags="all_extensions" +-- you can find weather location codes here: http://weather.noaa.gov/index.html + +Config { font = "xft:NanumGothic:weight=bold:pixelsize=11:antialias=true:hinting=true" + , additionalFonts = [ "xft:Mononoki Nerd Font:pixelsize=11:antialias=true:hinting=true" + , "xft:FontAwesome:pixelsize=12" + ] + , bgColor = "#282c34" + , fgColor = "#ff6c6b" + , position = Static { xpos = 2560 , ypos = 0, width = 1920, height = 24 } + , lowerOnStart = True + , hideOnStart = False + , allDesktops = True + , persistent = True + , iconRoot = "/home/jaeus/.xmonad/" -- default: "." + , commands = [ + -- Time and date + Run Date "\xf133 %b %d %Y - (%H:%M) " "date" 50 + -- Network up and down + , Run Network "enp10s0" ["-t", "\xf0ab kb \xf0aa kb"] 20 + -- Cpu usage in percent + , Run Cpu ["-t", "\xf108 cpu: (%)","-H","50","--high","red"] 20 + -- Ram used number and percent + , Run Memory ["-t", "\xf233 mem: M (%)"] 20 + -- Disk space free + , Run DiskU [("/", "\xf0c7 hdd: free")] [] 60 + -- Runs custom script to check for pacman updates. + -- This script is in my dotfiles repo in .local/bin. + , Run Com "~/.local/bin/pacupdate" [] "pacupdate" 36000 + -- Runs a standard shell command 'uname -r' to get kernel version + , Run Com "uname" ["-r"] "" 3600 + -- Prints out the left side items such as workspaces, layout, etc. + -- The workspaces are 'clickable' in my configs. + , Run Com "/usr/bin/python3" ["$HOME/.config/xmobar/get_workspace_exwm.py"] "workspaces" 10 + , Run Com "/bin/sh" [ "-c", "/home/jaeus/.config/xmobar/trayer-padding-icon.sh" ] "trayerpad" 20 + -- Prints out the left side items such as workspaces, layout, etc. + -- The workspaces are 'clickable' in my configs. + , Run UnsafeStdinReader + ] + , sepChar = "%" + , alignSep = "}{" + , template = " | %UnsafeStdinReader% }{ |  %uname% | %cpu% | %memory% | %disku% | %enp10s0% | %date% " + } diff --git a/scripts/random_wallpaper.sh b/scripts/random_wallpaper.sh new file mode 100755 index 0000000..b2273b7 --- /dev/null +++ b/scripts/random_wallpaper.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +files=($1/*) +randomfile=$(printf "%s\n" "${files[RANDOM % ${#files[@]}]}") +echo $randomfile +wal -i $randomfile --saturate 1.0