From ec36193ef9dc414e9093404af46fbfbf670322d8 Mon Sep 17 00:00:00 2001 From: Jisu Kim Date: Thu, 23 Jul 2020 11:32:09 +0900 Subject: [PATCH] Refactoring --- linux-hidpi/bspwm/bspwmrc | 82 ------- linux-hidpi/dconf/user | Bin 11411 -> 10971 bytes linux-hidpi/polybar/config | 213 ------------------ linux-hidpi/rofi/config.rasi | 9 - linux-hidpi/rofi/numix.rasi | 144 ------------ linux-hidpi/sxhkd/sxhkdrc | 155 ------------- linux/Code/User/settings.json | 7 +- linux/Xresources | 1 + linux/bspwm/bspwmrc | 44 +++- .../bspwm/set_subscribers.sh | 0 linux/pam_environment | 1 + linux/polybar/config | 7 +- linux/rofi/numix.rasi | 32 +-- linux/sxhkd/sxhkdrc | 16 +- linux/xinitrc | 6 + mapping.ts | 7 +- 16 files changed, 87 insertions(+), 637 deletions(-) delete mode 100755 linux-hidpi/bspwm/bspwmrc delete mode 100644 linux-hidpi/polybar/config delete mode 100644 linux-hidpi/rofi/config.rasi delete mode 100644 linux-hidpi/rofi/numix.rasi delete mode 100644 linux-hidpi/sxhkd/sxhkdrc create mode 100644 linux/Xresources rename {linux-hidpi => linux}/bspwm/set_subscribers.sh (100%) diff --git a/linux-hidpi/bspwm/bspwmrc b/linux-hidpi/bspwm/bspwmrc deleted file mode 100755 index f606255..0000000 --- a/linux-hidpi/bspwm/bspwmrc +++ /dev/null @@ -1,82 +0,0 @@ -#! /bin/sh - -function kill_program { - if ps -A | grep $1; then - killall -q $1 - fi -} - - -bspc monitor -d      - -bspc config border_width $(echo 1 \* $GDK_SCALE | bc) -bspc config window_gap $(echo 12 \* $GDK_SCALE | bc) - -bspc config split_ratio 0.52 -bspc config borderless_monocle true -bspc config gapless_monocle true -bspc config single_monocle true -bspc config focus_follows_pointer true -bspc config focused_border_color '#eb564d' -bspc config normal_border_color '#ccc' - -bspc rule -a Nextcloud desktop='^1' state=floating follow=on -bspc rule -a "*:transgui" desktop='^1' state=floating follow=on -bspc rule -a TelegramDesktop desktop='^1' state=floating follow=on -bspc rule -a Google-chrome desktop='^3' follow=on -bspc rule -a Code desktop='^4' follow=on -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 - -# 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 -kill_program polybar -kill_program dunst -kill_program polkit-gnome-authentication-agent-1 -kill_program gsd-xsettings -kill_program nautilus -kill_program blueman-applet - -gnome-keyring-daemon --start --components=pkcs11 & -/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & -/usr/lib/gsd-xsettings & -xsetroot -cursor_name left_ptr -picom --experimental-backends & -polybar mybar & -fcitx5 & -dunst & -sxhkd & -nautilus & -transgui & -blueman-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' -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 100644 index d2e528d..0000000 --- a/linux-hidpi/polybar/config +++ /dev/null @@ -1,213 +0,0 @@ -;========================================================== -; -; -; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ -; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ -; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ -; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ -; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ -; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ -; -; -; To learn more about how to configure Polybar -; go to https://github.com/polybar/polybar -; -; The README contains a lot of information -; -;========================================================== - -[colors] -;background = ${xrdb:color0:#222} -background = #cc000000 -background-focused = #ccdd5555 -background-label = #cc000000 -;foreground = ${xrdb:color7:#222} -foreground = #ccc -foreground-focused = #fff -foreground-alt = #ccc -primary = #ffb52a -secondary = #dd5555 -alert = #ccbd2c40 - -[bar/mybar] -;monitor = ${env:MONITOR:HDMI-1} -dpi = 192 -width = 100% -height = 54 -offset-x = 0% -offset-y = 0% -radius = 0.0 -fixed-center = false -wm-restack = bspwm - -background = ${colors.background} -foreground = ${colors.foreground} - -line-size = 3 -line-color = #f00 - -border-size = 0 -border-color = #00000000 - -padding-left = 0 -padding-right = 0 - -module-margin-left = 1 -module-margin-right = 2 - -font-0 = TerminessTTF Nerd Font:size=10;1 -font-1 = NanumBarunGothic:size=8;1 - -modules-left = logo bspwm -modules-center = xwindow -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 - -[module/logo] -type = custom/text -content = "  Arch Linux" -content-foreground = ${colors.secondary} -click-left=rofi -show combi - -[module/xwindow] -type = internal/xwindow -label = %title:0:50:...% - -[module/bspwm] -type = internal/bspwm - -label-focused = "%name% " -label-focused-background = ${colors.background-focused} -label-focused-foreground = ${colors.foreground-focused} -# label-focused-underline= ${colors.primary} -label-focused-padding = 2 - -label-occupied = %name% :%index% -label-occupied-background = ${colors.background-label} -label-occupied-padding = 2 - -label-urgent = %name% :%index%! -label-urgent-background = ${colors.alert} -label-urgent-padding = 2 - -label-empty = %name% :%index% -label-empty-background = ${colors.background-label} -label-empty-foreground = #888888 -label-empty-padding = 2 - -[module/wlan] -type = internal/network -interface = wlp2s0 -interval = 3.0 - -format-connected = -format-connected-underline = #9f78e1 -label-connected = %essid% - -format-disconnected = -;format-disconnected = -;format-disconnected-underline = ${self.format-connected-underline} -;label-disconnected = %ifname% disconnected -;label-disconnected-foreground = ${colors.foreground-alt} - -ramp-signal-0 =  -ramp-signal-1 =  -ramp-signal-2 =  -ramp-signal-3 =  -ramp-signal-4 =  -ramp-signal-foreground = ${colors.foreground-alt} - -[module/eth] -type = internal/network -interface = enp3s0 -interval = 3.0 - -format-connected-underline = #55aa55 -format-connected-prefix = " " -format-connected-prefix-foreground = ${colors.foreground-alt} -label-connected = %local_ip% - -format-disconnected = -;format-disconnected = -;format-disconnected-underline = ${self.format-connected-underline} -;label-disconnected = %ifname% disconnected -;label-disconnected-foreground = ${colors.foreground-alt} - -[module/date] -type = internal/date -interval = 5 - -date = " %Y年%m月%d日 %A" - -time = %{F#dd5555}%{F-} %H時%M分 - -format-prefix = "" -format-prefix-foreground = ${colors.secondary} -#format-underline = ${colors.secondary} - -label = %date% %time% - -[module/pulseaudio] -type = internal/pulseaudio - -format-volume = -#format-volume-underline = ${colors.secondary} -label-volume = %percentage%% -label-volume-foreground = ${root.foreground} - -label-muted = 婢 muted -label-muted-foreground = #666 - -ramp-volume-0 = 奄 -ramp-volume-1 = 奔 -ramp-volume-2 = 墳 -ramp-volume-foreground = ${colors.secondary} - -[module/battery] -type = internal/battery -battery = BAT0 -adapter = AC -full-at = 98 - -label-charging = %percentage%% -label-discharging = %percentage%% -;label-full = - -format-charging-prefix = " " -format-charging-prefix-foreground = ${colors.secondary} -format-charging = -#format-charging-underline = ${colors.secondary} - -format-discharging = -#format-discharging-underline = ${self.format-charging-underline} - -format-full = -;format-full-underline = ${colors.secondary} - -ramp-capacity-0 = " " -ramp-capacity-1 = " " -ramp-capacity-2 = " " -ramp-capacity-3 = " " -ramp-capacity-4 = " " -ramp-capacity-foreground = ${colors.secondary} - -[settings] -screenchange-reload = true -;compositing-background = xor -;compositing-background = screen -;compositing-foreground = source -;compositing-border = over -;pseudo-transparency = false - -[global/wm] -margin-top = 0 -margin-bottom = 0 - -; vim:ft=dosini diff --git a/linux-hidpi/rofi/config.rasi b/linux-hidpi/rofi/config.rasi deleted file mode 100644 index 2be4195..0000000 --- a/linux-hidpi/rofi/config.rasi +++ /dev/null @@ -1,9 +0,0 @@ -configuration { - font: "TerminessTTF Nerd Font 14"; - show-icons: true; - icon-theme: "Numix-Circle"; - combi-modi: "window,drun,ssh"; - theme: "numix"; - lines: 5; - dpi: 192; -} diff --git a/linux-hidpi/rofi/numix.rasi b/linux-hidpi/rofi/numix.rasi deleted file mode 100644 index 5e80810..0000000 --- a/linux-hidpi/rofi/numix.rasi +++ /dev/null @@ -1,144 +0,0 @@ -/** - * ROFI Color theme - * User: JT (adpated from lb by Qball) - * Copyright: Dave Davenport - */ - -* { - selected-normal-foreground: @foreground; - foreground: #FFFFFF; - normal-foreground: @foreground; - alternate-normal-background: rgba ( 255, 255, 255, 7 % ); - red: rgba ( 220, 50, 47, 100 % ); - selected-urgent-foreground: rgba ( 51, 51, 51, 100 % ); - blue: rgba ( 38, 139, 210, 100 % ); - urgent-foreground: rgba ( 255, 153, 153, 100 % ); - alternate-urgent-background: rgba ( 255, 255, 255, 7 % ); - active-foreground: @bordercolor; - lightbg: rgba ( 238, 232, 213, 100 % ); - selected-active-foreground: @foreground; - alternate-active-background: rgba ( 255, 255, 255, 7 % ); - background: rgba ( 21, 21, 21, 80 % ); - bordercolor: rgba ( 235, 86, 77, 100 % ); - alternate-normal-foreground: @foreground; - normal-background: rgba ( 0, 0, 0, 0 % ); - lightfg: rgba ( 88, 104, 117, 100 % ); - selected-normal-background: @bordercolor; - border-color: @bordercolor; - spacing: 4; - separatorcolor: @bordercolor; - urgent-background: rgba ( 0, 0, 0, 0 % ); - selected-urgent-background: rgba ( 255, 153, 153, 100 % ); - alternate-urgent-foreground: @urgent-foreground; - background-color: rgba ( 0, 0, 0, 0 % ); - alternate-active-foreground: @active-foreground; - active-background: rgba ( 0, 0, 0, 0 % ); - selected-active-background: @bordercolor; -} -#window { - background-color: @background; - border: 2; - border-radius: 20; - padding: 10; -} -#mainbox { - border: 0; - padding: 0; -} -#message { - border: 4px dash 0px 0px ; - border-color: @separatorcolor; - padding: 4px ; -} -#textbox { - text-color: @foreground; -} -#listview { - fixed-height: 0; - border: 4px solid 0px 0px ; - border-color: @separatorcolor; - spacing: 4px ; - scrollbar: true; - padding: 4px 0px 0px ; -} -#element { - border: 0; - padding: 20px 2px; -} -#element.normal.normal { - background-color: @normal-background; - text-color: @normal-foreground; -} -#element.normal.urgent { - background-color: @urgent-background; - text-color: @urgent-foreground; -} -#element.normal.active { - background-color: @active-background; - text-color: @active-foreground; -} -#element.selected.normal { - background-color: @selected-normal-background; - text-color: @selected-normal-foreground; -} -#element.selected.urgent { - background-color: @selected-urgent-background; - text-color: @selected-urgent-foreground; -} -#element.selected.active { - background-color: @selected-active-background; - text-color: @selected-active-foreground; -} -#element.alternate.normal { - background-color: @alternate-normal-background; - text-color: @alternate-normal-foreground; -} -#element.alternate.urgent { - background-color: @alternate-urgent-background; - text-color: @alternate-urgent-foreground; -} -#element.alternate.active { - background-color: @alternate-active-background; - text-color: @alternate-active-foreground; -} -#scrollbar { - width: 8px ; - border: 0; - handle-width: 16px ; - padding: 0; - handle-color: @bordercolor; -} -#sidebar { - border: 4px dash 0px 0px ; - border-color: @separatorcolor; -} -#button.selected { - background-color: @selected-normal-background; - text-color: @selected-normal-foreground; -} -#inputbar { - spacing: 0; - text-color: @normal-foreground; - padding: 10px ; -} -#case-indicator { - spacing: 0; - text-color: @normal-foreground; -} -#entry { - spacing: 0; - text-color: @normal-foreground; -} -#prompt { - spacing: 0; - text-color: @normal-foreground; -} -#inputbar { - children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; -} -#textbox-prompt-colon { - expand: false; - str: ":"; - margin: 0px 0.3em 0em 0em ; - text-color: @normal-foreground; -} diff --git a/linux-hidpi/sxhkd/sxhkdrc b/linux-hidpi/sxhkd/sxhkdrc deleted file mode 100644 index ec38a6c..0000000 --- a/linux-hidpi/sxhkd/sxhkdrc +++ /dev/null @@ -1,155 +0,0 @@ -# -# wm independent hotkeys -# - -# terminal emulator -super + Return - alacritty - -# program launcher -super + @space - rofi -show combi - -# make sxhkd reload its configuration files: -super + Escape - pkill -USR1 -x sxhkd - -# screen capture -super + ctrl + shift + {3,4} - maim -u { ~/Pictures/screenshot.png ,-s | xclip -selection clipboard -t image/png } - -# -# bspwm hotkeys -# - -# quit/restart bspwm -super + alt + {q,r} - bspc {quit,wm -r} - -# close and kill -super + {_,shift + }w - bspc node -{c,k} - -# alternate between the tiled and monocle layout -super + m - bspc desktop -l next - -# send the newest marked node to the newest preselected node -super + y - bspc node newest.marked.local -n newest.!automatic.local - -# swap the current node and the biggest node -super + g - bspc node -s biggest - -# -# state/flags -# - -# set the window state -super + {t,shift + t, f,shift + f} - bspc node -t {tiled,pseudo_tiled,floating,fullscreen} - -super + s - bspc node -g sticky - -super + shift + p - bspc node --state \~pseudo_tiled - -# -# 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 + {p,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 next/previous desktop in the current monitor -super + bracket{left,right} - bspc desktop -f {prev,next}.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 + ctrl + {h,j,k,l} - bspc node -p {west,south,north,east} - -# preselect the ratio -super + ctrl + {1-9} - bspc node -o 0.{1-9} - -# cancel the preselection for the focused node -super + ctrl + space - bspc node -p cancel - -# cancel the preselection for the focused desktop -super + ctrl + shift + space - bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel - -# -# move/resize -# - -# expand a window by moving one of its side outward -super + alt + {h,j,k,l} - bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0} - -# contract a window by moving one of its side inward -super + alt + shift + {h,j,k,l} - bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0} - -# move a floating window -super + {Left,Down,Up,Right} - bspc node -v {-20 0,0 20,0 -20,20 0} - -# toggle pip mode -super + p - bspc node -g sticky; \ - bspc node --state \~floating; \ - xdotool getactivewindow windowsize 1024 576 windowmove $(expr 2880 - 1024 - 90) $(expr 1800 - 576 - 60) - - -XF86AudioMute - pactl set-sink-mute @DEFAULT_SINK@ toggle - -XF86AudioLowerVolume - pactl set-sink-volume @DEFAULT_SINK@ -5% - -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 diff --git a/linux/Code/User/settings.json b/linux/Code/User/settings.json index 21cfbc4..ae0729b 100644 --- a/linux/Code/User/settings.json +++ b/linux/Code/User/settings.json @@ -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": { "": false }, - "editor.fontSize": 14 + "editor.fontSize": 14, + "javascript.updateImportsOnFileMove.enabled": "always" } diff --git a/linux/Xresources b/linux/Xresources new file mode 100644 index 0000000..a8dc5ef --- /dev/null +++ b/linux/Xresources @@ -0,0 +1 @@ +Xft.dpi: 96 diff --git a/linux/bspwm/bspwmrc b/linux/bspwm/bspwmrc index f8939c0..c518fd0 100755 --- a/linux/bspwm/bspwmrc +++ b/linux/bspwm/bspwmrc @@ -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 + diff --git a/linux-hidpi/bspwm/set_subscribers.sh b/linux/bspwm/set_subscribers.sh similarity index 100% rename from linux-hidpi/bspwm/set_subscribers.sh rename to linux/bspwm/set_subscribers.sh diff --git a/linux/pam_environment b/linux/pam_environment index a956b93..f106b4b 100644 --- a/linux/pam_environment +++ b/linux/pam_environment @@ -9,3 +9,4 @@ BROWSER DEFAULT=google-chrome-stable QT_STYLE_OVERRIDE DEFAULT=GTK+ QT_QPA_PLATFORMTHEME DEFAULT=gtk2 +GDK_SCALE DEFAULT=1 \ No newline at end of file diff --git a/linux/polybar/config b/linux/polybar/config index 456db52..985b554 100644 --- a/linux/polybar/config +++ b/linux/polybar/config @@ -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 diff --git a/linux/rofi/numix.rasi b/linux/rofi/numix.rasi index 5eb6810..a22a417 100644 --- a/linux/rofi/numix.rasi +++ b/linux/rofi/numix.rasi @@ -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; diff --git a/linux/sxhkd/sxhkdrc b/linux/sxhkd/sxhkdrc index 4a6d6b1..312ef77 100644 --- a/linux/sxhkd/sxhkdrc +++ b/linux/sxhkd/sxhkdrc @@ -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 diff --git a/linux/xinitrc b/linux/xinitrc index b0bc599..7512222 100644 --- a/linux/xinitrc +++ b/linux/xinitrc @@ -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 diff --git a/mapping.ts b/mapping.ts index a352a93..78a9928 100644 --- a/mapping.ts +++ b/mapping.ts @@ -20,7 +20,7 @@ const linux: DotOption = { fcitx5 fcitx5-qt fcitx5-gtk fcitx5-hangul fcitx5-anthy kcm-fcitx5 numix-gtk-theme-git numix-circle-icon-theme-git telegram-desktop nautilus eog smplayer smplayer-skin transgui-qt - qt5-styleplugins xdg-user-dirs slim`, + qt5-styleplugins xdg-user-dirs slim network-manager-applet`, ], link: { ...common.link, @@ -41,6 +41,7 @@ const linux: DotOption = { ".pam_environment": "linux/pam_environment", ".zshrc": "linux/zshrc", ".Xmodmap": "linux/Xmodmap", + ".Xresources": "linux/Xresources", }, }; @@ -49,11 +50,7 @@ const linuxHiDPI: DotOption = { hostname: "MBP", link: { ...linux.link, - ".config/bspwm": "linux-hidpi/bspwm", ".config/dconf": "linux-hidpi/dconf", - ".config/polybar": "linux-hidpi/polybar", - ".config/rofi": "linux-hidpi/rofi", - ".config/sxhkd": "linux-hidpi/sxhkd", ".config/dunst": "linux-hidpi/dunst", ".config/picom": "linux-hidpi/picom", ".pam_environment": "linux-hidpi/pam_environment",