aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mango/binds.conf154
-rw-r--r--mango/config.conf182
-rw-r--r--mango/left_home.conf2
-rw-r--r--nvim/lua/plugins/colorscheme.lua1
-rwxr-xr-xscripts/preview2
-rw-r--r--waybar/config.jsonc90
-rw-r--r--waybar/style.css75
-rw-r--r--zsh/default_zshalias5
-rw-r--r--zsh/default_zshenv1
9 files changed, 510 insertions, 2 deletions
diff --git a/mango/binds.conf b/mango/binds.conf
new file mode 100644
index 0000000..087744c
--- /dev/null
+++ b/mango/binds.conf
@@ -0,0 +1,154 @@
+# Key Bindings
+# key name refer to `xev` or `wev` command output,
+# mod keys name: super,ctrl,alt,shift,none
+
+# reload config
+bind=SUPER,r,reload_config
+
+# menu and terminal
+bind=Alt,space,spawn,rofi -show drun
+bind=Alt,Return,spawn,wezterm
+
+# exit
+bind=ALT+SHIFT,q,quit
+bind=ALT,q,killclient,
+
+# switch window focus
+bind=SUPER,Tab,focusstack,next
+bind=ALT,h,focusdir,left
+bind=ALT,l,focusdir,right
+bind=ALT,k,focusdir,up
+bind=ALT,j,focusdir,down
+
+# swap window
+bind=Alt+SHIFT,k,exchange_client,up
+bind=Alt+SHIFT,j,exchange_client,down
+bind=Alt+SHIFT,h,exchange_client,left
+bind=Alt+SHIFT,l,exchange_client,right
+
+# switch window status
+bind=SUPER,g,toggleglobal,
+bind=ALT,Tab,togglejump,
+bind=ALT,backslash,togglefloating,
+bind=ALT,a,togglemaximizescreen,
+bind=ALT,f,togglefullscreen,
+bind=ALT+SHIFT,f,togglefakefullscreen,
+bind=SUPER,m,minimized,
+bind=SUPER,o,toggleoverlay,
+bind=SUPER+SHIFT,m,restore_minimized
+bind=ALT,z,toggle_scratchpad
+
+# scroller layout
+bind=ALT,e,set_proportion,1.0
+bind=ALT,x,switch_proportion_preset,
+bind=alt+super+ctrl,Left,scroller_stack,left
+bind=alt+super+ctrl,Right,scroller_stack,right
+bind=alt+super+ctrl,Up,scroller_stack,up
+bind=alt+super+ctrl,Down,scroller_stack,down
+
+#dwindle layout(manual split mode)
+bind=alt+shift,Return,dwindle_toggle_split_direction
+
+# switch layout
+bind=SUPER,n,switch_layout
+
+# tag switch
+bind=SUPER,Left,viewtoleft,0
+bind=CTRL,Left,viewtoleft_have_client,0
+bind=SUPER,Right,viewtoright,0
+bind=CTRL,Right,viewtoright_have_client,0
+bind=CTRL+SUPER,Left,tagtoleft,0
+bind=CTRL+SUPER,Right,tagtoright,0
+
+bind=Alt,1,view,1,0
+bind=Alt,2,view,2,0
+bind=Alt,3,view,3,0
+bind=Alt,4,view,4,0
+bind=Alt,5,view,5,0
+bind=Alt,6,view,6,0
+bind=Alt,7,view,7,0
+bind=Alt,8,view,8,0
+bind=Alt,9,view,9,0
+
+# tag: move client to the tag and focus it
+# tagsilent: move client to the tag and not focus it
+# bind=Alt,1,tagsilent,1
+bind=Alt+Shift,1,tag,1,0
+bind=Alt+Shift,2,tag,2,0
+bind=Alt+Shift,3,tag,3,0
+bind=Alt+Shift,4,tag,4,0
+bind=Alt+Shift,5,tag,5,0
+bind=Alt+Shift,6,tag,6,0
+bind=Alt+Shift,7,tag,7,0
+bind=Alt+Shift,8,tag,8,0
+bind=Alt+Shift,9,tag,9,0
+
+# monitor switch
+bind=alt,code:59,focusmon,left # alt + , like dwm
+bind=alt,code:60,focusmon,right # alt + . like dwm
+bind=Alt+Shift,code:59,tagmon,left # alt + < like dwm
+bind=Alt+Shift,code:60,tagmon,right # alt + > like dwm
+
+# gaps
+bind=ALT+SHIFT,X,incgaps,1
+bind=ALT+SHIFT,Z,incgaps,-1
+bind=ALT+SHIFT,R,togglegaps
+
+# waybar
+bind=CTRL+ALT,b,spawn,pkill -SIGUSR1 waybar
+
+# movewin
+bind=CTRL+SHIFT,Up,movewin,+0,-50
+bind=CTRL+SHIFT,Down,movewin,+0,+50
+bind=CTRL+SHIFT,Left,movewin,-50,+0
+bind=CTRL+SHIFT,Right,movewin,+50,+0
+
+# resizewin
+bind=CTRL+ALT,Up,resizewin,+0,-50
+bind=CTRL+ALT,Down,resizewin,+0,+50
+bind=CTRL+ALT,Left,resizewin,-50,+0
+bind=CTRL+ALT,Right,resizewin,+50,+0
+
+# Mouse Button Bindings
+# btn_left and btn_right can't bind none mod key
+mousebind=SUPER,btn_left,moveresize,curmove
+#mousebind=NONE,btn_middle,togglemaximizescreen,0
+mousebind=SUPER,btn_right,moveresize,curresize
+
+
+# Axis Bindings
+axisbind=SUPER,UP,viewtoleft_have_client
+axisbind=SUPER,DOWN,viewtoright_have_client
+
+# Gesture Bindings
+gesturebind=none,left,3,focusdir,left
+gesturebind=none,right,3,focusdir,right
+gesturebind=none,up,3,focusdir,up
+gesturebind=none,down,3,focusdir,down
+gesturebind=none,right,4,viewprev_have_client
+gesturebind=none,left,4,viewnext_have_client
+gesturebind=none,up,4,enteroverview
+gesturebind=none,down,4,leaveoverview
+
+# media/sound keys
+bind=none,XF86AudioPlay,spawn,playerctl play-pause
+bind=shift,XF86AudioPlay,spawn,playerctl -a pause
+bind=none,XF86AudioNext,spawn,playerctl next
+bind=none,XF86AudioPrev,spawn,playerctl previous
+bind=none,XF86AudioMute,spawn,wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
+bind=none,XF86AudioMicMute,spawn,wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
+bind=none,XF86AudioRaiseVolume,spawn,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
+bind=none,XF86AudioLowerVolume,spawn,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
+bind=shift,XF86AudioRaiseVolume,spawn,wpctl set-volume @DEFAULT_AUDIO_SINK@ 10%+
+bind=shift,XF86AudioLowerVolume,spawn,wpctl set-volume @DEFAULT_AUDIO_SINK@ 10%-
+
+# brightness
+#
+
+
+#disable keybind mode
+bind=SUPER,Escape,setkeymode,disabled
+
+keymode=disabled
+bind=NONE,Escape,setkeymode,default
+bind=NONE,q,setkeymode,default
diff --git a/mango/config.conf b/mango/config.conf
new file mode 100644
index 0000000..3a9a0ef
--- /dev/null
+++ b/mango/config.conf
@@ -0,0 +1,182 @@
+# More option see https://github.com/DreamMaoMao/mango/wiki/
+
+# Window effect
+blur=0
+blur_layer=0
+blur_optimized=1
+blur_params_num_passes = 2
+blur_params_radius = 5
+blur_params_noise = 0.02
+blur_params_brightness = 0.9
+blur_params_contrast = 0.9
+blur_params_saturation = 1.2
+
+shadows = 0
+layer_shadows = 0
+shadow_only_floating = 1
+shadows_size = 10
+shadows_blur = 15
+shadows_position_x = 0
+shadows_position_y = 0
+shadowscolor= 0x000000ff
+
+border_radius=6
+no_radius_when_single=0
+focused_opacity=1.0
+unfocused_opacity=1.0
+
+dim_enable=0
+dim_focused_color=0x00000000
+dim_unfocused_color=0x00000055
+
+# Animation Configuration(support type:zoom,slide)
+# tag_animation_direction: 1-horizontal,0-vertical
+animations=1
+layer_animations=1
+animation_type_open=slide
+animation_type_close=slide
+animation_fade_in=1
+animation_fade_out=1
+tag_animation_direction=1
+zoom_initial_ratio=0.4
+zoom_end_ratio=0.8
+fadein_begin_opacity=0.5
+fadeout_begin_opacity=0.8
+animation_duration_move=500
+animation_duration_open=400
+animation_duration_tag=350
+animation_duration_close=800
+animation_duration_focus=0
+animation_curve_open=0.46,1.0,0.29,1
+animation_curve_move=0.46,1.0,0.29,1
+animation_curve_tag=0.46,1.0,0.29,1
+animation_curve_close=0.08,0.92,0,1
+animation_curve_focus=0.46,1.0,0.29,1
+animation_curve_opafadeout=0.5,0.5,0.5,0.5
+animation_curve_opafadein=0.46,1.0,0.29,1
+
+# Scroller Layout Setting
+scroller_structs=20
+scroller_default_proportion=0.8
+scroller_focus_center=0
+scroller_prefer_center=0
+edge_scroller_pointer_focus=1
+edge_scroller_focus_allow_speed=0.0
+scroller_default_proportion_single=1.0
+scroller_proportion_preset=0.5,0.8,1.0
+
+# Master-Stack Layout Setting
+new_is_master=1
+default_mfact=0.55
+default_nmaster=1
+tag_num=9
+smartgaps=1
+
+# Dwindle Layout Setting
+dwindle_smart_split=0
+dwindle_drop_simple_split=1
+dwindle_manual_split=0
+dwindle_hsplit=1
+dwindle_vsplit=1
+dwindle_preserve_split=0
+
+# Overview Setting
+hotarea_size=10
+enable_hotarea=0
+hotarea_disable_on_fullscreen=1
+overviewgappi=5
+overviewgappo=30
+overcircle_center_ratio=0.5
+
+# Misc
+no_border_when_single=1
+axis_bind_apply_timeout=100
+focus_on_activate=1
+idleinhibit_ignore_visible=0
+idleinhibit_when_fullscreen=0
+sloppyfocus=1
+warpcursor=1
+focus_cross_monitor=0
+focusdir_only_zone_overlap=1
+focus_cross_tag=0
+enable_floating_snap=0
+snap_distance=30
+float_full_to_top=0
+cursor_size=24
+drag_tile_to_tile=1
+drag_tile_small=1
+
+# keyboard
+repeat_rate=25
+repeat_delay=600
+numlockon=0
+xkb_rules_layout=us
+
+# Trackpad
+# need relogin to make it apply
+disable_trackpad=0
+tap_to_click=1
+tap_and_drag=1
+drag_lock=1
+trackpad_natural_scrolling=0
+trackpad_disable_while_typing=1
+trackpad_left_handed=0
+trackpad_middle_button_emulation=0
+swipe_min_threshold=1
+
+# mouse
+# need relogin to make it apply
+mouse_natural_scrolling=0
+
+# Appearance
+gappih=5
+gappiv=5
+gappoh=10
+gappov=10
+scratchpad_width_ratio=0.8
+scratchpad_height_ratio=0.9
+borderpx=4
+rootcolor=0x201b14ff
+bordercolor=0x444444ff
+dropcolor=0x8FBA7C55
+splitcolor=0xEB441EFF
+focuscolor=0xc9b890ff
+maximizescreencolor=0x89aa61ff
+urgentcolor=0xad401fff
+scratchpadcolor=0x516c93ff
+globalcolor=0xb153a7ff
+overlaycolor=0x14a57cff
+
+# layout support:
+# tile,scroller,grid,deck,monocle,center_tile,vertical_tile,vertical_scroller
+tagrule=id:1,layout_name:tile
+tagrule=id:2,layout_name:tile
+tagrule=id:3,layout_name:tile
+tagrule=id:4,layout_name:tile
+tagrule=id:5,layout_name:tile
+tagrule=id:6,layout_name:tile
+tagrule=id:7,layout_name:tile
+tagrule=id:8,layout_name:tile
+tagrule=id:9,layout_name:tile
+
+# key bindings
+source=~/.config/mango/binds.conf
+
+# layer rule
+layerrule=animation_type_open:zoom,layer_name:rofi
+layerrule=animation_type_close:zoom,layer_name:rofi
+
+# window rules
+windowrule=allow_csd:1,appid:firefox
+
+# monitors
+source=~/.config/mango/left_home.conf # laptop-spectre setup
+
+# env vars
+#env=
+
+# graphical daemons
+exec-once=awww-daemon
+exec-once=pipewire
+exec-once=waybar
+exec-once=gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
diff --git a/mango/left_home.conf b/mango/left_home.conf
new file mode 100644
index 0000000..00ab00d
--- /dev/null
+++ b/mango/left_home.conf
@@ -0,0 +1,2 @@
+monitorrule=name:^HDMI-A-2.*,model:C24,refresh:120,width:1920,height:1080,primary:1,x:1920,y:0
+monitorrule=name:^eDP-1,width:1920,height:1080,x:0,y:0
diff --git a/nvim/lua/plugins/colorscheme.lua b/nvim/lua/plugins/colorscheme.lua
index dffc11e..32d208b 100644
--- a/nvim/lua/plugins/colorscheme.lua
+++ b/nvim/lua/plugins/colorscheme.lua
@@ -67,5 +67,6 @@ local colorschemes = {
local colorsProfiles = require("profiles").createProfiles(colorschemes.catppuccin)
colorsProfiles["nest"] = colorschemes.darkearth
+colorsProfiles["cage"] = colorschemes.darkearth
return colorsProfiles[HOSTNAME]
diff --git a/scripts/preview b/scripts/preview
index 29cb751..b941c30 100755
--- a/scripts/preview
+++ b/scripts/preview
@@ -71,6 +71,8 @@ case $filetype in
echo "$fileinfo"
if command -v img2txt > /dev/null; then
img2txt -H $(($lines -1)) "$path"
+ else
+ echo "No available image previewer: consider installing 'img2txt'" >&2
fi
;;
*)
diff --git a/waybar/config.jsonc b/waybar/config.jsonc
new file mode 100644
index 0000000..ad44574
--- /dev/null
+++ b/waybar/config.jsonc
@@ -0,0 +1,90 @@
+{
+ "layer": "top",
+ "position": "top",
+ "expand-center": true,
+
+ "modules-left": [
+ "mango/workspaces",
+ "ext/workspaces" // TODO: change to mango
+ ],
+
+ "ext/workspaces": {
+ "on-click": "activate"
+ },
+
+ "modules-center": [
+ ],
+
+ "modules-right": [
+ "tray",
+ "mpris",
+ "wireplumber",
+ "network",
+ "bluetooth",
+ "battery",
+ "clock"
+ // TODO: notifications
+ ],
+
+ "mpris": {
+ "format": "[{status}] {dynamic}",
+ "title-len": 40,
+ "dynamic-len": 60
+ },
+
+ "wireplumber": {
+ "format": "{volume}% {icon} ",
+ "format-muted": "[muted] ",
+ "format-icons": ["", "", ""]
+ },
+
+ "network": {
+ "interface": "wlp0s20f3",
+ "format": "{ifname}",
+ "format-wifi": "{essid} ({signalStrength}%)  ",
+ "format-ethernet": "{ifname}  ",
+ "format-disconnected": "", //An empty format will hide the module.
+ "format-disconnected": " ",
+ "tooltip-format": "{ifname}",
+ "tooltip-format-wifi": "{essid} ({signalStrength}%)  ",
+ "tooltip-format-ethernet": "{ifname}  ",
+ "tooltip-format-disconnected": "Disconnected",
+ "max-length": 50
+ },
+
+ "blueooth": {
+ "format": " [{status}]"
+ },
+
+ "battery": {
+ "format": "{capacity}% {icon} ",
+ "format-icons": ["", "", "", "", ""]
+ },
+
+ "clock": {
+ "format": "{:%H:%M}  ",
+ "format-alt": "{:%A, %B %d, %Y (%R)}",
+ "tooltip-format": "<tt><small>{calendar}</small></tt>",
+ "calendar": {
+ "mode" : "year",
+ "mode-mon-col" : 3,
+ "weeks-pos" : "right",
+ "on-scroll" : 1,
+ "on-click-right": "mode",
+ "format": {
+ "months": "<span color='#ffead3'><b>{}</b></span>",
+ "days": "<span color='#ecc6d9'><b>{}</b></span>",
+ "weeks": "<span color='#99ffdd'><b>W{}</b></span>",
+ "weekdays": "<span color='#ffcc66'><b>{}</b></span>",
+ "today": "<span color='#ff6699'><b><u>{}</u></b></span>"
+ }
+ },
+ "actions": {
+ "on-click-right": "mode",
+ "on-click-forward": "tz_up",
+ "on-click-backward": "tz_down",
+ "on-scroll-up": "shift_up",
+ "on-scroll-down": "shift_down"
+ }
+ }
+}
diff --git a/waybar/style.css b/waybar/style.css
new file mode 100644
index 0000000..7c476da
--- /dev/null
+++ b/waybar/style.css
@@ -0,0 +1,75 @@
+/* TODO: style
+ *
+ * [ ] colors
+ *
+ * [ ] workspaces
+ * [ ] tray
+ * [ ] mpris
+ * [ ] wireplumber
+ * [ ] network
+ * [ ] bluetooth
+ * [ ] battery
+ * [ ] clock
+ *
+ * */
+
+* {
+
+ background-color: unset;
+ color: #cfc797;
+}
+
+.modules-right {
+ background-color: #091919;
+}
+
+#workspaces {
+ background-color: #091919;
+}
+
+/* doesn't stay background cover when hovering */
+#workspaces button:hover {
+ background-color: #003136;
+ box-shadow: inset 0 -3px #cfc797;
+}
+
+#workspaces button.active {
+ background-color: #438566;
+ box-shadow: inset 0 -3px #cfc797;
+}
+
+#workspaces button.urgent {
+ background-color: #732d35;
+}
+
+#tray {
+ background-color: red;
+}
+
+#mpris {
+ background-color: #091919;
+}
+
+#wireplumber {
+ background-color: #643875;
+ padding: 0.25em;
+}
+
+#network {
+ background-color: #ab710e;
+ padding: 0.25em;
+}
+
+#bluetooth {
+ background-color: #254e76;
+ padding: 0.25em;
+}
+
+#battery {
+ padding: 0.25em;
+}
+
+#clock {
+ background-color: #438566;
+ padding: 0.25em;
+}
diff --git a/zsh/default_zshalias b/zsh/default_zshalias
index 2a6bc4b..af97cbb 100644
--- a/zsh/default_zshalias
+++ b/zsh/default_zshalias
@@ -6,6 +6,7 @@ alias ls="ls --color=auto"
alias vim=$EDITOR
alias e=$EDITOR
alias p=preview
-alias grep=rg
-alias gr=rg
+alias grep=$GREP
+alias gr=$GREP
alias o=xdg-open
+alias a=atlas
diff --git a/zsh/default_zshenv b/zsh/default_zshenv
index 7132f04..29fbdbe 100644
--- a/zsh/default_zshenv
+++ b/zsh/default_zshenv
@@ -1,5 +1,6 @@
export EDITOR=vim
export VISUAL=vim
+export GREP=grep
export LESSHISTFILE=/dev/null