mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-08-10 18:11:13 +10:00
Updating a few dotfiles.
This commit is contained in:
@@ -100,6 +100,7 @@ alias df='df -h' # human-readable sizes
|
|||||||
alias free='free -m' # show sizes in MB
|
alias free='free -m' # show sizes in MB
|
||||||
alias np='nano -w PKGBUILD'
|
alias np='nano -w PKGBUILD'
|
||||||
alias more=less
|
alias more=less
|
||||||
|
alias ub='$HOME/scripts/ub.sh'
|
||||||
|
|
||||||
# terminal rickroll!
|
# terminal rickroll!
|
||||||
alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash'
|
alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash'
|
||||||
|
|||||||
+5
-15
@@ -21,7 +21,6 @@
|
|||||||
# The above copyright notice and this permission notice shall be included in all copies or substantial
|
# The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||||
# portions of the Software.
|
# portions of the Software.
|
||||||
|
|
||||||
|
|
||||||
##### IMPORTS #####
|
##### IMPORTS #####
|
||||||
|
|
||||||
import os
|
import os
|
||||||
@@ -97,7 +96,6 @@ def init_keys():
|
|||||||
Key([mod, "control"], "j",
|
Key([mod, "control"], "j",
|
||||||
lazy.layout.section_down() # Move down a section in treetab
|
lazy.layout.section_down() # Move down a section in treetab
|
||||||
),
|
),
|
||||||
|
|
||||||
# Window controls
|
# Window controls
|
||||||
Key(
|
Key(
|
||||||
[mod], "k",
|
[mod], "k",
|
||||||
@@ -141,7 +139,6 @@ def init_keys():
|
|||||||
[mod], "m",
|
[mod], "m",
|
||||||
lazy.layout.maximize() # Toggle a window between minimum and maximum sizes
|
lazy.layout.maximize() # Toggle a window between minimum and maximum sizes
|
||||||
),
|
),
|
||||||
|
|
||||||
Key(
|
Key(
|
||||||
[mod, "shift"], "KP_Enter",
|
[mod, "shift"], "KP_Enter",
|
||||||
lazy.window.toggle_floating() # Toggle floating
|
lazy.window.toggle_floating() # Toggle floating
|
||||||
@@ -294,7 +291,6 @@ def init_keys():
|
|||||||
]
|
]
|
||||||
return keys
|
return keys
|
||||||
|
|
||||||
|
|
||||||
##### BAR COLORS #####
|
##### BAR COLORS #####
|
||||||
|
|
||||||
def init_colors():
|
def init_colors():
|
||||||
@@ -336,7 +332,7 @@ def init_layout_theme():
|
|||||||
"margin": 10,
|
"margin": 10,
|
||||||
"border_focus": "AD69AF",
|
"border_focus": "AD69AF",
|
||||||
"border_normal": "1D2330"
|
"border_normal": "1D2330"
|
||||||
}
|
}
|
||||||
|
|
||||||
def init_border_args():
|
def init_border_args():
|
||||||
return {"border_width": 2}
|
return {"border_width": 2}
|
||||||
@@ -373,7 +369,6 @@ def init_layouts():
|
|||||||
#layout.Zoomy(**layout_theme),
|
#layout.Zoomy(**layout_theme),
|
||||||
layout.Floating(**layout_theme)]
|
layout.Floating(**layout_theme)]
|
||||||
|
|
||||||
|
|
||||||
##### WIDGETS #####
|
##### WIDGETS #####
|
||||||
|
|
||||||
def init_widgets_defaults():
|
def init_widgets_defaults():
|
||||||
@@ -467,7 +462,7 @@ def init_widgets_list():
|
|||||||
foreground=colors[2],
|
foreground=colors[2],
|
||||||
background=colors[3],
|
background=colors[3],
|
||||||
fontsize=14
|
fontsize=14
|
||||||
),
|
),
|
||||||
widget.CurrentLayout(
|
widget.CurrentLayout(
|
||||||
foreground = colors[2],
|
foreground = colors[2],
|
||||||
background = colors[3],
|
background = colors[3],
|
||||||
@@ -485,7 +480,7 @@ def init_widgets_list():
|
|||||||
foreground=colors[0],
|
foreground=colors[0],
|
||||||
background=colors[7],
|
background=colors[7],
|
||||||
fontsize=14
|
fontsize=14
|
||||||
),
|
),
|
||||||
widget.Pacman(
|
widget.Pacman(
|
||||||
execute = "urxvtc",
|
execute = "urxvtc",
|
||||||
update_interval = 1800,
|
update_interval = 1800,
|
||||||
@@ -497,7 +492,7 @@ def init_widgets_list():
|
|||||||
padding = 6,
|
padding = 6,
|
||||||
foreground=colors[0],
|
foreground=colors[0],
|
||||||
background=colors[7]
|
background=colors[7]
|
||||||
),
|
),
|
||||||
widget.Image(
|
widget.Image(
|
||||||
scale = True,
|
scale = True,
|
||||||
filename = "~/.config/qtile/bar05.png",
|
filename = "~/.config/qtile/bar05.png",
|
||||||
@@ -510,7 +505,7 @@ def init_widgets_list():
|
|||||||
foreground = "d7d7d7",
|
foreground = "d7d7d7",
|
||||||
background=colors[8],
|
background=colors[8],
|
||||||
fontsize=14
|
fontsize=14
|
||||||
),
|
),
|
||||||
widget.Cmus(
|
widget.Cmus(
|
||||||
max_chars = 40,
|
max_chars = 40,
|
||||||
update_interval = 0.5,
|
update_interval = 0.5,
|
||||||
@@ -544,7 +539,6 @@ def init_widgets_list():
|
|||||||
]
|
]
|
||||||
return widgets_list
|
return widgets_list
|
||||||
|
|
||||||
|
|
||||||
##### SCREENS ##### (TRIPLE MONITOR SETUP)
|
##### SCREENS ##### (TRIPLE MONITOR SETUP)
|
||||||
|
|
||||||
def init_widgets_screen1():
|
def init_widgets_screen1():
|
||||||
@@ -560,7 +554,6 @@ def init_screens():
|
|||||||
Screen(top=bar.Bar(widgets=init_widgets_screen2(), opacity=0.95, size=25)),
|
Screen(top=bar.Bar(widgets=init_widgets_screen2(), opacity=0.95, size=25)),
|
||||||
Screen(top=bar.Bar(widgets=init_widgets_screen1(), opacity=0.95, size=25))]
|
Screen(top=bar.Bar(widgets=init_widgets_screen1(), opacity=0.95, size=25))]
|
||||||
|
|
||||||
|
|
||||||
##### FLOATING WINDOWS #####
|
##### FLOATING WINDOWS #####
|
||||||
|
|
||||||
@hook.subscribe.client_new
|
@hook.subscribe.client_new
|
||||||
@@ -599,14 +592,12 @@ if __name__ in ["config", "__main__"]:
|
|||||||
widgets_screen1 = init_widgets_screen1()
|
widgets_screen1 = init_widgets_screen1()
|
||||||
widgets_screen2 = init_widgets_screen2()
|
widgets_screen2 = init_widgets_screen2()
|
||||||
|
|
||||||
|
|
||||||
##### SETS GROUPS KEYBINDINGS #####
|
##### SETS GROUPS KEYBINDINGS #####
|
||||||
|
|
||||||
for i, (name, kwargs) in enumerate(group_names, 1):
|
for i, (name, kwargs) in enumerate(group_names, 1):
|
||||||
keys.append(Key([mod], str(i), lazy.group[name].toscreen())) # Switch to another group
|
keys.append(Key([mod], str(i), lazy.group[name].toscreen())) # Switch to another group
|
||||||
keys.append(Key([mod, "shift"], str(i), lazy.window.togroup(name))) # Send current window to another group
|
keys.append(Key([mod, "shift"], str(i), lazy.window.togroup(name))) # Send current window to another group
|
||||||
|
|
||||||
|
|
||||||
##### STARTUP APPLICATIONS #####
|
##### STARTUP APPLICATIONS #####
|
||||||
|
|
||||||
@hook.subscribe.startup_once
|
@hook.subscribe.startup_once
|
||||||
@@ -614,7 +605,6 @@ def start_once():
|
|||||||
home = os.path.expanduser('~')
|
home = os.path.expanduser('~')
|
||||||
subprocess.call([home + '/.config/qtile/autostart.sh'])
|
subprocess.call([home + '/.config/qtile/autostart.sh'])
|
||||||
|
|
||||||
|
|
||||||
##### NEEDED FOR SOME JAVA APPS #####
|
##### NEEDED FOR SOME JAVA APPS #####
|
||||||
|
|
||||||
#wmname = "LG3D"
|
#wmname = "LG3D"
|
||||||
|
|||||||
@@ -56,13 +56,13 @@ highlight Fifo cterm=bold ctermfg=cyan ctermbg=default
|
|||||||
highlight Executable cterm=bold ctermfg=green ctermbg=default
|
highlight Executable cterm=bold ctermfg=green ctermbg=default
|
||||||
highlight Selected cterm=bold ctermfg=magenta ctermbg=default
|
highlight Selected cterm=bold ctermfg=magenta ctermbg=default
|
||||||
highlight CurrLine cterm=bold,reverse ctermfg=default ctermbg=default
|
highlight CurrLine cterm=bold,reverse ctermfg=default ctermbg=default
|
||||||
highlight TopLine cterm=none ctermfg=black ctermbg=white
|
highlight TopLine cterm=none ctermfg=147 ctermbg=red
|
||||||
highlight TopLineSel cterm=bold ctermfg=black ctermbg=default
|
highlight TopLineSel cterm=bold ctermfg=white ctermbg=default
|
||||||
highlight StatusLine cterm=bold ctermfg=black ctermbg=white
|
highlight StatusLine cterm=bold ctermfg=white ctermbg=red
|
||||||
highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black
|
highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black
|
||||||
highlight CmdLine cterm=none ctermfg=white ctermbg=black
|
highlight CmdLine cterm=none ctermfg=white ctermbg=black
|
||||||
highlight ErrorMsg cterm=none ctermfg=red ctermbg=black
|
highlight ErrorMsg cterm=none ctermfg=red ctermbg=black
|
||||||
highlight Border cterm=none ctermfg=black ctermbg=white
|
highlight Border cterm=none ctermfg=black ctermbg=red
|
||||||
highlight JobLine cterm=bold,reverse ctermfg=black ctermbg=white
|
highlight JobLine cterm=bold,reverse ctermfg=black ctermbg=white
|
||||||
highlight SuggestBox cterm=bold ctermfg=default ctermbg=default
|
highlight SuggestBox cterm=bold ctermfg=default ctermbg=default
|
||||||
highlight CmpMismatch cterm=bold ctermfg=white ctermbg=red
|
highlight CmpMismatch cterm=bold ctermfg=white ctermbg=red
|
||||||
|
|||||||
+3
-1
@@ -118,6 +118,8 @@ endif
|
|||||||
|
|
||||||
set statusline=" Hint: %z%= %A %10u:%-7g %15s %20d "
|
set statusline=" Hint: %z%= %A %10u:%-7g %15s %20d "
|
||||||
|
|
||||||
|
" Set line numbers to show
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
" :mark mark /full/directory/path [filename]
|
" :mark mark /full/directory/path [filename]
|
||||||
@@ -247,7 +249,7 @@ filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
|
|||||||
\ {View in shotwell}
|
\ {View in shotwell}
|
||||||
\ shotwell,
|
\ shotwell,
|
||||||
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
|
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
|
||||||
" Get w3m image previews inside vifm
|
" Get w3m image previews inside vifm
|
||||||
\ imgt %px %py %pw %ph %c
|
\ imgt %px %py %pw %ph %c
|
||||||
\ %pc
|
\ %pc
|
||||||
" \ imgc %px %py %pw %ph NOT NEEDED IN XTERM
|
" \ imgc %px %py %pw %ph NOT NEEDED IN XTERM
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
# Use dmenu to open and edit a file from a given list.
|
# Use dmenu to open and edit a file from a given list.
|
||||||
# I use this to quickly open my dwm source files in vim.
|
# I use this to quickly open my dwm source files in vim.
|
||||||
|
|
||||||
|
source $HOME/.dmenurc
|
||||||
|
|
||||||
# Global variables:
|
# Global variables:
|
||||||
FILES=${1:-"/home/dt/dwm"}
|
FILES=${1:-"/home/dt/dwm"}
|
||||||
DMENU='dmenu -l -i'
|
DMENU='dmenu -l -i'
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# Global variables:
|
# Global variables:
|
||||||
FILES=${1:-"/home/dt/st"}
|
FILES=${1:-"/home/dt/st"}
|
||||||
DMENU='dmenu -l -i'
|
DMENU='dmenu -nb #1D2330 -nf #AD69AF -sb #84598D -sf #d1d7e1 -l -i'
|
||||||
EDITOR='st -e vim'
|
EDITOR='st -e vim'
|
||||||
# Show list of options
|
# Show list of options
|
||||||
choice=$(ls -a "${FILES}" | $DMENU -p "« st » source code:")
|
choice=$(ls -a "${FILES}" | $DMENU -p "« st » source code:")
|
||||||
|
|||||||
+1
-1
@@ -29,6 +29,6 @@ cpu(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
xsetroot -name "$(cpu) | $(mem) | $(upd) | $(dte)"
|
xsetroot -name "$(cpu) | $(mem) | $(dte)"
|
||||||
sleep 10s # Update time every ten seconds
|
sleep 10s # Update time every ten seconds
|
||||||
done &
|
done &
|
||||||
|
|||||||
@@ -14,6 +14,12 @@ call vundle#begin() " required, all plugins must appear after this line.
|
|||||||
Plugin 'gmarik/Vundle.vim' " Vundle
|
Plugin 'gmarik/Vundle.vim' " Vundle
|
||||||
Plugin 'vim-airline/vim-airline' " Airline
|
Plugin 'vim-airline/vim-airline' " Airline
|
||||||
Plugin 'vim-airline/vim-airline-themes' " Airline Themes
|
Plugin 'vim-airline/vim-airline-themes' " Airline Themes
|
||||||
|
Plugin 'scrooloose/nerdtree' " added nerdtree
|
||||||
|
Plugin 'tiagofumo/vim-nerdtree-syntax-highlight'
|
||||||
|
Plugin 'ryanoasis/vim-devicons'
|
||||||
|
Plugin 'vim-python/python-syntax'
|
||||||
|
Plugin 'jreybert/vimagit'
|
||||||
|
Plugin 'severin-lemaignan/vim-minimap'
|
||||||
"Plugin 'klen/python-mode' " Python Mode
|
"Plugin 'klen/python-mode' " Python Mode
|
||||||
|
|
||||||
call vundle#end() " required, all plugins must appear before this line.
|
call vundle#end() " required, all plugins must appear before this line.
|
||||||
@@ -59,7 +65,7 @@ set rtp+=/usr/share/powerline/bindings/vim/
|
|||||||
set laststatus=2
|
set laststatus=2
|
||||||
|
|
||||||
" Use 256 colours (Use this setting only if your terminal supports 256 colours)
|
" Use 256 colours (Use this setting only if your terminal supports 256 colours)
|
||||||
set t_Co=256
|
" set t_Co=256
|
||||||
|
|
||||||
syntax on
|
syntax on
|
||||||
set number
|
set number
|
||||||
@@ -87,6 +93,18 @@ set smarttab
|
|||||||
set shiftwidth=4
|
set shiftwidth=4
|
||||||
set tabstop=4
|
set tabstop=4
|
||||||
|
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" => NERDTree
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" Uncomment to autostart the NERDTree
|
||||||
|
" autocmd vimenter * NERDTree
|
||||||
|
map <C-n> :NERDTreeToggle<CR>
|
||||||
|
let g:NERDTreeDirArrowExpandable = '▸'
|
||||||
|
let g:NERDTreeDirArrowCollapsible = '▾'
|
||||||
|
let NERDTreeShowLineNumbers=1
|
||||||
|
let NERDTreeShowHidden=1
|
||||||
|
let NERDTreeMinimalUI = 1
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" => Colors
|
" => Colors
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
@@ -98,7 +116,20 @@ hi Statement ctermfg=3
|
|||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
set mouse=nicr
|
set mouse=nicr
|
||||||
|
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" => Splits and Tabbed Files
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
set splitbelow splitright
|
||||||
|
|
||||||
|
set path+=** " Searches current directory recursively.
|
||||||
|
set wildmenu " Display all matches when tab complete.
|
||||||
set incsearch
|
set incsearch
|
||||||
set nobackup
|
set nobackup
|
||||||
set noswapfile
|
set noswapfile
|
||||||
|
|
||||||
|
let g:minimap_highlight='Visual'
|
||||||
|
|
||||||
|
let g:python_highlight_all = 1
|
||||||
|
syntax on
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -4,13 +4,13 @@
|
|||||||
static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
|
static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
|
||||||
/* -fn option overrides fonts[0]; default X11 font or font set */
|
/* -fn option overrides fonts[0]; default X11 font or font set */
|
||||||
static const char *fonts[] = {
|
static const char *fonts[] = {
|
||||||
"monospace:size=10"
|
"UbuntuMono Nerd Font:size=11"
|
||||||
};
|
};
|
||||||
static const char *prompt = NULL; /* -p option; prompt to the left of input field */
|
static const char *prompt = NULL; /* -p option; prompt to the left of input field */
|
||||||
static const char *colors[SchemeLast][2] = {
|
static const char *colors[SchemeLast][2] = {
|
||||||
/* fg bg */
|
/* fg bg */
|
||||||
[SchemeNorm] = { "#bbbbbb", "#222222" },
|
[SchemeNorm] = { "#AD69AF", "#1D2330" },
|
||||||
[SchemeSel] = { "#eeeeee", "#005577" },
|
[SchemeSel] = { "#d1d7e1", "#84598D" },
|
||||||
[SchemeOut] = { "#000000", "#00ffff" },
|
[SchemeOut] = { "#000000", "#00ffff" },
|
||||||
};
|
};
|
||||||
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
||||||
|
|||||||
BIN
Binary file not shown.
Binary file not shown.
@@ -5,6 +5,8 @@ static const unsigned int borderpx = 1; /* border pixel of windows */
|
|||||||
static const unsigned int snap = 32; /* snap pixel */
|
static const unsigned int snap = 32; /* snap pixel */
|
||||||
static const int showbar = 1; /* 0 means no bar */
|
static const int showbar = 1; /* 0 means no bar */
|
||||||
static const int topbar = 1; /* 0 means bottom bar */
|
static const int topbar = 1; /* 0 means bottom bar */
|
||||||
|
static const int horizpadbar = 4; /* horizontal padding for statusbar */
|
||||||
|
static const int vertpadbar = 2; /* vertical padding for statusbar */
|
||||||
static const char *fonts[] = { "monospace:size=10" };
|
static const char *fonts[] = { "monospace:size=10" };
|
||||||
static const char dmenufont[] = "monospace:size=10";
|
static const char dmenufont[] = "monospace:size=10";
|
||||||
static const char col_gray1[] = "#222222";
|
static const char col_gray1[] = "#222222";
|
||||||
|
|||||||
+5
-3
@@ -6,8 +6,10 @@ static const unsigned int snap = 32; /* snap pixel */
|
|||||||
static const unsigned int gappx = 5; /* pixel gap between clients */
|
static const unsigned int gappx = 5; /* pixel gap between clients */
|
||||||
static const int showbar = 1; /* 0 means no bar */
|
static const int showbar = 1; /* 0 means no bar */
|
||||||
static const int topbar = 1; /* 0 means bottom bar */
|
static const int topbar = 1; /* 0 means bottom bar */
|
||||||
static const char *fonts[] = { "UbuntuMono Nerd Font:size=11" };
|
static const int horizpadbar = 6; /* horizontal padding for statusbar */
|
||||||
static const char dmenufont[] = "UbuntuMono Nerd Font:size=11";
|
static const int vertpadbar = 7; /* vertical padding for statusbar */
|
||||||
|
static const char *fonts[] = { "UbuntuMono Nerd Font:size=10" };
|
||||||
|
static const char dmenufont[] = "UbuntuMono Nerd Font:size=10";
|
||||||
static const char col_gray1[] = "#1D2330";
|
static const char col_gray1[] = "#1D2330";
|
||||||
static const char col_gray2[] = "#4B5665";
|
static const char col_gray2[] = "#4B5665";
|
||||||
static const char col_gray3[] = "#AD69AF";
|
static const char col_gray3[] = "#AD69AF";
|
||||||
@@ -87,7 +89,7 @@ static Key keys[] = {
|
|||||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||||
{ MODKEY, XK_Return, zoom, {0} },
|
{ MODKEY|ShiftMask, XK_Return, zoom, {0} },
|
||||||
{ MODKEY, XK_Tab, view, {0} },
|
{ MODKEY, XK_Tab, view, {0} },
|
||||||
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
||||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
||||||
|
|||||||
@@ -749,8 +749,8 @@ drawbar(Monitor *m)
|
|||||||
/* draw status first so it can be overdrawn by tags later */
|
/* draw status first so it can be overdrawn by tags later */
|
||||||
if (m == selmon) { /* status is only drawn on selected monitor */
|
if (m == selmon) { /* status is only drawn on selected monitor */
|
||||||
drw_setscheme(drw, scheme[SchemeNorm]);
|
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||||
sw = TEXTW(stext) - lrpad + 2; /* 2px right padding */
|
sw = TEXTW(stext);
|
||||||
drw_text(drw, m->ww - sw, 0, sw, bh, 0, stext, 0);
|
drw_text(drw, m->ww - sw, 0, sw, bh, lrpad / 2, stext, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (c = m->clients; c; c = c->next) {
|
for (c = m->clients; c; c = c->next) {
|
||||||
@@ -1684,8 +1684,8 @@ setup(void)
|
|||||||
drw = drw_create(dpy, screen, root, sw, sh, visual, depth, cmap);
|
drw = drw_create(dpy, screen, root, sw, sh, visual, depth, cmap);
|
||||||
if (!drw_fontset_create(drw, fonts, LENGTH(fonts)))
|
if (!drw_fontset_create(drw, fonts, LENGTH(fonts)))
|
||||||
die("no fonts could be loaded.");
|
die("no fonts could be loaded.");
|
||||||
lrpad = drw->fonts->h;
|
lrpad = drw->fonts->h + horizpadbar;
|
||||||
bh = drw->fonts->h + 2;
|
bh = drw->fonts->h + vertpadbar;
|
||||||
updategeom();
|
updategeom();
|
||||||
/* init atoms */
|
/* init atoms */
|
||||||
utf8string = XInternAtom(dpy, "UTF8_STRING", False);
|
utf8string = XInternAtom(dpy, "UTF8_STRING", False);
|
||||||
|
|||||||
+29
-3
@@ -49,7 +49,8 @@
|
|||||||
#define CLEANMASK(mask) (mask & ~(numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
|
#define CLEANMASK(mask) (mask & ~(numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
|
||||||
#define INTERSECT(x,y,w,h,m) (MAX(0, MIN((x)+(w),(m)->wx+(m)->ww) - MAX((x),(m)->wx)) \
|
#define INTERSECT(x,y,w,h,m) (MAX(0, MIN((x)+(w),(m)->wx+(m)->ww) - MAX((x),(m)->wx)) \
|
||||||
* MAX(0, MIN((y)+(h),(m)->wy+(m)->wh) - MAX((y),(m)->wy)))
|
* MAX(0, MIN((y)+(h),(m)->wy+(m)->wh) - MAX((y),(m)->wy)))
|
||||||
#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags]))
|
#define ISVISIBLEONTAG(C, T) ((C->tags & T))
|
||||||
|
#define ISVISIBLE(C) ISVISIBLEONTAG(C, C->mon->tagset[C->mon->seltags])
|
||||||
#define LENGTH(X) (sizeof X / sizeof X[0])
|
#define LENGTH(X) (sizeof X / sizeof X[0])
|
||||||
#define MOUSEMASK (BUTTONMASK|PointerMotionMask)
|
#define MOUSEMASK (BUTTONMASK|PointerMotionMask)
|
||||||
#define WIDTH(X) ((X)->w + 2 * (X)->bw + gappx)
|
#define WIDTH(X) ((X)->w + 2 * (X)->bw + gappx)
|
||||||
@@ -149,6 +150,7 @@ static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interac
|
|||||||
static void arrange(Monitor *m);
|
static void arrange(Monitor *m);
|
||||||
static void arrangemon(Monitor *m);
|
static void arrangemon(Monitor *m);
|
||||||
static void attach(Client *c);
|
static void attach(Client *c);
|
||||||
|
static void attachaside(Client *c);
|
||||||
static void attachstack(Client *c);
|
static void attachstack(Client *c);
|
||||||
static void buttonpress(XEvent *e);
|
static void buttonpress(XEvent *e);
|
||||||
static void checkotherwm(void);
|
static void checkotherwm(void);
|
||||||
@@ -188,6 +190,7 @@ static void maprequest(XEvent *e);
|
|||||||
static void monocle(Monitor *m);
|
static void monocle(Monitor *m);
|
||||||
static void motionnotify(XEvent *e);
|
static void motionnotify(XEvent *e);
|
||||||
static void movemouse(const Arg *arg);
|
static void movemouse(const Arg *arg);
|
||||||
|
static Client *nexttagged(Client *c);
|
||||||
static Client *nexttiled(Client *c);
|
static Client *nexttiled(Client *c);
|
||||||
static void pop(Client *);
|
static void pop(Client *);
|
||||||
static void propertynotify(XEvent *e);
|
static void propertynotify(XEvent *e);
|
||||||
@@ -419,6 +422,18 @@ attach(Client *c)
|
|||||||
c->mon->clients = c;
|
c->mon->clients = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
attachaside(Client *c) {
|
||||||
|
Client *at = nexttagged(c);
|
||||||
|
if(!at) {
|
||||||
|
attach(c);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
c->next = at->next;
|
||||||
|
at->next = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
attachstack(Client *c)
|
attachstack(Client *c)
|
||||||
{
|
{
|
||||||
@@ -1114,7 +1129,7 @@ manage(Window w, XWindowAttributes *wa)
|
|||||||
c->isfloating = c->oldstate = trans != None || c->isfixed;
|
c->isfloating = c->oldstate = trans != None || c->isfixed;
|
||||||
if (c->isfloating)
|
if (c->isfloating)
|
||||||
XRaiseWindow(dpy, c->win);
|
XRaiseWindow(dpy, c->win);
|
||||||
attach(c);
|
attachaside(c);
|
||||||
attachstack(c);
|
attachstack(c);
|
||||||
XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
|
XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
|
||||||
(unsigned char *) &(c->win), 1);
|
(unsigned char *) &(c->win), 1);
|
||||||
@@ -1244,6 +1259,16 @@ movemouse(const Arg *arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Client *
|
||||||
|
nexttagged(Client *c) {
|
||||||
|
Client *walked = c->mon->clients;
|
||||||
|
for(;
|
||||||
|
walked && (walked->isfloating || !ISVISIBLEONTAG(walked, c->tags));
|
||||||
|
walked = walked->next
|
||||||
|
);
|
||||||
|
return walked;
|
||||||
|
}
|
||||||
|
|
||||||
Client *
|
Client *
|
||||||
nexttiled(Client *c)
|
nexttiled(Client *c)
|
||||||
{
|
{
|
||||||
@@ -1531,7 +1556,7 @@ sendmon(Client *c, Monitor *m)
|
|||||||
detachstack(c);
|
detachstack(c);
|
||||||
c->mon = m;
|
c->mon = m;
|
||||||
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
|
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
|
||||||
attach(c);
|
attachaside(c);
|
||||||
attachstack(c);
|
attachstack(c);
|
||||||
focus(NULL);
|
focus(NULL);
|
||||||
arrange(NULL);
|
arrange(NULL);
|
||||||
@@ -2015,6 +2040,7 @@ updategeom(void)
|
|||||||
detachstack(c);
|
detachstack(c);
|
||||||
c->mon = mons;
|
c->mon = mons;
|
||||||
attach(c);
|
attach(c);
|
||||||
|
attachaside(c);
|
||||||
attachstack(c);
|
attachstack(c);
|
||||||
}
|
}
|
||||||
if (m == selmon)
|
if (m == selmon)
|
||||||
|
|||||||
@@ -114,7 +114,6 @@ static const char *colorname[] = {
|
|||||||
"#1D2330",
|
"#1D2330",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Default colors (colorname index)
|
* Default colors (colorname index)
|
||||||
* foreground, background, cursor, reverse cursor
|
* foreground, background, cursor, reverse cursor
|
||||||
|
|||||||
Reference in New Issue
Block a user