mirror of
http://github.com/JaeUs3792/dotfiles
synced 2025-12-13 23:51:34 +09:00
🌿 Some additions
This commit is contained in:
48
.config/xmobar/get_workspace_exwm.py
Normal file
48
.config/xmobar/get_workspace_exwm.py
Normal file
@ -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 '<fc={}>{}</fc>'.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))
|
||||
44
.config/xmobar/xmobarrc_exwm
Normal file
44
.config/xmobar/xmobarrc_exwm
Normal file
@ -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 "<fn=1>\xf133 </fn> %b %d %Y - (%H:%M) " "date" 50
|
||||
-- Network up and down
|
||||
, Run Network "enp10s0" ["-t", "<fn=1>\xf0ab </fn> <rx>kb <fn=1>\xf0aa </fn> <tx>kb"] 20
|
||||
-- Cpu usage in percent
|
||||
, Run Cpu ["-t", "<fn=1>\xf108 </fn> cpu: (<total>%)","-H","50","--high","red"] 20
|
||||
-- Ram used number and percent
|
||||
, Run Memory ["-t", "<fn=1>\xf233 </fn> mem: <used>M (<usedratio>%)"] 20
|
||||
-- Disk space free
|
||||
, Run DiskU [("/", "<fn=1>\xf0c7 </fn> hdd: <free> 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 = " <action=`xdotool key control+alt+g`><icon=haskell_20.xpm/> </action><fc=#666666> |</fc> %UnsafeStdinReader% }{ <fc=#666666> |</fc> <fc=#b3afc2><fn=1> </fn> %uname% </fc><fc=#666666> |</fc> <fc=#ecbe7b> %cpu% </fc><fc=#666666> |</fc> <fc=#ff6c6b> %memory% </fc><fc=#666666> |</fc> <fc=#51afef> %disku% </fc><fc=#666666> |</fc> <fc=#98be65> %enp10s0% </fc><fc=#666666> |</fc> <fc=#46d9ff> %date% </fc>"
|
||||
}
|
||||
6
scripts/random_wallpaper.sh
Executable file
6
scripts/random_wallpaper.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
files=($1/*)
|
||||
randomfile=$(printf "%s\n" "${files[RANDOM % ${#files[@]}]}")
|
||||
echo $randomfile
|
||||
wal -i $randomfile --saturate 1.0
|
||||
Reference in New Issue
Block a user