mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-23 21:12:22 +00:00
asdf
This commit is contained in:
parent
be78462814
commit
aaf8e1de21
17 changed files with 389 additions and 10 deletions
|
@ -18,3 +18,35 @@ rofi.color-active: argb:031d1f21, #f3f4f5, argb:031d1f21, argb:031d1f21, #9575cd
|
|||
rofi.font: System San Francisco Display 18
|
||||
|
||||
dzen.font: -*-fixed-medium-r-s*--12-87-*-*-*-*-iso10???-1
|
||||
|
||||
|
||||
URxvt.color24: #076678
|
||||
URxvt.color66: #427b58
|
||||
URxvt.color88: #9d0006
|
||||
URxvt.color96: #8f3f71
|
||||
URxvt.color100: #79740e
|
||||
URxvt.color108: #8ec07c
|
||||
URxvt.color109: #83a598
|
||||
URxvt.color130: #af3a03
|
||||
URxvt.color136: #b57614
|
||||
URxvt.color142: #b8bb26
|
||||
URxvt.color167: #fb4934
|
||||
URxvt.color175: #d3869b
|
||||
URxvt.color208: #fe8019
|
||||
URxvt.color214: #fabd2f
|
||||
URxvt.color223: #ebdbb2
|
||||
URxvt.color228: #f2e5bc
|
||||
URxvt.color229: #fbf1c7
|
||||
URxvt.color230: #f9f5d7
|
||||
URxvt.color234: #1d2021
|
||||
URxvt.color235: #282828
|
||||
URxvt.color236: #32302f
|
||||
URxvt.color237: #3c3836
|
||||
URxvt.color239: #504945
|
||||
URxvt.color241: #665c54
|
||||
URxvt.color243: #7c6f64
|
||||
URxvt.color244: #928374
|
||||
URxvt.color245: #928374
|
||||
URxvt.color246: #a89984
|
||||
URxvt.color248: #bdae93
|
||||
URxvt.color250: #d5c4a1
|
||||
|
|
|
@ -12,8 +12,8 @@ window:
|
|||
# y: 0
|
||||
|
||||
padding:
|
||||
x: 0
|
||||
y: 0
|
||||
x: 10
|
||||
y: 10
|
||||
|
||||
#Spread additional padding evenly around the terminal content.
|
||||
dynamic_padding: true
|
||||
|
@ -301,8 +301,9 @@ schemes:
|
|||
# }}}
|
||||
|
||||
# https://github.com/alacritty/alacritty/wiki/Color-schemes
|
||||
colors: *onedark
|
||||
background_opacity: 0.95
|
||||
colors: *gruvbox
|
||||
#background_opacity: 0.95
|
||||
background_opacity: 1
|
||||
|
||||
font:
|
||||
size: 13
|
||||
|
|
25
files/.config/bspwm/bspwm_scripts/bringwindow
Executable file
25
files/.config/bspwm/bspwm_scripts/bringwindow
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
case $1 in "-a") PROMPT="Goto:"; MODE="go" ;; "-R") PROMPT="Bring:"; MODE="bring" ;; esac
|
||||
|
||||
if [ -n "$2" ]; then
|
||||
WINDOW="$2"
|
||||
else
|
||||
WINDOW=$(paste \
|
||||
<(xdotool search .) \
|
||||
<(xdotool search . get_desktop_for_window %@ 2> /dev/null) \
|
||||
<(xdotool search . getwindowname %@) |\
|
||||
awk '{FS="\t"; if($2 != -1) printf "%10d [%d] %s\n",$1,$2+1,$3}' |\
|
||||
vmenu --no-refocus -p $PROMPT |\
|
||||
sed 's/^ *//g' |\
|
||||
cut -d ' ' -f 1)
|
||||
fi
|
||||
|
||||
if [ -n "$WINDOW" ]; then
|
||||
if [ bring = $MODE ]; then
|
||||
if DESK=$(xdotool get_desktop 2> /dev/null); then
|
||||
xdotool set_desktop_for_window "$WINDOW" $DESK
|
||||
sleep 0.005 # wait for wm to notice
|
||||
fi
|
||||
fi
|
||||
xdotool windowmap "$WINDOW" windowactivate "$WINDOW" windowfocus "$WINDOW" windowraise "$WINDOW"
|
||||
fi
|
11
files/.config/bspwm/bspwm_scripts/bsp_scratchpad.sh
Executable file
11
files/.config/bspwm/bspwm_scripts/bsp_scratchpad.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: $0 <name of hidden scratchpad window>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pids=$(xdotool search --class "${1}")
|
||||
for pid in $pids; do
|
||||
echo "Toggle $pid"
|
||||
bspc node "$pid" --flag hidden -f
|
||||
done
|
107
files/.config/bspwm/bspwm_scripts/drawer
Executable file
107
files/.config/bspwm/bspwm_scripts/drawer
Executable file
|
@ -0,0 +1,107 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Config
|
||||
# ======
|
||||
|
||||
# Where to look for wid files:
|
||||
TMPDIR="$XDG_RUNTIME_DIR/drawers.wids/"
|
||||
|
||||
# Find and show/hide the window if it exists
|
||||
# ==========================================
|
||||
|
||||
NAME=$1
|
||||
|
||||
if [[ -e $TMPDIR$NAME ]]; then
|
||||
read -r WINDOW < "$TMPDIR$NAME"
|
||||
|
||||
# Window exists? Show/hide it and we're done.
|
||||
if xdotool getwindowname "$WINDOW" &> /dev/null; then
|
||||
if xdotool search --onlyvisible . | grep -q "$WINDOW"; then
|
||||
xdotool windowminimize "$WINDOW"
|
||||
else
|
||||
~/.config/bspwm/bspwm_scripts/bringwindow -R "$WINDOW"
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $# -lt 5 ]]; then
|
||||
echo "Not enough args to launch a new $NAME."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# No window to show/hide, better create it. Do setup for that.
|
||||
# ============================================================
|
||||
|
||||
# no xinerama for now
|
||||
CFG=($(xdotool getdisplaygeometry))
|
||||
SCR_WIDTH=${CFG[0]}
|
||||
SCR_HEIGHT=${CFG[1]}
|
||||
SCR_LEFT=0 #${CFG[2]}
|
||||
SCR_TOP=0 #${CFG[3]}
|
||||
|
||||
SIDE=$2
|
||||
WIDTH=$3
|
||||
HEIGHT=$4
|
||||
|
||||
shift 4
|
||||
|
||||
# Handle fractions of screen size for width and height
|
||||
# ====================================================
|
||||
|
||||
if [[ $WIDTH == *% ]]; then
|
||||
WIDTH=${WIDTH:0:-1} # chomp '%'
|
||||
WIDTH=$(( (WIDTH*10*SCR_WIDTH)/1000 ))
|
||||
fi
|
||||
|
||||
if [[ $HEIGHT == *% ]]; then
|
||||
HEIGHT=${HEIGHT:0:-1} # chomp '%'
|
||||
HEIGHT=$(( (HEIGHT*10*SCR_HEIGHT)/1000 ))
|
||||
fi
|
||||
|
||||
# Figure out where to put the window
|
||||
# ==================================
|
||||
|
||||
TOP_ADJ=$(( (SCR_HEIGHT-HEIGHT)/2 ))
|
||||
LEFT_ADJ=$(( (SCR_WIDTH-WIDTH)/2 ))
|
||||
|
||||
case $SIDE in
|
||||
"left")
|
||||
LEFT=$SCR_LEFT
|
||||
TOP=$(( SCR_TOP + TOP_ADJ ))
|
||||
;;
|
||||
"right")
|
||||
LEFT=$(( SCR_WIDTH - WIDTH ))
|
||||
TOP=$(( SCR_TOP + TOP_ADJ ))
|
||||
;;
|
||||
"bottom")
|
||||
LEFT=$(( SCR_LEFT + LEFT_ADJ ))
|
||||
TOP=$(( SCR_HEIGHT - HEIGHT ))
|
||||
;;
|
||||
"top")
|
||||
LEFT=$(( SCR_LEFT + LEFT_ADJ ))
|
||||
TOP=$SCR_TOP
|
||||
esac
|
||||
|
||||
# Create the window
|
||||
# =================
|
||||
|
||||
$@ &
|
||||
# await new window:
|
||||
countWins() {
|
||||
xdotool search --onlyvisible . 2> /dev/null | wc -l
|
||||
}
|
||||
|
||||
WIN_CNT="$(countWins)"
|
||||
while [[ $(countWins) = "$WIN_CNT" ]]; do sleep 0.1; done
|
||||
sleep 0.25
|
||||
|
||||
# new window should now be active, make it our window:
|
||||
WINDOW="$(xdotool getactivewindow)"
|
||||
xdotool set_window --role "drawer" $WINDOW
|
||||
mkdir -p "$TMPDIR"
|
||||
echo "$WINDOW" > "$TMPDIR$NAME"
|
||||
|
||||
border_width="$(xgetres awesome border_width)"
|
||||
which awesome-client &> /dev/null && echo "client.focus.floating = true; client.focus.border_width=$border_width" | awesome-client
|
||||
xdotool windowmove $WINDOW $LEFT $TOP windowsize $WINDOW $WIDTH $HEIGHT windowfocus $WINDOW windowraise $WINDOW
|
14
files/.config/bspwm/bspwm_scripts/execute_menu.sh
Normal file
14
files/.config/bspwm/bspwm_scripts/execute_menu.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
options="screenshot\nscreengif"
|
||||
selected="$(echo -e "$options" | rofi -dmenu -i -theme ~/scripts/rofi-scripts/default_theme.rasi)"
|
||||
case "$selected" in
|
||||
screenshot)
|
||||
~/scripts/screenshot.sh
|
||||
;;
|
||||
screengif)
|
||||
notify-send gif "press M-S-C-g to end gif"
|
||||
~/scripts/screengif.sh
|
||||
;;
|
||||
esac
|
||||
|
2
files/.config/bspwm/bspwm_scripts/run_once.sh
Executable file
2
files/.config/bspwm/bspwm_scripts/run_once.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
pgrep "$@" > /dev/null || ("$@" &)
|
2
files/.config/bspwm/bspwm_scripts/xgetres
Executable file
2
files/.config/bspwm/bspwm_scripts/xgetres
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/dash
|
||||
appres "$1" | grep "$2" | cut -f 2-
|
34
files/.config/bspwm/bspwmrc
Executable file
34
files/.config/bspwm/bspwmrc
Executable file
|
@ -0,0 +1,34 @@
|
|||
#! /bin/sh
|
||||
|
||||
sxhkd &
|
||||
|
||||
killall -q picom && picom --config ~/.config/picom.conf --experimental-backends --no-fading-openclose &
|
||||
killall -q pasystray && pasystray &
|
||||
killall -q nm-applet && nm-applet &
|
||||
killall -q clipmenud && clipmenud &
|
||||
|
||||
xset r rate 300 50 &
|
||||
/home/leon/.config/polybar/launch.sh &
|
||||
feh --bg-fill /home/leon/Bilder/wallpapers/mountains_with_clounds.jpg &
|
||||
|
||||
bspc monitor -d 1 2 3 4 5 6 7 8 9 10
|
||||
|
||||
bspc config border_width 2
|
||||
bspc config window_gap 14
|
||||
|
||||
bspc config focus_follows_pointer true
|
||||
|
||||
bspc config split_ratio 0.50
|
||||
bspc config borderless_monocle false
|
||||
bspc config gapless_monocle false
|
||||
bspc config automatic_scheme alternate
|
||||
|
||||
bspc rule -a mplayer2 state=floating
|
||||
bspc rule -a Kupfer.py focus=on
|
||||
bspc rule -a Screenkey manage=off
|
||||
bspc rule -a feh state=floating
|
||||
bspc rule -a Sxiv state=floating
|
||||
|
||||
#bspc rule -a kitty_scratchpad sticky=on state=floating hidden=on
|
||||
#kitty --class kitty_scratchpad &
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"optOut": false,
|
||||
"lastUpdateCheck": 1587664774612
|
||||
"lastUpdateCheck": 1587976757501
|
||||
}
|
|
@ -16,6 +16,7 @@
|
|||
;
|
||||
;==========================================================
|
||||
|
||||
|
||||
;; Colors ------------------------------------------- {{{
|
||||
|
||||
[colors]
|
||||
|
@ -39,6 +40,10 @@ alert = #bd2c40
|
|||
;; Bar config ----------------------------------------- {{{
|
||||
|
||||
[bar/main]
|
||||
|
||||
override-redirect = true
|
||||
wm-restack = xmonad
|
||||
|
||||
width = 100%:-28
|
||||
height = 30
|
||||
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
|
||||
config_version: 2
|
||||
settings:
|
||||
content.notifications:
|
||||
https://www.reddit.com: false
|
||||
content.register_protocol_handler:
|
||||
https://mail.google.com?extsrc=mailto&url=%25s: false
|
||||
|
|
146
files/.config/sxhkd/sxhkdrc
Normal file
146
files/.config/sxhkd/sxhkdrc
Normal file
|
@ -0,0 +1,146 @@
|
|||
super + Escape
|
||||
pkill -USR1 -x sxhkd
|
||||
|
||||
super + shift + Return
|
||||
alacritty
|
||||
|
||||
super + p
|
||||
rofi -show run -theme ~/scripts/rofi-scripts/default_theme.rasi
|
||||
super + shift + p
|
||||
rofi -modi drun -show drun -theme ~/scripts/rofi-scripts/default_theme.rasi
|
||||
|
||||
|
||||
#
|
||||
# bspwm hotkeys
|
||||
#
|
||||
|
||||
super + ctrl + shift + q
|
||||
bspc quit
|
||||
# restart bspwm
|
||||
super + q
|
||||
bspc wm -r
|
||||
|
||||
# close a window
|
||||
super + ctrl + shift + c
|
||||
bspc node -c
|
||||
|
||||
# alternate between the tiled and monocle layout
|
||||
super + m
|
||||
bspc desktop -l next
|
||||
|
||||
# send the newest marked node to the newest preselected node
|
||||
super + alt + comma
|
||||
bspc node newest.marked.local -n newest.!automatic.local
|
||||
|
||||
super + Return
|
||||
bspc node -s biggest.local
|
||||
|
||||
#
|
||||
# state/flags
|
||||
#
|
||||
|
||||
# set the window state
|
||||
super + {t,shift + t,s,f}
|
||||
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
|
||||
|
||||
# set the node flags
|
||||
super + alt + m
|
||||
bspc node -g marked
|
||||
|
||||
#
|
||||
# focus/swap
|
||||
#
|
||||
|
||||
# focus the node in the given direction
|
||||
super + {_,shift + }{h,j,k,l}
|
||||
bspc node -{f,s} {west,south,north,east}
|
||||
|
||||
# focus the node for the given path jump
|
||||
#super + {shift+b,b,comma,period}
|
||||
# bspc node -f @{parent,brother,first,second}
|
||||
|
||||
# focus the next/previous node in the current desktop
|
||||
super + {_,shift + }c
|
||||
bspc node -f {next,prev}.local
|
||||
|
||||
# focus the last node/desktop
|
||||
super + {grave,Tab}
|
||||
bspc {node,desktop} -f last
|
||||
|
||||
# focus the older or newer node in the focus history
|
||||
super + {o,i}
|
||||
bspc wm -h off; \
|
||||
bspc node {older,newer} -f; \
|
||||
bspc wm -h on
|
||||
|
||||
# focus or send to the given desktop
|
||||
super + {_,shift + }{1-9,0}
|
||||
bspc {desktop -f,node -d} '^{1-9,10}'
|
||||
|
||||
#
|
||||
# preselect
|
||||
#
|
||||
|
||||
# preselect the direction
|
||||
super + alt + {h,j,k,l}
|
||||
bspc node -p {west,south,north,east}
|
||||
|
||||
# preselect the ratio
|
||||
super + alt + {1-9}
|
||||
bspc node -o 0.{1-9}
|
||||
|
||||
# cancel the preselection for the focused node
|
||||
super + alt + shift + space
|
||||
bspc node -p cancel
|
||||
|
||||
# cancel the preselection for the focused desktop
|
||||
super + alt + space
|
||||
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
|
||||
|
||||
#
|
||||
# move/resize
|
||||
#
|
||||
|
||||
super + ctrl + {h,j,k,l}
|
||||
bspc node -z {left -40 0,bottom 0 40,top 0 -40,right 40 0}
|
||||
super + ctrl + shift + {h,j,k,l}
|
||||
bspc node -z {right -40 0,top 0 40,bottom 0 -40,left 40 0}
|
||||
|
||||
# move a floating window
|
||||
super + {Left,Down,Up,Right}
|
||||
bspc node -v {-20 0,0 20,0 -20,20 0}
|
||||
|
||||
|
||||
|
||||
#
|
||||
# start stuff
|
||||
#
|
||||
|
||||
super + b
|
||||
qutebrowser --target window
|
||||
|
||||
super + e
|
||||
sh ~/.config/bspwm/bspwm_scripts/execute_menu.sh
|
||||
|
||||
super + shift + ctrl + g
|
||||
killall -INT -g giph;\
|
||||
notify-send gif "saved gif to ~/Bilder/gifs"
|
||||
|
||||
|
||||
#
|
||||
# scratchpads
|
||||
#
|
||||
|
||||
# super + n; super + d
|
||||
# pids=$(xdotool search --class "discord"); \
|
||||
# for pid in $pids; do bspc node $pid --flag hidden -f; done
|
||||
|
||||
#super + n; super + d
|
||||
# tdrop -ma -w -4 --class discord -y "$PANEL_HEIGHT" discord
|
||||
|
||||
#
|
||||
#super + n; super + n
|
||||
# ~/.config/bspwm/bspwm_scripts/bsp_scratchpad.sh kitty_scratchpad
|
||||
|
||||
#super + n; super + n
|
||||
#id=$(cat /tmp/scratchid); bspc node $id --flag hidden; bspc node -f $id
|
|
@ -6,7 +6,7 @@ font = Iosevka Nerd Font Medium 12
|
|||
|
||||
[colors]
|
||||
# hard contrast: background = #1d2021
|
||||
background = rgba(40, 40, 40, 0.5)
|
||||
background = rgba(40, 40, 40, 1)
|
||||
;background = rgba(40, 40, 40, 0.95)
|
||||
# soft contrast: background = #32302f
|
||||
foreground = #ebdbb2
|
||||
|
|
Binary file not shown.
|
@ -64,7 +64,7 @@ import qualified XMonad.Util.XSelection as XSel
|
|||
|
||||
myModMask = mod4Mask
|
||||
myLauncher = Rofi.asCommand (def { Rofi.theme = Rofi.bigTheme }) ["-show run"]
|
||||
myTerminal = "kitty --single-instance"
|
||||
myTerminal = "termite"
|
||||
myBrowser = "qutebrowser"
|
||||
--myBrowser = "google-chrome-stable"
|
||||
|
||||
|
@ -216,7 +216,7 @@ myKeys = [ ("M-+", sendMessage zoomIn)
|
|||
toggleFullscreen = do
|
||||
sendMessage ToggleLayout -- toggle fullscreen layout
|
||||
sendMessage ToggleStruts -- bar is hidden -> no need to make place for it
|
||||
safeSpawn "polybar-msg" ["cmd", "toggle"] -- toggle polybar visibility
|
||||
--safeSpawn "polybar-msg" ["cmd", "toggle"] -- toggle polybar visibility
|
||||
|
||||
|
||||
scratchpadSubmap :: X ()
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue