Refactoring

This commit is contained in:
2020-07-23 11:32:09 +09:00
parent acddc8d3b4
commit ec36193ef9
16 changed files with 87 additions and 637 deletions

View File

@@ -1,5 +1,5 @@
{
"editor.fontFamily": "'TerminessTTF Nerd Font Mono', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
"editor.fontFamily": "'TerminessTTF Nerd Font Mono', 'Noto Color Emoji', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
"editor.tabSize": 2,
"explorer.confirmDelete": false,
"workbench.sideBar.location": "right",
@@ -8,7 +8,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"vim.useSystemClipboard": true,
"files.autoGuessEncoding": true,
"files.encoding": "utf8",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
@@ -80,5 +80,6 @@
"vim.handleKeys": {
"<C-w>": false
},
"editor.fontSize": 14
"editor.fontSize": 14,
"javascript.updateImportsOnFileMove.enabled": "always"
}

1
linux/Xresources Normal file
View File

@@ -0,0 +1 @@
Xft.dpi: 96

View File

@@ -1,9 +1,16 @@
#! /bin/sh
bspc monitor -d I II III IV V VI VII VIII IX X
function kill_program {
if ps -A | grep $1; then
killall -q $1
fi
}
bspc config border_width 1
bspc config window_gap 24
bspc monitor -d     
bspc config border_width $(echo 1 \* $SCALE | bc)
bspc config window_gap $(echo 12 \* $SCALE | bc)
bspc config split_ratio 0.52
bspc config borderless_monocle true
@@ -22,12 +29,15 @@ bspc rule -a Org.gnome.Nautilus desktop='^5' follow=on
bspc rule -a baka-mplayer state=floating sticky=on
bspc rule -a smplayer state=floating sticky=on
function kill_program {
if ps -A | grep $1; then
killall -q $1
fi
}
# restart subscribers
kill_program bspc
bash $HOME/.config/bspwm/set_subscribers.sh &
# set wallpaper
systemctl --user start wallpaper.timer
feh --bg-fill --randomize ${HOME}/.config/wallpaper/*
# restart programs
kill_program gnome-keyring-daemon
kill_program picom
kill_program pasystray
@@ -36,6 +46,8 @@ kill_program dunst
kill_program polkit-gnome-authentication-agent-1
kill_program gsd-xsettings
kill_program nautilus
kill_program blueman-applet
kill_program network-manager-applet
gnome-keyring-daemon --start --components=pkcs11 &
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
@@ -48,9 +60,25 @@ dunst &
sxhkd &
nautilus &
transgui &
blueman-applet &
network-manager-applet &
dex -a
libinput-gestures-setup restart
[[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap
# Elan input setting
xinput set-prop 'Elan Touchpad' 'libinput Tapping Enabled' 1
xinput set-prop 'Elan Touchpad' 'libinput Natural Scrolling Enabled' 1
xinput set-prop 'Elan TrackPoint' 'libinput Accel Speed' -0.3
# Magic Trackpad 2
xinput set-prop 'Apple Inc. Magic Trackpad 2' 'libinput Natural Scrolling Enabled' 1
xinput set-prop 'Apple Inc. Magic Trackpad 2' 'libinput Accel Speed' 0.5
# Macbook Pro Trackpad
xinput set-prop "bcm5974" "libinput Natural Scrolling Enabled" 1
xinput set-prop "bcm5974" "libinput Accel Speed" 0.5
# Logitech G402
xinput set-prop 'Logitech Gaming Mouse G402' 'libinput Accel Speed' -0.8
# Logitech G102
xinput set-prop 'Logitech G102 LIGHTSYNC Gaming Mouse' 'libinput Natural Scrolling Enabled' 1
xinput set-prop 'Logitech G102 LIGHTSYNC Gaming Mouse' 'libinput Accel Speed' -0.5

View File

@@ -0,0 +1,20 @@
#!/bin/bash
bspc subscribe node_add | while read -r _ _ desktop _ node; do
num=$(bspc query -N -d $desktop | grep -f <(bspc query -N -n .leaf) | wc -l)
if [ $num = "1" ];then
xprop -id "$node" -f _PICOM_ROUNDED 32c -set _PICOM_ROUNDED 0
else
bspc query -N -d | while read -r node; do
xprop -id "$node" -remove _PICOM_ROUNDED
done
fi
done &
bspc subscribe node_remove | while read -r _ _ desktop _ node; do
num=$(bspc query -N -d $desktop | grep -f <(bspc query -N -n .leaf) | wc -l)
if [ $num = "1" ];then
bspc query -N -d | while read -r node; do
xprop -id "$node" -f _PICOM_ROUNDED 32c -set _PICOM_ROUNDED 0
done
fi
done &

View File

@@ -9,3 +9,4 @@ BROWSER DEFAULT=google-chrome-stable
QT_STYLE_OVERRIDE DEFAULT=GTK+
QT_QPA_PLATFORMTHEME DEFAULT=gtk2
GDK_SCALE DEFAULT=1

View File

@@ -31,8 +31,9 @@ alert = #ccbd2c40
[bar/mybar]
;monitor = ${env:MONITOR:HDMI-1}
dpi = ${env:DPI:96}
width = 100%
height = 27
height = ${env:POLYBAR_HEIGHT}
offset-x = 0%
offset-y = 0%
radius = 0.0
@@ -63,6 +64,8 @@ modules-right = mpd pulseaudio eth wlan battery date
tray-position = right
tray-padding = 2
tray-scale = 1.0
tray-maxsize = 32
cursor-click = pointer
cursor-scroll = ns-resize
@@ -71,7 +74,7 @@ cursor-scroll = ns-resize
type = custom/text
content = "  Arch Linux"
content-foreground = ${colors.secondary}
click-left=rofi -show combi
click-left=rofi -show combi -dpi $DPI
[module/xwindow]
type = internal/xwindow

View File

@@ -25,7 +25,7 @@
lightfg: rgba ( 88, 104, 117, 100 % );
selected-normal-background: @bordercolor;
border-color: @bordercolor;
spacing: 2;
spacing: 1mm;
separatorcolor: @bordercolor;
urgent-background: rgba ( 0, 0, 0, 0 % );
selected-urgent-background: rgba ( 255, 153, 153, 100 % );
@@ -37,33 +37,37 @@
}
#window {
background-color: @background;
border: 1;
border-radius: 10;
padding: 5;
border: 0.5mm;
border-radius: 5mm;
padding: 2.5mm;
}
#mainbox {
border: 0;
padding: 0;
}
#message {
border: 1px dash 0px 0px ;
border: 1mm dash 0px 0px ;
border-color: @separatorcolor;
padding: 1px ;
padding: 1mm ;
}
#textbox {
text-color: @foreground;
}
#listview {
fixed-height: 0;
border: 2px solid 0px 0px ;
border: 1mm solid 0px 0px ;
border-color: @separatorcolor;
spacing: 2px ;
spacing: 1mm ;
scrollbar: true;
padding: 2px 0px 0px ;
padding: 1mm 0px 0px ;
}
#element-icon {
size: 5mm;
padding: 0 5mm;
}
#element {
border: 0;
padding: 10px 1px;
padding: 3mm 0.5mm;
}
#element.normal.normal {
background-color: @normal-background;
@@ -102,14 +106,14 @@
text-color: @alternate-active-foreground;
}
#scrollbar {
width: 4px ;
width: 2mm ;
border: 0;
handle-width: 8px ;
handle-width: 4mm ;
padding: 0;
handle-color: @bordercolor;
}
#sidebar {
border: 2px dash 0px 0px ;
border: 1mm dash 0px 0px ;
border-color: @separatorcolor;
}
#button.selected {
@@ -119,7 +123,7 @@
#inputbar {
spacing: 0;
text-color: @normal-foreground;
padding: 1px ;
padding: 2.5mm ;
}
#case-indicator {
spacing: 0;

View File

@@ -8,7 +8,7 @@ super + Return
# program launcher
super + @space
rofi -show combi
rofi -show combi -dpi $DPI
# make sxhkd reload its configuration files:
super + Escape
@@ -130,7 +130,7 @@ super + {Left,Down,Up,Right}
super + p
bspc node -g sticky; \
bspc node --state \~floating; \
xdotool getactivewindow windowsize 640 360 windowmove $(expr 1920 - 640 - 45) $(expr 1080 - 360 - 30)
xdotool getactivewindow windowsize $(expr 512 \* $SCALE) $(expr 288 \* $SCALE) windowmove $(expr $XSIZE - $(expr 512 + 45) \* $SCALE) $(expr $YSIZE - $(expr 288 + 30) \* $SCALE)
XF86AudioMute
@@ -141,3 +141,15 @@ XF86AudioLowerVolume
XF86AudioRaiseVolume
pactl set-sink-volume @DEFAULT_SINK@ +5%
XF86MonBrightnessUp
xbacklight -ctrl gmux_backlight -inc 5
XF86MonBrightnessDown
xbacklight -ctrl gmux_backlight -dec 5
XF86KbdBrightnessUp
xbacklight -ctrl smc::kbd_backlight -inc 10
XF86KbdBrightnessDown
xbacklight -ctrl smc::kbd_backlight -dec 10

View File

@@ -2,4 +2,10 @@
[[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap
[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources
export DPI=$(xrdb -query | grep "dpi" | cut -f 2)
export SCALE=$GDK_SCALE
export POLYBAR_HEIGHT=$(echo 27 \* $SCALE | bc)
export XSIZE=$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f1)
export YSIZE=$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f2)
exec bspwm