{"id":128,"date":"2011-01-06T00:10:00","date_gmt":"2011-01-06T00:10:00","guid":{"rendered":"http:\/\/aldarias.es\/wordpress\/?p=128"},"modified":"2011-01-06T00:10:00","modified_gmt":"2011-01-06T00:10:00","slug":"rotar-temas-con-ubuntu-gnome","status":"publish","type":"post","link":"http:\/\/aldarias.es\/wordpress\/?p=128","title":{"rendered":"ROTAR TEMAS CON UBUNTU GNOME"},"content":{"rendered":"<p><span style=\"font-weight:bold;\">INTRODUCCI\u00d6N<\/span><\/p>\n<p>Si queremos rotar los temas de forma r\u00e1pida podemos<br \/>crear un icono que permita hacer esto r\u00e1pido.<\/p>\n<p>Si el script se pone en el arranque permitir\u00e1<br \/>tener un tema diferente cada vez que se arranque.<\/p>\n<p>Una vez crear el archivo debemos ejetutarlo con:<br \/>bash rotartema.sh<\/p>\n<p><span style=\"font-weight:bold;\">EL SCRIPT<\/span><\/p>\n<p>cat temarotar.sh <br \/>ultimo=ultimo.txt<br \/>icono=\u00bb$HOME\/Escritorio\/Tema.desktop\u00bb<\/p>\n<p>function icono<br \/>{<br \/>echo \u00ab#!\/usr\/bin\/env xdg-open\u00bb > $icono<br \/>echo \u00ab[Desktop Entry]\u00bb>> $icono<br \/>echo \u00abVersion=1.0&#8243;>> $icono<br \/>echo \u00abType=Application\u00bb>> $icono<br \/>echo \u00abTerminal=false\u00bb>> $icono<br \/>echo \u00abIcon[es_ES]=gparted\u00bb>> $icono<br \/>echo \u00abExec=bash \/home\/paco\/temarotar.sh\u00bb>> $icono<br \/>echo \u00abName[es_ES]=Tema $1&#8243;>> $icono<br \/>echo \u00abIcon=gparted\u00bb>> $icono<br \/>echo \u00abName=Tema $1&#8243;>> $icono<\/p>\n<p>}<\/p>\n<p>function cambia<br \/>{<\/p>\n<p>  gconftool-2 &#8211;type string &#8211;set \/apps\/metacity\/general\/theme $1<br \/>  gconftool-2 &#8211;type string &#8211;set \/desktop\/gnome\/interface\/gtk_theme $1<br \/>  if [ -f \/usr\/share\/backgrounds\/$1.jpg ];then<br \/>  gconftool-2 &#8211;type string &#8211;set \/desktop\/gnome\/background\/picture_filename \/usr\/share\/backgrounds\/$1.jpg<br \/>  fi<br \/>  gconftool-2 &#8211;type string &#8211;set \/desktop\/gnome\/interface\/icon_theme $1<br \/>}<\/p>\n<p>function numero<br \/>{<br \/>num=$1<br \/>c=1<br \/>for i in $(ls \/usr\/share\/themes\/);do<br \/>     if [ $c -eq $num ];then<br \/>          tema=$i<br \/>          valido=$(echo $tema | grep -v \u00abContrast\u00bb)<br \/>             if [ $valido ];then<br \/>               break<br \/>             fi<br \/>     fi<\/p>\n<p>     let c=c+1<br \/>done <\/p>\n<p>echo \u00abTema $num $tema\u00bb<br \/>cambia $tema<br \/>icono $tema<br \/>}<\/p>\n<p>### MAIN<\/p>\n<p>tot=$(ls \/usr\/share\/themes\/ | wc -w)<br \/>if [  ! -f $ultimo ];then<br \/>    echo 1 > $ultimo<br \/>fi<\/p>\n<p>num=$(cat $ultimo)<\/p>\n<p>if [ $num -gt $tot ];then<br \/>    num=1<br \/>fi<\/p>\n<p>let num=num+1<br \/>echo $num > $ultimo<br \/>numero $num<\/p>\n","protected":false},"excerpt":{"rendered":"<p>INTRODUCCI\u00d6N Si queremos rotar los temas de forma r\u00e1pida podemoscrear un icono que permita hacer esto r\u00e1pido. Si el script se pone en el arranque permitir\u00e1tener un tema diferente cada vez que se arranque. Una vez crear el archivo debemos &hellip; <a href=\"http:\/\/aldarias.es\/wordpress\/?p=128\">Sigue leyendo <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"episode_type":"","audio_file":"","podmotor_file_id":"","podmotor_episode_id":"","cover_image":"","cover_image_id":"","duration":"","filesize":"","filesize_raw":"","date_recorded":"","explicit":"","block":"","itunes_episode_number":"","itunes_title":"","itunes_season_number":"","itunes_episode_type":"","footnotes":""},"categories":[117,183,49],"tags":[],"class_list":["post-128","post","type-post","status-publish","format-standard","hentry","category-script","category-temas","category-ubuntu"],"_links":{"self":[{"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=128"}],"version-history":[{"count":0,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/128\/revisions"}],"wp:attachment":[{"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=128"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}